/* Стили сайта agent-mark.ru: светлый фон, белые карточки, крупные строчные заголовки,
   красный акцент — как у значка-сноски «*» в виджете. */

/* Inter со своего сервера (не Google Fonts): IP посетителей не уходят за рубеж */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/static/fonts/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 800; font-display: swap;
  src: url(/static/fonts/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 {
  --bg: #f3f3f1;
  --card: #ffffff;
  --ink: #1b1b1a;
  --muted: #6d6d68;
  --line: #e4e4df;
  --field: #878781; /* рамки полей ввода: контраст 3,6:1 с белым */
  --accent: #d13a2c;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9e6;
  --ok: #17703d;
  --accent-text: #a8281c; /* красный для текста на светло-розовом фоне: контраст 6:1 */
  --radius: 24px;
  --radius-s: 12px;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
img, svg { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* --- Шапка и подвал --- */
.header { position: sticky; top: 0; z-index: 10; background: rgba(243, 243, 241, .92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-weight: 800; font-size: 22px; letter-spacing: -.02em; text-decoration: none; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 20px; flex: 1; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--ink); }
/* Кнопка кабинета и флажок языка — рядом, справа в шапке */
.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
/* Флажок языка (рисунок флагов — как на max.datool.ru, чистым CSS) */
.lang-switch { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  margin: 0 -6px; border-radius: 10px; flex-shrink: 0; }
.lang-switch:hover { background: rgba(0, 0, 0, .05); }
.lang-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.flag { display: block; width: 23px; height: 16px; border-radius: 4px; overflow: hidden;
  box-shadow: 0 2px 4px #0003, inset 0 1px 2px #fff9, inset 0 -2px 2px #0002; }
.flag-ru { background: linear-gradient(#fff 0 33.33%, #2356b6 33.33% 66.66%, #d52c3e 66.66%); }
.flag-en { background:
  linear-gradient(90deg, transparent 40%, #c92736 40% 60%, transparent 60%),
  linear-gradient(transparent 35%, #fff 35% 40%, #c92736 40% 60%, #fff 60% 65%, transparent 65%),
  linear-gradient(90deg, transparent 33%, #fff 33% 67%, transparent 67%),
  linear-gradient(34deg, transparent 42%, #fff 42% 48%, #c92736 48% 53%, #fff 53% 59%, transparent 59%),
  linear-gradient(-34deg, #24437a 42%, #fff 42% 48%, #c92736 48% 53%, #fff 53% 59%, #24437a 59%); }
.footer { margin-top: 64px; padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.footer a { color: var(--muted); }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 24px; align-content: start; }
@media (max-width: 560px) { .footer-links { grid-template-columns: 1fr; } }

/* --- Кнопки и формы --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1;
  text-decoration: none; }
.btn:hover { filter: brightness(1.06); }
.btn.secondary { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.btn.small { min-height: 36px; padding: 0 16px; font-size: 14px; }
/* Поля ввода; input без type — тоже текстовое поле */
input:not([type]), input[type=text], input[type=email], input[type=search],
input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date],
input[type=month], textarea, select {
  width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid var(--field);
  border-radius: var(--radius-s); background: #fff; color: var(--ink); font: inherit; }
textarea { min-height: 160px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 8px 0; cursor: pointer; }
/* Галочки и радиокнопки свои, не системные: белые со скруглением, отмеченные — красные */
input[type=checkbox], input[type=radio] { appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--field); border-radius: 6px;
  background: #fff center / 14px no-repeat; cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover, input[type=radio]:hover { border-color: var(--accent); }
input[type=checkbox]:checked { border-color: var(--accent); background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.4l2.6 2.6L11 4.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type=radio]:checked { border-color: var(--accent); box-shadow: inset 0 0 0 4px #fff;
  background-color: var(--accent); }
input[type=checkbox]:focus, input[type=radio]:focus { outline: none; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--accent);
  outline-offset: 2px; }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .5; cursor: default; }
.check input { flex-shrink: 0; margin-top: 2px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
/* Ярлык «адм.» у левого края экрана: вход в админку для администраторов */
.admin-tab { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 50;
  padding: 14px 14px 14px 10px; border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
  text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.admin-tab:hover { background: #000; }
.admin-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media print { .admin-tab { display: none; } }
.row > input { flex: 1 1 240px; }
.error { color: var(--accent-text); background: var(--accent-soft); padding: 10px 14px;
  border-radius: var(--radius-s); margin: 12px 0; }
.notice { color: var(--ok); background: #e7f5ec; padding: 10px 14px; border-radius: var(--radius-s); margin: 12px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* --- Карточки и сетки --- */
.card { background: var(--card); border-radius: var(--radius); padding: 32px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
section { margin-top: 56px; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.12; margin: 0 0 16px; }
h1 { font-size: clamp(40px, 7vw, 84px); font-weight: 800; }
h2, h1.page { font-size: clamp(30px, 4.5vw, 48px); font-weight: 800; }
h3, h2.h3 { font-size: 20px; font-weight: 700; }
.lead { font-size: 19px; max-width: 640px; }

/* --- Главная --- */
.hero { padding: 56px 0 8px; }
/* Название сервиса крупно; смысловой заголовок h1 — справа, рядом со списком */
.hero-brand { font-size: clamp(40px, 7vw, 84px); font-weight: 800; letter-spacing: -.02em; line-height: 1.12;
  margin: 0 0 16px; }
.hero-brand span { color: var(--accent); }
.hero-title { font-size: 19px; font-weight: 700; line-height: 1.55; letter-spacing: 0; max-width: 640px; margin: 0; }
.hero .row { margin-top: 28px; }
.bullets { list-style: none; padding: 0; margin: 20px 0 0; }
.bullets li { padding-left: 26px; position: relative; margin: 8px 0; }
.bullets li::before { content: "*"; position: absolute; left: 4px; color: var(--accent); font-weight: 800; }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--card); border-radius: var(--radius); padding: 24px; text-decoration: none; }
.stat b { display: block; font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; hyphens: auto; }
.big-number { font-size: 56px; font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -.03em; }
.steps { counter-reset: step; }
.step::before { counter-increment: step; content: counter(step); display: inline-flex;
  width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 16px; }
.example { font-size: 18px; }
.example .am-mark { color: var(--accent); font-weight: 700; }
.example .am-footnotes { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line);
  margin-top: 16px; padding-top: 10px; }
.example .am-footnotes p { margin: 4px 0; }
.example .am-warning { font-size: 13px; font-weight: 600; text-transform: uppercase; line-height: 1.4;
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; margin-bottom: 16px; }
.check-result { margin-top: 20px; }
code, pre { font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
pre.snippet { background: #1f2328; color: #f6f8fa; padding: 16px; border-radius: var(--radius-s);
  overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0; }

/* --- Тарифы --- */
.tariff { display: flex; flex-direction: column; }
.tariff.highlighted { box-shadow: inset 0 0 0 2px var(--accent); }
.tariff .price { font-size: 36px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 4px; }
.tariff ul { padding-left: 18px; flex: 1; }
/* Галочка доп. услуги в карточке тарифа: цена выше пересчитывается (site.js) */
.tariff .addon-check { font-size: 14px; margin: 0 0 16px; padding: 10px 12px;
  border-radius: var(--radius-s); background: var(--accent-soft); }
/* Доп. услуга на главной: выделена рамкой, чтобы не терялась среди тарифов */
.addon-card { box-shadow: inset 0 0 0 2px var(--accent); }
.addon-card .tag { margin-bottom: 12px; }
.addon-card .price { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 16px; }
/* Плагины для редакций на главной: та же рамка, что у доп. услуги */
.plugins-card .row { margin-top: 24px; }
.plugins-card .bullets { margin-top: 0; }
.plugins-card .bullets li { margin: 10px 0; }
.steps-list { padding-left: 22px; }
.steps-list li { margin: 8px 0; }

/* position: relative — иначе .sr-only внутри таблицы не обрезается прокруткой
   и растягивает страницу вбок на телефоне */
.compare-wrap { overflow-x: auto; position: relative; }
.compare { width: 100%; border-collapse: collapse; min-width: 560px; table-layout: fixed; }
.compare th:first-child { width: 40%; }
.compare th, .compare td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th { font-size: 18px; }
.compare td:first-child, .compare th:first-child { text-align: left; }
.compare .yes { color: var(--ok); font-weight: 800; }
.compare .no { color: var(--muted); }

/* --- Реестр --- */
.search { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.search input { flex: 1 1 280px; }
.search select { flex: 0 1 300px; }
.entries { width: 100%; border-collapse: collapse; margin-top: 16px; table-layout: fixed; }
.entries td { overflow-wrap: anywhere; }
.entries th:nth-child(2) { width: 30%; }
.entries th:nth-child(3) { width: 110px; }
.entries td, .entries th { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.entries th { color: var(--muted); font-weight: 600; font-size: 14px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--accent-soft);
  color: var(--accent-text); font-size: 13px; white-space: nowrap; }
.pager { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

/* --- Кабинет --- */
.narrow { max-width: 480px; margin: 56px auto 0; }
.site-row { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
/* Тариф и оплата на странице сайта */
.order { box-shadow: inset 0 0 0 2px var(--accent); }
.order-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.order fieldset { border: 0; padding: 0; margin: 16px 0 0; }
.order legend { font-weight: 700; margin-bottom: 4px; }
.order .addon-option .check { padding: 12px; border-radius: var(--radius-s); background: var(--accent-soft); }
.order-total { font-size: 20px; margin: 20px 0 12px; }
/* Промокод и кнопка «применить» в одну строку */
.promo-row { flex-wrap: nowrap; }
.promo-row input { flex: 0 1 280px; min-width: 0; }
/* Расчёт «к оплате» в формах заказа (_quote.html) */
.quote-box { margin-top: 16px; }
.quote { width: 100%; max-width: 560px; border-collapse: collapse; }
.quote td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.quote td + td { padding-left: 16px; text-align: right; }
.quote s { font-size: 14px; }
.tag.ok { background: #e7f5ec; color: var(--ok); }
@media (max-width: 560px) { .order-status { grid-template-columns: 1fr; } }
.secret { background: #fff7d6; border-radius: var(--radius-s); padding: 16px; margin: 16px 0; }

@media (max-width: 860px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 30px; }
  .card { padding: 24px 20px; }
  .nav { display: none; }
  .header .wrap { justify-content: space-between; }
  .entries th:nth-child(3), .entries td:nth-child(3) { display: none; }
  .entries th:nth-child(2) { width: 42%; }
}

/* --- Юридические документы --- */
.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.doc-nav { padding: 20px; position: sticky; top: 80px; }
.doc-nav a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 15px; }
.doc-nav a:hover { color: var(--ink); font-weight: 600; }
.doc-nav a.active { color: var(--accent); font-weight: 600; }
.doc { max-width: 820px; }
.doc h1.page { font-size: clamp(26px, 3.5vw, 36px); }
.doc h3 { margin-top: 28px; }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc table { width: 100%; border-collapse: collapse; }
.doc td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.doc td:first-child { color: var(--muted); width: 38%; }
/* Английская версия: «документ только на русском» — нейтральная плашка вместо зелёной */
.doc .lang-notice { color: var(--ink); background: var(--bg); border: 1px solid var(--line); }
@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-nav { position: static; }
}

/* --- Помощь --- */
.faq-topics { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.faq-topics a { color: var(--muted); font-size: 15px; }
.faq-group { margin-top: 40px; }
.faq-group h2 { font-size: 26px; margin-bottom: 12px; }
.faq { background: var(--card); border-radius: var(--radius-s); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 18px 48px 18px 20px; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 14px; font-size: 24px;
  color: var(--accent); font-weight: 400; }
.faq[open] summary::after { content: "−"; }
.faq-body { padding: 0 20px 16px; }
.faq-body p:first-child { margin-top: 0; }
.faq-body code { overflow-wrap: anywhere; }
.faq-short { columns: 2; column-gap: 32px; }
.faq-short a { display: block; break-inside: avoid; padding: 8px 0; }
@media (max-width: 860px) { .faq-short { columns: 1; } }

/* --- Мобильное меню: прокручиваемая строка под шапкой --- */
.nav-mobile { display: none; }
@media (max-width: 860px) {
  .nav-mobile { display: flex; gap: 18px; overflow-x: auto; white-space: nowrap; padding-top: 10px;
    padding-bottom: 10px; scrollbar-width: none; }
  .nav-mobile::-webkit-scrollbar { display: none; }
  .nav-mobile a { color: var(--muted); text-decoration: none; font-size: 15px; }
  .compare td:first-child, .compare th:first-child { position: sticky; left: 0; background: var(--card);
    z-index: 1; width: 44%; }
}

/* Текст только для экранных читалок */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; margin: 16px 0 6px; padding: 0; }

/* --- Объявление над шапкой (параметр в админке) --- */
.announcement { background: var(--ink); color: #fff; font-size: 14px; padding: 8px 0; text-align: center; }

/* --- Админка --- */
.admin-nav { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 24px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line); }
.admin-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.admin-nav a:hover { color: var(--ink); }
.admin-nav a.active { color: var(--ink); font-weight: 600; }
section.admin { margin-top: 24px; }
.admin-title { overflow-wrap: anywhere; }
.admin-h2 { font-size: 26px; margin-top: 40px; }
.admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.table-wrap { overflow-x: auto; position: relative; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; }
/* Ячейки — в одну строку: не тесним колонки и не рвём слова («1/0», «ki-news.r/u»); не влезает —
   таблица прокручивается по горизонтали внутри .table-wrap. Длинный текст (журнал, заметки) — класс
   wrap: переносится по словам; названия тарифных планов — wrap-short: тоже по словам, но колонка уже;
   адреса страниц — wrap-any: переносятся где угодно */
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line);
  vertical-align: top; white-space: nowrap; }
.admin-table td.wrap { white-space: normal; min-width: 260px; overflow-wrap: break-word; }
.admin-table td.wrap-short { white-space: normal; min-width: 140px; overflow-wrap: break-word; }
.admin-table td.wrap-any { white-space: normal; min-width: 200px; overflow-wrap: anywhere; }
/* Ссылка на сам сайт клиента (открывается в новом окне) — со стрелкой; inline-block — без подчёркивания */
.ext { display: inline-block; margin-left: 3px; color: var(--muted); font-size: 0.85em; text-decoration: none; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; position: relative; }
/* На телефоне таблицу прокручиваем вбок, а не сжимаем до букв в столбик */
.table-wrap > .admin-table { min-width: 640px; }
.admin-table input[type=text] { min-height: 40px; padding: 8px 10px; min-width: 70px; }
/* Строки с полями ввода (таблицы тарифов): подписи и галочки — по центру строки, вровень с полями */
.admin-table tr:has(input:not([type=hidden])) > td { vertical-align: middle; }
/* Меню «столбцы» над таблицей и перетаскивание ширины столбцов (admin-tables.js) */
.table-tools { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 8px 16px; margin: 8px 0 4px; }
.table-tools > p { margin: 0; }
.cols-menu { position: relative; margin-left: auto; }
.cols-menu summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px;
  border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 14px;
  cursor: pointer; list-style: none; user-select: none; }
.cols-menu summary::-webkit-details-marker { display: none; }
.cols-menu summary::after { content: "▾"; font-size: 12px; }
.cols-menu summary:hover, .cols-menu[open] summary { color: var(--ink); box-shadow: inset 0 0 0 1px var(--field); }
.cols-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cols-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: max-content; min-width: 220px;
  max-width: min(320px, calc(100vw - 32px)); padding: 12px 16px; background: var(--card);
  border-radius: var(--radius-s); box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(27, 27, 26, .14); }
.cols-pop p { margin: 0 0 4px; }
.cols-pop .check { margin: 6px 0; align-items: center; }
.cols-pop .btn { margin-top: 10px; }
.col-resize { position: absolute; top: 0; right: 0; bottom: 0; width: 10px; cursor: col-resize; touch-action: none;
  user-select: none; }
.col-resize::after { content: ""; position: absolute; top: 8px; bottom: 8px; right: 3px; width: 2px; border-radius: 1px; }
.admin-table th:hover .col-resize::after { background: var(--line); }
.col-resize:hover::after, .col-resize.active::after { background: var(--field); }
.col-resize:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.col-resizing, .col-resizing * { cursor: col-resize !important; user-select: none; }
@media (pointer: coarse) { .col-resize { width: 18px; } .col-resize::after { background: var(--line); } }
/* Ширина задана вручную: столбцы не раздвигаются по содержимому, не влезающее — под многоточием */
.admin-table.cols-fixed th, .admin-table.cols-fixed td { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.admin-table th[hidden], .admin-table td[hidden] { display: none; }
.admin-table.kv td:first-child { color: var(--muted); width: 40%; }
/* Карточки «показатель — значение» не прокручиваются: текст в них переносится по словам */
.admin-table.kv td { white-space: normal; overflow-wrap: break-word; }
.compare-edit td:first-child input { min-width: 240px; }
/* Английский текст ячейки — под русским */
.compare-edit .input-en { margin-top: 4px; }
.nowrap { white-space: nowrap; }
/* Кнопки-значки рядом с текстом: «скопировать» у промокодов, «открыть сайт в новом окне» у сайтов в админке */
.copy-btn, .ext-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px;
  margin-left: 4px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; vertical-align: middle; cursor: pointer; }
.copy-btn:hover, .copy-btn:focus-visible, .ext-btn:hover, .ext-btn:focus-visible { background: var(--line); color: var(--ink); }
.ext-btn { text-decoration: none; }
.state-active { background: #e7f5ec; color: var(--ok); }
.state-scheduled { background: #fff7d6; color: #6b5300; }
.state-expired, .state-cancelled { background: var(--line); color: var(--muted); }
.faq-admin { padding-left: 22px; }
.faq-admin li { margin: 8px 0; }
.section-title { flex: 1 1 240px; font-weight: 700; }
.admin-faq { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.code-area { min-height: 320px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.placeholders dt { margin-top: 8px; }
.placeholders dd { margin: 0; }
@media (max-width: 860px) {
  .admin-stats, .admin-faq { grid-template-columns: 1fr; }
}

/* Финансы: график выручки. Цвета видов подписок — первые три цвета проверенной палитры,
   различимы и при дальтонизме; текст всегда обычного цвета, цвет — только у столбиков */
.fin-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.fin-head h3 { margin: 0; }
.fin-periods { display: flex; flex-wrap: wrap; gap: 6px; }
.fin-range { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; font-size: 14px;
  color: var(--muted); }
.fin-range label { display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 400; }
/* Поля месяца и кнопка — одной высоты и по одной линии: у поля type=month свои внутренние отступы */
.fin-range input, .fin-range .btn { box-sizing: border-box; height: 36px; min-height: 36px; }
.fin-range input { width: auto; margin: 0; padding: 0 10px; font-size: 14px; font-family: inherit; line-height: 1; }
.fin-total { margin: 12px 0 0; }
/* Форма промокода: шаги, варианты «что даёт», поле внутри строки с переключателем */
.promo-form h3 { margin: 20px 0 8px; font-size: 16px; }
.promo-form h3:first-child { margin-top: 0; }
.promo-form .label { font-weight: 600; margin: 0 0 6px; }
.promo-kinds label.check { margin-bottom: 8px; }
.promo-inline { display: inline-block; width: 9em; margin: 0 0 0 6px; padding: 4px 8px; font-size: 14px; }
.fin-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; padding: 0; margin: 16px 0 4px;
  font-size: 14px; color: var(--muted); }
.fin-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
/* На узком экране график прокручивается вбок и открывается с конца — с последних месяцев */
.fin-chart-wrap { overflow-x: auto; direction: rtl; }
.fin-chart { display: block; width: 100%; min-width: 560px; height: auto; direction: ltr; }
.fin-s-tariff { fill: #2a78d6; background: #2a78d6; }
.fin-s-api { fill: #eb6834; background: #eb6834; }
.fin-s-addon { fill: #1baf7a; background: #1baf7a; }
/* Оплачено вперёд: бледные части столбиков и будущие месяцы правее пунктира «сегодня» */
.fin-ahead { opacity: .4; }
.fin-today { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.fin-grid { stroke: var(--line); stroke-width: 1; }
.fin-baseline { stroke: var(--field); stroke-width: 1; }
.fin-axis { fill: var(--muted); font-size: 12px; }
.fin-value { fill: var(--ink); font-size: 12px; font-weight: 600; }
.fin-hit { fill: transparent; }
.fin-col:hover .fin-hit { fill: var(--bg); }
.fin-num td { font-variant-numeric: tabular-nums; }
.table-wrap > .admin-table.fin-narrow { min-width: 420px; }
.table-wrap > .admin-table.fin-wide { min-width: 860px; }
.stat .fin-delta { display: inline; margin: 0; font-size: inherit; }
.fin-delta.up { color: var(--ok); }
.fin-delta.down { color: var(--accent-text); }
.fin-meter { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: #cde2fb;
  vertical-align: middle; overflow: hidden; }
.fin-meter i { display: block; height: 100%; background: #2a78d6; }

/* --- Хлебные крошки --- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 20px; color: var(--muted); font-size: 14px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs + section { margin-top: 24px; }

/* --- Реестр: карточки реестров, страница записи --- */
.registry-cards { margin-top: 16px; }
.registry-card { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.registry-card b { font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--accent); }
.registry-card h2 { font-size: 20px; margin: 0; }
.registry-card:hover h2 { text-decoration: underline; }
/* Имена в таблице подчёркнуты: по щелчку открывается карточка записи */
.entries a, .entries .link-button { text-decoration: underline; text-decoration-color: var(--field);
  text-underline-offset: 3px; }
.entries a:hover, .entries .link-button:hover { color: var(--accent); text-decoration-color: currentColor; }
.entry-title { overflow-wrap: anywhere; font-size: clamp(28px, 4vw, 44px); }
/* Карточка записи во всплывающем окне реестра */
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left;
  cursor: pointer; overflow-wrap: anywhere; }
.entry-card { width: min(640px, calc(100vw - 2 * var(--gutter))); max-height: calc(100vh - 48px);
  padding: 0; border: 0; border-radius: var(--radius); background: var(--card); color: var(--ink); }
.entry-card::backdrop { background: rgba(27, 27, 26, .45); }
.entry-card-body { padding: 32px; }
.entry-card-title { margin: 0 40px 12px 0; overflow-wrap: anywhere; }
.entry-card-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border: 0;
  border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.entry-card-close:hover { background: var(--line); }
.entry-card-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 0; }
@media (max-width: 560px) { .entry-card-body { padding: 24px 20px; } }
.kv-table { width: 100%; border-collapse: collapse; }
.kv-table td, .kv-table th { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top;
  text-align: left; overflow-wrap: anywhere; }
.kv-table td:first-child { color: var(--muted); width: 38%; }
.kv-table th { color: var(--muted); font-size: 14px; font-weight: 600; }
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-list a { color: var(--ink); }

/* --- Статьи --- */
.guide-card { text-decoration: none; display: flex; flex-direction: column; }
.guide-card:hover h2, .guide-card:hover h3 { text-decoration: underline; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.article { max-width: 820px; }
.article h1.page { font-size: clamp(30px, 4vw, 44px); }
.article h2 { font-size: clamp(24px, 3vw, 30px); margin-top: 40px; }
.article h3 { margin-top: 24px; }
.article p, .article li { overflow-wrap: anywhere; }
.article .example { background: var(--bg); border-radius: var(--radius-s); padding: 16px 20px; margin: 16px 0; }
.article .faq { background: var(--bg); }
.article .guide-table td:first-child { width: 32%; }
.article .compare { min-width: 520px; table-layout: auto; }
.tldr { background: var(--accent-soft); border-radius: var(--radius-s); padding: 4px 20px; margin: 20px 0; }
.disclaimer { margin-top: 32px; }
.article-aside { display: grid; gap: 16px; position: sticky; top: 80px; }
.article-aside .card { padding: 24px; }
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}

/* Уведомление о файлах cookie — внизу экрана, пока посетитель не выберет */
.cookie-banner { position: fixed; z-index: 30; left: 16px; right: 16px; bottom: 16px; max-width: 760px;
  margin: 0 auto; padding: 20px 24px; background: var(--card); border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(0, 0, 0, .12); font-size: 14px; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 14px; }
.cookie-banner .row { gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .cookie-banner { padding: 16px; } .cookie-banner .btn { flex: 1 1 auto; } }
@media print { .cookie-banner { display: none; } }

/* Админка, журнал согласий: фильтры выгрузки */
.consent-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; }
.consent-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.consent-filters .row { flex-basis: 100%; }
