/* Глобальные стили longcatdev.com.
   Айдентика текущего сайта: белый фон, фирменный зелёный, пиксель-арт,
   светло-серые и тёмные карточки. Один файл, БЭМ-классы, без утилитарной каши.
   Содержание: база → кнопки и ссылки → шапка → герой → секции → подвал → адаптив. */

/* Glober — шрифт ВСЕГО текста на сайте (как у Тильды: .t-text/.t-name/
   .t-descr все с 'globerbold'). Два объявления на один файл, чтобы
   браузер не рисовал синтетическую жирность поверх и так жирного знака. */
@font-face {
  font-family: 'Glober';
  src: url('/fonts/glober-bold.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Glober';
  src: url('/fonts/glober-bold.woff') format('woff');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #07b86d;         /* фирменный зелёный */
  --orange: #fa876b;        /* вторичный акцент: почта, «свяжитесь с нами» */
  --blue: #0088cc;          /* кнопка телеграм-канала */
  --dark: #222;             /* тёмные баннеры */
  --dark-card: #353535;     /* тёмные карточки */
  --light-card: #f5f5f6;    /* светлые карточки */
  --pixel: #e1e1e1;         /* декоративные пиксели */
  --text: #222;
  --muted: #757575;

  --font-heading: 'Glober', Arial, sans-serif;
  --font-body: 'Glober', Arial, sans-serif;

  --green-btn: #009966;      /* кнопка «Запросить цену» темнее общего зелёного */

  --content-width: 1200px;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.section-title {
  font-size: 40px;
  text-align: center;
  margin-bottom: 48px;
}

.section-more {
  margin: 48px 0 0;
  text-align: center;
}

/* ---------- Ссылки и кнопки ---------- */

.green-link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.orange-link {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Термины с подсказкой (MVP, T&M, Fixed, CRM*): зелёное подчёркивание,
   при наведении всплывает зелёная пилюля с пояснением — как в оригинале */
.hint {
  position: relative;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: help;
}

.hint__tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 8px);
  z-index: 60;
  width: 300px;
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.hint:hover .hint__tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Кнопки на сайте КВАДРАТНЫЕ (решение владельца 22.07.2026) —
   пилюль нет нигде, даже там, где у Тильды был радиус 30px */
.button-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 44px;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease-in-out;
}

.button-green:hover {
  background: #069a5c;
}

/* Кнопки шапки: как t-btnflex_sm Тильды — 50px, 14px, капс, радиус 5px */
/* «Запросить цену» в шапке — стиль «Рассчитать стоимость», компактнее */
.site-header__cta {
  height: 46px;
  padding: 0 28px;
}

.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 30px;
  border: 2px solid currentColor;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease-in-out;
}

.outline-button:hover {
  opacity: 0.7;
}

.outline-button--green { color: var(--green-btn); }

.outline-button--blue {
  color: var(--blue);
  border-width: 1px;
}

/* «Перейти в блог»: чёрная рамка 3px, без скругления, без капса */
.outline-button--dark {
  color: var(--text);
  border-width: 3px;
  border-radius: 0;
  text-transform: none;
}

/* «Написать в телеграм»: клик — в ТГ, наведение — выпадашка контактов */
.header-contacts {
  position: relative;
}

.header-contacts__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.header-contacts__toggle:hover {
  color: var(--green);
}

.header-contacts__toggle svg {
  transition: transform 0.15s;
}

.header-contacts:hover .header-contacts__toggle svg {
  transform: rotate(180deg);
}

.header-contacts__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  min-width: 220px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  display: none;
}

.header-contacts:hover .header-contacts__dropdown,
.header-contacts:focus-within .header-contacts__dropdown {
  display: block;
}

.header-contacts__item {
  padding: 10px 18px;
}

.header-contacts__item span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--muted);
}

.header-contacts__item a {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}

.header-contacts__item a:hover {
  color: var(--green);
}

.round-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000;
}

.round-icon:hover {
  background: #333;
}

.green-circle {
  display: block;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: var(--green);
}

.green-circle--big {
  width: 45px;
  height: 45px;
}

/* ---------- Шапка ---------- */

.site-header {
  background: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 84px;
}

.site-header__logo {
  margin-right: 8px;
  flex-shrink: 0;
}

.site-nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  display: inline-block;
  padding: 10px 12px;
  font-size: 16px;
  text-decoration: none;
  cursor: default;
}

a.site-nav__link {
  cursor: pointer;
}

.site-nav__item:hover > .site-nav__link {
  color: var(--green);
}

/* пункт «Наше медиа» — заметная плашечка фирменного цвета */
a.site-nav__link--media {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 8px 14px;
  border-radius: 5px;
  background: #e3f6ec;
  color: var(--green);
  font-weight: 700;
}

/* селектор усилен: общий ховер меню (.site-nav__item:hover > ...)
   иначе перекрашивает текст в зелёный на зелёной же заливке */
.site-nav__item:hover > a.site-nav__link--media,
a.site-nav__link--media:hover {
  background: var(--green);
  color: #fff;
}

.site-nav__link--media svg {
  flex: none;
}

.site-nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 310px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  display: none;
}

.site-nav__item:hover .site-nav__dropdown,
.site-nav__item:focus-within .site-nav__dropdown {
  display: block;
}

.site-nav__dropdown a {
  display: block;
  padding: 9px 18px;
  text-decoration: none;
}

.site-nav__dropdown a:hover {
  color: var(--green);
}

/* Дубль пункта «Наше медиа» для мобильной шапки: на десктопе он живёт
   в меню, на узком экране переезжает в строку с телефоном и кнопкой.
   Переключается видимостью, а не переносом узла скриптом */
.site-header__media {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--dark);
  text-decoration: none;
  white-space: nowrap;
}

.site-header__media:hover {
  color: var(--green);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ---------- Герой ---------- */

.hero {
  position: relative;
  padding: 48px 0 64px;
  overflow: hidden;
}

.hero__pixels {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero__typed {
  min-height: 1.6em;
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--green);
}

.hero__cursor {
  animation: cursor-blink 1s steps(1) infinite;
  color: var(--green);
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

.hero__title {
  max-width: 1060px;
  font-size: 56px;
  margin: 0 0 24px;
}

.hero__title-wrap {
  position: relative;
  max-width: 1060px;
}

.hero__title u {
  color: var(--green);
  text-underline-offset: 6px;
}

.hero__title-top {
  color: var(--text);
}

.hero__title-link {
  text-decoration: none;
}

/* всплывашка держится и при наведении на подчёркнутую ссылку */
.hero__title-wrap:has(.hero__title-link:hover) .hero__tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Всплывашка при наведении на зелёную часть заголовка (как в оригинале) */
.hero__tip {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 55;
  width: max-content;
  max-width: 640px;
  padding: 20px 28px;
  text-align: left;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: normal;
  line-height: 1.4;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.hero__tip-row {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

.hero__tip-row b {
  color: #fff;
}

.hero__tip-row--more {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.65);
}

.hero__title-wrap:has(u:hover) .hero__tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.hero__subtitle {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  color: var(--muted);
}

/* пиксель-разделитель между «CRM №1» и «с 2010 года» */
.hero__subtitle-sep {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 18px 2px;
  background: var(--green);
}

.hero__subtitle strong {
  color: var(--green);
}

.hero__subtitle-link {
  margin: 4px 0 0 200px;
  font-size: 14px;
}

/* Дубль ссылки «по количеству работ» для мобильной раскладки подзаголовка;
   на десктопе скрыт — там отдельная строка со сдвигом под «CRM №1» */
.hero__subtitle-inline {
  display: none;
}

.hero__subtitle-link a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Раскладка оригинала: слово по центру канвы, абзац справа, слева пусто */
.hero__fact {
  position: relative;
  margin: 56px 0 0;
  min-height: 130px;
}

.hero__fact svg {
  display: block;
  width: 331px;
  margin: 0 auto;
}

.hero__fact p {
  position: absolute;
  top: 12px;
  left: 66%;
  width: 330px;
  max-width: 33%;
  margin: 0;
  font-size: 15px;
}

.hero__cta {
  margin-top: 48px;
  text-align: center;
}

.hero__note {
  max-width: 420px;
  margin: 14px auto 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Бегущая строка направлений ---------- */

.ticker {
  overflow: hidden;
  padding: 8px 0 40px;
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 20s linear infinite;
}

.ticker__track:hover {
  animation-play-state: paused;
}

.ticker__list {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0 10px;
}

.ticker__list a {
  display: inline-block;
  padding: 16px 36px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.ticker__list a:hover {
  color: var(--green);
  border-color: var(--green);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Анимации (как на старом сайте) ---------- */

/* Появление блока при скролле: подъём с 30px + проявление, каскад через
   --reveal-delay. Класс reveal--on ставит js/animate.js. Без JS всё видно. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--reveal-delay, 0ms);
  }

  .reveal--on {
    opacity: 1;
    transform: none;
  }

  /* Пиксели «Факта» дрожат по горизонтали синхронно, у каждого своя
     амплитуда 9–14px (--amp раздаёт js). Спека: влево 100мс, вправо
     400мс, назад 100мс, пауза 1500мс — цикл 2,1 с, бесконечно. */
  .fact-pixels rect {
    transform-box: fill-box;
  }

  .fact-pixels rect.pixel-shake {
    animation: pixel-shake 2.1s linear infinite;
  }

  @keyframes pixel-shake {
    0%    { transform: translateX(0); }
    4.8%  { transform: translateX(calc(var(--amp, 11px) * -1)); }
    23.8% { transform: translateX(var(--amp, 11px)); }
    28.6% { transform: translateX(0); }
    100%  { transform: translateX(0); }
  }

  /* Россыпь пикселей героя: исчезает, телепортируется и дрейфует назад */
  .hero__pixels {
    animation: scatter-drift 5s linear infinite;
  }

  @keyframes scatter-drift {
    0%   { transform: translateX(-50%) translate(0, 0); opacity: 1; }
    54%  { transform: translateX(-50%) translate(0, 0); opacity: 1; }
    56%  { transform: translateX(-50%) translate(0, 0); opacity: 0; }
    58%  { transform: translateX(-50%) translate(-85px, 89px); opacity: 0; }
    62%  { transform: translateX(-50%) translate(-85px, 89px); opacity: 1; }
    76%  { transform: translateX(-50%) translate(0, 0); opacity: 1; }
    100% { transform: translateX(-50%) translate(0, 0); opacity: 1; }
  }

  /* Зелёные круги: бесконечные циклы, как в спеках Тильды */

  /* Круги тёмной карточки и баннера: подскок с долгой паузой
     (спека: my 0→20 за 400мс, пауза 2600мс, loop) */
  .green-circle {
    animation: circle-bob 3s ease-in-out infinite;
  }

  @keyframes circle-bob {
    0%, 100% { transform: translateY(0); }
    7%       { transform: translateY(-20px); }
    14%      { transform: translateY(0); }
  }


  /* Квадратики сегментов «ходят» по пиксельной сетке шагами 20px
     (спеки: шаг 400мс, паузы 1000–2600мс, маршруты разные, loop) */
  .dark-card__pixels rect {
    transform-box: fill-box;
  }

  .dark-card__pixels .walk-a { animation: walk-a 3.4s linear infinite; }
  .dark-card__pixels .walk-b { animation: walk-b 4.8s linear infinite; }
  .dark-card__pixels .walk-c { animation: walk-c 4.8s linear infinite; }
  .dark-card__pixels .walk-d { animation: walk-d 4.4s linear infinite; }

  @keyframes walk-a { /* вниз — пауза — вверх */
    0%          { transform: translate(0, 0); }
    11.8%       { transform: translate(0, 20px); }
    88.2%       { transform: translate(0, 20px); }
    100%        { transform: translate(0, 0); }
  }

  @keyframes walk-b { /* вниз → вправо → вниз — пауза — обратно */
    0%    { transform: translate(0, 0); }
    8.3%  { transform: translate(0, 20px); }
    16.7% { transform: translate(20px, 20px); }
    25%   { transform: translate(20px, 40px); }
    45.8% { transform: translate(20px, 40px); }
    54.2% { transform: translate(20px, 20px); }
    62.5% { transform: translate(0, 20px); }
    70.8% { transform: translate(0, 0); }
    100%  { transform: translate(0, 0); }
  }

  @keyframes walk-c { /* вниз → вправо → вправо — пауза — обратно */
    0%    { transform: translate(0, 0); }
    8.3%  { transform: translate(0, 20px); }
    16.7% { transform: translate(20px, 20px); }
    25%   { transform: translate(40px, 20px); }
    45.8% { transform: translate(40px, 20px); }
    54.2% { transform: translate(20px, 20px); }
    62.5% { transform: translate(0, 20px); }
    70.8% { transform: translate(0, 0); }
    100%  { transform: translate(0, 0); }
  }

  @keyframes walk-d { /* квадратом: вниз → вправо → вверх — пауза — влево */
    0%    { transform: translate(0, 0); }
    9.1%  { transform: translate(0, 20px); }
    18.2% { transform: translate(20px, 20px); }
    27.3% { transform: translate(20px, 0); }
    50%   { transform: translate(20px, 0); }
    59.1% { transform: translate(0, 0); }
    100%  { transform: translate(0, 0); }
  }

  /* Странники: круги, гуляющие между блоками секции «С кем работаем».
     Горизонтальный: через весь тёмный ряд с сжатием до 0.7 (спека:
     mx 33→1098 за 1400мс, пауза 1000мс, обратно). Вертикальный: на 254px
     вверх с ростом 1.64 (спека id 1707680636980). */
  .clients__runner {
    position: absolute;
    z-index: 5;
    border-radius: 50%;
    background: var(--green);
    pointer-events: none;
  }

  .clients__runner--h {
    width: 43px;
    height: 43px;
    left: 41px;
    bottom: -32px;
    animation: runner-h 5.6s ease-in-out infinite;
  }

  @keyframes runner-h {
    0%, 6%    { left: 41px; transform: scale(1); }
    31%       { left: calc(100% - 90px); transform: scale(0.7); }
    49%       { left: calc(100% - 90px); transform: scale(0.7); }
    74%       { left: 41px; transform: scale(1); }
    100%      { left: 41px; transform: scale(1); }
  }

  .clients__runner--v {
    width: 45px;
    height: 45px;
    right: 64px;
    top: 40px;
    animation: runner-v 5.8s ease-in-out infinite;
  }

  @keyframes runner-v {
    0%, 8%   { transform: translateY(0) scale(1); }
    32%      { transform: translateY(-254px) scale(1.64); }
    49%      { transform: translateY(-254px) scale(1.64); }
    73%      { transform: translateY(0) scale(1); }
    100%     { transform: translateY(0) scale(1); }
  }
}

/* ---------- Кейсы ---------- */

.cases {
  padding: 64px 0;
}

.cases__rows {
  display: grid;
  gap: 72px;
}

.case-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  /* заголовок прижат к верхнему краю гифки */
  align-items: start;
}

.case-row .case-card__title {
  margin-top: 0;
}

.case-row__lead {
  margin: 0 0 18px;
  font-size: 16px;
  color: var(--muted);
}

.case-row__fact {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid #eaeaec;
}

.case-row__facts {
  margin: 0 0 18px;
}

.case-row__fact dt {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  padding-top: 2px;
}

.case-row__fact dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
}

/* чётные ряды зеркалятся: текст слева, гифка справа */
.case-row--flip .case-card__media {
  order: 2;
}

/* под сеткой кейсов — не кнопка, а крупная текстовая ссылка */
.cases__more {
  margin: 48px 0 0;
  text-align: center;
}

.cases__more a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 27px;
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
  transition: color 0.15s;
}

.cases__more a:hover {
  color: var(--green);
}

.cases__more svg {
  color: var(--green);
  width: 12px;
  height: 20px;
  transition: transform 0.15s;
}

.cases__more a:hover svg {
  transform: translateX(5px);
}

/* акцент — на авторских пиксель-гифках: крупно, с лёгким приближением */
.case-card {
  text-align: left;
}

.case-card__media {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-card);
}

.case-card__media img {
  display: block;
  width: 100%;
  image-rendering: pixelated;
  transition: transform 0.3s ease;
}

.case-card__media:hover img {
  transform: scale(1.03);
}

.case-card__title {
  font-size: 24px;
  margin: 20px 0 8px;
}

.case-card__title a {
  color: var(--text);
  text-decoration: none;
}

.case-card__title a:hover {
  color: var(--green);
}

.case-card__text {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Чем мы выделяемся ---------- */

.features {
  padding: 64px 0;
}

/* цепочка «ТЗ → фикс → доработки → кейсы» */
.features-line {
  display: grid;
  grid-template-columns: 1fr 32px 1fr 32px 1fr 32px 1fr;
  gap: 20px;
  align-items: start;
}

.features-line__num {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.08em;
}

.features-line__step h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.features-line__step p:last-child {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* пиксельная стрелка между шагами */
.features-line__arrow {
  position: relative;
  height: 100%;
  min-height: 60px;
}

.features-line__arrow::before {
  content: '';
  position: absolute;
  top: 42px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 3px solid var(--green);
  border-right: 3px solid var(--green);
  transform: translateX(-50%) rotate(45deg);
}

.clients__intro {
  margin: -24px 0 48px;
  text-align: center;
}

.clients__dark-row {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: 20px;
}

.dark-card {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--dark-card);
  color: #fff;
  overflow: hidden;
}

.dark-card--label {
  display: flex;
  align-items: center;
}

.dark-card--label h3 {
  font-size: 26px;
  margin: 0;
}

.dark-card--label .green-circle {
  position: absolute;
  right: 36px;
  bottom: 30px;
}

.dark-card--segment {
  text-align: center;
  padding-top: 40px;
}

.dark-card__pixels {
  display: block;
  margin: 0 auto 20px;
}

.dark-card--segment h3 {
  font-size: 22px;
  margin-bottom: 6px;
}

.dark-card--segment p {
  margin: 0;
  font-size: 13px;
  color: #cfcfcf;
}

.clients__light-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2.3fr;
  gap: 20px;
  margin-top: 20px;
}

.light-card {
  padding: 32px 36px;
  border-radius: var(--radius);
  background: var(--light-card);
}

.light-card--label {
  display: flex;
  align-items: center;
}

.light-card--label h3 {
  font-size: 26px;
  margin: 0;
}

.clients__checklist {
  margin: 0;
  padding-left: 20px;
}

.clients__checklist li {
  margin: 8px 0;
  font-size: 15px;
}

.clients__banner {
  position: relative;
  margin-top: 20px;
  padding: 40px 60px;
  border-radius: var(--radius);
  background: var(--dark);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.clients__banner p {
  margin: 0;
  font-size: 16px;
}

.clients__banner .green-circle--big {
  position: absolute;
  right: 120px;
  bottom: 24px;
}

/* ---------- Пишем простым языком ---------- */

.blog-preview {
  padding: 64px 0 96px;
}

/* шапка тёмного блока медиа: слева заголовок, справа подписка */
.blog-preview__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}

.blog-preview__socials {
  flex: none;
  padding-top: 46px;
}

.blog-preview__socials-note {
  margin: 0 0 14px;
  font-size: 14px;
  color: #cfcfcf;
}

/* блок медиа — тёмный, как плашка на внутренней странице медиа */
.blog-preview {
  padding: 64px 0 72px;
  background: #222;
  color: #fff;
}

.blog-preview .section-title {
  text-align: left;
  color: #fff;
}

/* карточки внутри тёмного блока остаются светлыми — текст обычный */
.blog-preview .feed-card {
  color: var(--text);
}

.blog-preview .cases__more a {
  color: #fff;
}

.blog-preview .cases__more a:hover {
  color: var(--green);
}

.blog-preview__uptitle {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.blog-preview__accent {
  color: var(--green);
}

/* Заголовок медиа на главной ведёт в ленту */
.blog-preview__link {
  color: inherit;
  text-decoration: none;
}

.blog-preview__link:hover {
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 3px;
}

.blog-preview__intro {
  max-width: 560px;
  margin: -20px 0 40px;
  font-size: 17px;
  line-height: 1.55;
  color: #cfcfcf;
}

.blog-preview__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---------- Статья блога ---------- */

.article-hero {
  background: #eff0f5;   /* светлая шапка статьи, как в оригинале */
  padding: 56px 0;
}

.article-hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.article-hero__breadcrumb {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-hero__breadcrumb a {
  color: var(--green);
  text-decoration: none;
}

.article-hero__breadcrumb a:hover {
  text-decoration: underline;
}

.article-hero__text h1 {
  font-size: 38px;
  margin: 0 0 18px;
}

/* Видимый титул шапки для страниц, где у старой версии не было h1
   (например /crm_leads: h1_count = 0 в снапшоте, SEO 1:1) */
.article-hero__display-title {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  font-size: 38px;
  margin: 0 0 18px;
}

.article-hero__intro {
  margin: 0;
  font-size: 17px;
  color: var(--text);
  opacity: 0.7;
}

.article-hero__cover {
  border-radius: var(--radius);
  /* маленькие тильдовские гифки (≈380px) растягиваем на колонку;
     пиксель-арт это переживает нормально */
  width: 100%;
  height: auto;
}

/* Текстовая колонка шапки не распирается длинными ссылками на посты:
   без min-width:0 grid-колонка росла по контенту, сжимая обложку */
.article-hero__text {
  min-width: 0;
}

.article {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 64px;
  /* края сетки совпадают с логотипом и кнопкой шапки */
  justify-content: space-between;
  padding: 56px 20px 24px;
}

.article__body {
  font-size: 17px;
  line-height: 1.65;
  /* Длинная ссылка целиком одним «словом» (адрес прототипа в Axure, ссылка
     на документацию Telegram) не переносится и уезжает за край экрана.
     break-word ломает только то, что не влезает, обычный текст не трогает */
  overflow-wrap: break-word;
}

.article__lead {
  font-size: 19px;
}

.article__body h2 {
  font-size: 27px;
  margin: 48px 0 16px;
  scroll-margin-top: 90px;
}

.article__body section:first-child p:first-child {
  margin-top: 0;
}

.article__body p {
  margin: 0 0 16px;
}

.article__body a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* кнопки и плитки кейсов внутри колонки — не текстовые ссылки */
.article__body a.button-green,
.article__body a.outline-button,
.article__body a.case-tile {
  text-decoration: none;
}

.article__body a.case-tile {
  color: #fff;
}

.article__body a.button-green {
  color: #fff;
}

.article__body a.outline-button--dark {
  color: var(--text);
}

.article__body ul,
.article__body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.article__body li {
  margin: 8px 0;
}

.article__body li::marker {
  color: var(--green);   /* зелёные маркеры — фирменный акцент */
}

.article__body figure {
  margin: 24px 0;
}

.article__body figure img {
  border-radius: 10px;
  border: 1px solid #eee;
}

/* svg-иконки из старой вёрстки — не растягивать на всю колонку */
.article__body figure img[src$=".svg"] {
  width: 72px;
  border: 0;
}

.article__body figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.article-callout {
  margin: 24px 0;
  padding: 20px 26px;
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--light-card);
  font-size: 15.5px;
}

.article-quote {
  margin: 24px 0;
  padding: 4px 0 4px 26px;
  border-left: 4px solid var(--green);
  font-size: 18px;
  font-weight: 500;
}

.article-table {
  margin: 24px 0;
  overflow-x: auto;
}

.article-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.article-table td,
.article-table th {
  padding: 10px 14px;
  border: 1px solid #e6e6e6;
  vertical-align: top;
}

.article-table tr:first-child td,
.article-table th {
  background: var(--light-card);
  font-weight: 700;
}

.article-video {
  display: block;
  width: 100%;
  margin: 16px 0 24px;
  border-radius: 10px;
  background: #111;
}

.article-video-note {
  font-weight: 700;
}

/* Временный макет услуг (линейный, до редизайна этапа 5) */
.service-hero {
  padding: 40px 0 0;
}

/* у услуг лишний прогал между заголовком и контентом не нужен */
.article--service {
  padding-top: 8px;
}

/* заголовок в той же сетке, что и контент — левые края совпадают */
.service-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 64px;
  justify-content: space-between;
}

.service-hero h1 {
  font-size: 40px;
}

@media (max-width: 1000px) {
  .service-hero__inner { grid-template-columns: 1fr; }
}

.service-lead {
  font-size: 18px;
  opacity: 0.75;
}

.service-uptitle {
  margin: 32px 0 4px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Липкое оглавление справа (референс — molyanov.ru) */
.article__aside {
  min-width: 0;
}

/* Оглавление в сайдбаре — в стиле внутритекстового содержания:
   без плашки, нумерованный список, зелёные подчёркнутые ссылки.
   Сворачивается нативным details по клику на заголовок. */
/* Стопка сайдбара: оглавление + перелинковка липнут вместе.
   Если стопки нет (ServiceLayout ещё без неё), .toc липнет сам. */
.aside-stack {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-stack .toc {
  position: static;
}

.toc {
  position: sticky;
  top: 24px;   /* шапка не липкая — прижимаем оглавление к верху экрана */
  /* та же карточка, что и у блоков сайдбара на /blog (.media-side) */
  padding: 24px;
  border-radius: var(--radius);
  background: var(--light-card);
}

/* Скролл оглавления и результата ИИ-подбора не прячем: видно, что список
   длиннее блока. На macOS системная полоса всплывает только во время
   прокрутки, поэтому рисуем свою.
   ВАЖНО: scrollbar-width/-color в Chrome 121+ отключают ::-webkit-scrollbar
   (скроллбар снова становится системным прячущимся) — поэтому стандартные
   свойства отдаём только Firefox-у, где webkit-стилей нет. */
@supports selector(::-webkit-scrollbar) {
  .toc::-webkit-scrollbar,
  .ai-match__result::-webkit-scrollbar {
    width: 8px;
  }

  .toc::-webkit-scrollbar-track,
  .ai-match__result::-webkit-scrollbar-track {
    background: transparent;
  }

  .toc::-webkit-scrollbar-thumb,
  .ai-match__result::-webkit-scrollbar-thumb {
    background: #c9c9cd;
    border-radius: 4px;
  }

  .toc::-webkit-scrollbar-thumb:hover,
  .ai-match__result::-webkit-scrollbar-thumb:hover {
    background: #aeaeb2;
  }
}

@supports not selector(::-webkit-scrollbar) {
  .toc,
  .ai-match__result {
    scrollbar-width: thin;
    scrollbar-color: #c9c9cd transparent;
  }
}

.toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;   /* убираем штатный треугольник summary */
  user-select: none;
}

.toc__title::-webkit-details-marker {
  display: none;
}

.toc__chevron {
  flex: none;
  color: var(--muted);
  transition: transform 0.2s;
}

.toc__title:hover .toc__chevron {
  color: var(--text);
}

.toc__box:not([open]) .toc__title {
  margin-bottom: 0;
}

/* Плавное сворачивание/разворачивание — чистый CSS для details
   (в браузерах без поддержки просто складывается без анимации) */
.toc__box {
  interpolate-size: allow-keywords;
}

.toc__box::details-content {
  block-size: 0;
  overflow-y: clip;
  transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
}

.toc__box[open]::details-content {
  block-size: auto;
}

.toc__box:not([open]) .toc__chevron {
  transform: rotate(-90deg);
}

.toc__list {
  margin: 0;
  padding: 0 0 0 24px;
  /* скроллится только список пунктов: заголовок «Содержание» со стрелкой
     остаётся на месте (правка владельца). Высота ~2/3 окна минус шапка
     блока и запас, чтобы не наезжать на плашки ниже; ещё -50px
     по правке владельца от 25.07.2026 */
  max-height: calc(66vh - 210px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.toc__list li {
  margin: 0 0 10px;
}

.toc__list li::marker {
  color: var(--green);
  font-size: 14px;
}

.toc__list a {
  font-size: 14px;
  line-height: 1.45;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.toc__list a:hover {
  color: var(--text);
}

.toc__list a.toc__link--active {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

/* «Остались вопросы?» — 1:1 с t718 текущего сайта */
.cta718 {
  padding: 48px 0 88px;
}

.cta718__title {
  max-width: 760px;
  margin: 0 auto 40px;
  font-size: 22px;
  font-weight: 400;
  text-align: center;
}

.cta718__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Колонки грида по умолчанию не сжимаются ниже своего содержимого: без этого
   длинные плейсхолдеры в форме распирали блок за край экрана */
.cta718__columns > * {
  min-width: 0;
}

/* На узком экране колонки в столбик: рядом им не хватает места */
@media (max-width: 760px) {
  .cta718__columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.cta718__phones {
  margin: 0 0 24px;
  font-size: 28px;
  line-height: 1.5;
}

.cta718__phones a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cta718__email {
  color: var(--text);
}

.cta718__messengers {
  margin: 0;
  font-size: 16px;
}

.cta718__messengers a {
  color: #1155cc;
  text-decoration: underline;
}

.cta718__form .cta718__input {
  width: 100%;
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid #c7c7c7;
  border-radius: 5px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}

.cta718__form textarea.cta718__input {
  height: 102px;
  resize: vertical;
}

.cta718__input:focus {
  outline: 2px solid var(--green);
  outline-offset: -1px;
  border-color: var(--green);
}

.cta718__agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 18px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.cta718__agree input {
  margin-top: 2px;
  accent-color: var(--green);
}

.cta718__agree a {
  color: inherit;
  text-decoration: underline;
}

/* Успех отправки — непропускаемый: сплошной фирменный зелёный с галочкой.
   Бледную карточку 16-м шрифтом на телефоне не замечали, и казалось,
   что заявка не ушла (владелец, 26.07.2026) */
.cta718__success {
  margin: 0;
  padding: 24px;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.cta718__success::before {
  content: '✓';
  display: inline-block;
  margin-right: 10px;
  font-size: 22px;
}

/* После успешной отправки от формы остаётся только зелёная плашка:
   поля, подпись и галочка согласия прячутся классом is-sent (атрибут
   hidden не работал — его перебивал display: flex строки полей) */
.ai-match__lead.is-sent .ai-match__contact-row,
.ai-match__lead.is-sent .ai-match__lead-hint,
.ai-match__lead.is-sent .ai-match__agree {
  display: none;
}

/* Тот же непропускаемый успех у формы контактов в ИИ-подборе */
.ai-match__note.is-done:not(:empty) {
  background: var(--green);
  border-left-color: #059357;
  color: #fff;
  font-weight: 600;
}

.ai-match__note.is-done:not(:empty)::before {
  content: '✓ ';
}

/* ---------- Медиа /blog ---------- */

/* Верх — тёмный editorial (выбор владельца из трёх вариантов) */
.media-hero {
  background: #111;
  color: #fff;
  padding: 72px 0;
  margin-bottom: 48px;
}

.media-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: center;
}

.media-hero__uptitle {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.media-hero h1 {
  max-width: 900px;
  font-size: 62px;
  line-height: 1.05;
  margin: 0 0 24px;
}

.media-hero h1 span {
  color: var(--green);
}

.media-hero__text {
  max-width: 560px;
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: #bdbdbd;
}

/* Соцсети — плитки-квадратики справа */
.media-hero__socials {
  position: relative;
  z-index: 2;
  max-width: 200px;
}

.media-hero__socials-note {
  margin: 0 0 16px;
  font-size: 13px;
  color: #8a8a8a;
}

.social-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #2e2e2e;
  border: 1px solid #444;
  color: #fff;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.social-tile:hover {
  background: var(--green);
  border-color: var(--green);
}

.social-tile--text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.media-hero__pixels {
  position: absolute;
  left: 46%;
  bottom: -56px;
  pointer-events: none;
  opacity: 0.85;
}

/* Плашка «Зачем вам это читать?» — закрывается крестиком навсегда */

.why-read {
  position: relative;
  margin-bottom: 40px;
  padding: 28px 64px 28px 32px;
  border-radius: var(--radius);
  background: var(--light-card);
  border-left: 4px solid var(--green);
}

.why-read__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.why-read__close:hover {
  color: var(--text);
}

.why-read__title {
  font-size: 21px;
  margin-bottom: 10px;
}

.why-read__text {
  max-width: 860px;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.8;
}

/* Сетка как у статьи: лента + липкий сайдбар справа */

.media-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  padding-top: 8px;
  padding-bottom: 96px;
}

/* Приглашение к ИИ-подбору: чистый текст без подложки + зелёная кнопка */
.ai-match-invite {
  margin-bottom: 32px;
}

.ai-match-invite__text {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
}

/* Кликабельная фраза-подсказка: открывает попап с видео-примером.
   Именно <a>, не <button>: кнопка — атомарный inline-блок, и запятая
   после неё отрывается на новую строку. */
.ai-match-invite__hl {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px dotted var(--green);
  cursor: pointer;
}

.ai-match-invite__hl:hover {
  border-bottom-style: solid;
}

.ai-match-invite__hl sup {
  font-size: 10px;
  font-weight: 700;
  margin-left: 1px;
}

/* Попап с видео-примером */
.ai-example {
  width: min(920px, calc(100vw - 40px));
  padding: 32px 36px;
  border: 0;
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
}

.ai-example::backdrop {
  background: rgba(17, 17, 17, 0.55);
}

.ai-example__title {
  font-size: 22px;
  margin-bottom: 8px;
}

.ai-example__text {
  margin: 0 0 18px;
  font-size: 14.5px;
  opacity: 0.75;
}

.ai-example__video {
  display: block;
  width: 100%;
  border-radius: 10px;
  background: #111;
}

/* Попап с видеоразбором кейса: открывается квадратиком «видео» прямо
   в списке кейсов, чтобы посмотреть ролик не уходя со страницы */
.video-popup {
  width: min(920px, calc(100vw - 40px));
  padding: 28px;
  border: 0;
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
}

.video-popup::backdrop {
  background: rgba(17, 17, 17, 0.55);
}

.video-popup__close {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 4px 8px;
  border: 0;
  background: none;
  color: #7a7d80;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.video-popup__close:hover {
  color: var(--dark);
}

.video-popup__title {
  margin: 0 30px 14px 0;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

.video-popup__player {
  display: block;
  width: 100%;
  border-radius: 10px;
  background: #111;
}

.video-popup__link {
  display: inline-block;
  margin-top: 16px;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Квадратик «видео» стал ссылкой: у остальных тегов курсор обычный,
   а этот нажимают — показываем это курсором и подсветкой */
a.tag--video {
  text-decoration: none;
  cursor: pointer;
}

a.tag--video:hover {
  background: var(--green);
}

.ai-match-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 22px;
  border: 0;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.ai-match-btn svg {
  flex-shrink: 0;
}

.ai-match-btn:hover {
  background: #069a5c;
}

/* Модалка ИИ-подбора */
.ai-match {
  width: min(640px, calc(100vw - 40px));
  /* попап целиком помещается в окно; длинный результат скроллится внутри */
  max-height: calc(100vh - 64px);
  padding: 32px 36px;
  border: 0;
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
  display: flex;
  flex-direction: column;
}

.ai-match:not([open]) {
  display: none;
}

.ai-match__result {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
}

.ai-match::backdrop {
  background: rgba(17, 17, 17, 0.55);
}

.ai-match__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
}

.ai-match__close:hover {
  color: var(--text);
}

.ai-match__title {
  font-size: 24px;
  margin-bottom: 12px;
}

.ai-match__disclaimer {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.55;
  opacity: 0.75;
}

.ai-match__form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.ai-match__form textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: -1px;
  border-color: var(--green);
}

/* Галочки «где искать»: по кейсам / по материалам */
.ai-match__scope {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  font-size: 14px;
}

.ai-match__scope-label {
  color: var(--muted);
}

.ai-match__scope-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  cursor: pointer;
}

.ai-match__scope-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
}

.ai-match__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.ai-match__fast {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Галочка согласия в закреплённой форме подбора: компактнее, чем в CTA,
   потому что форма закреплена вверху результата и каждый пиксель высоты
   отнимает место у подборки */
.ai-match__agree {
  margin: 8px 0 0;
}

/* Сообщение об отказе или лимите. Пока текста нет, блока нет вовсе;
   с текстом это заметная плашка, а не строчка мелким шрифтом внизу формы */
.ai-match__note:not(:empty) {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--green);
  background: #f1f8f4;
  font-size: 14px;
  color: var(--text);
}

.ai-match__note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--green);
}

/* Ловушка для ботов: поле есть в разметке, но недоступно человеку */
.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Пока модель думает: пиксельный лоадер + смена статусов */
.ai-match__progress {
  padding: 48px 0;
  text-align: center;
}

.pixel-loader {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.pixel-loader i {
  width: 16px;
  height: 16px;
  background: var(--green);
  animation: pixel-blink 1.2s steps(1) infinite;
}

.pixel-loader i:nth-child(2) { animation-delay: 0.4s; }
.pixel-loader i:nth-child(3) { animation-delay: 0.8s; }

@keyframes pixel-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.2; }
}

/* Результат подбора */
.ai-match__result-label {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 12px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.ai-match__result h3 {
  font-size: 18px;
  margin: 22px 0 8px;
}

.ai-match__result p,
.ai-match__result li {
  font-size: 14.5px;
  line-height: 1.55;
}

.ai-match__result ul {
  margin: 0;
  padding-left: 20px;
}

.ai-match__result li {
  margin: 8px 0;
}

.ai-match__result li::marker {
  color: var(--green);
}

.ai-match__result a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Контакты закреплены вверху результата: подборка листается под ними */
.ai-match__lead {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 16px;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
}

.ai-match__lead-title {
  /* не наезжаем на крестик закрытия в углу окна */
  max-width: calc(100% - 44px);
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.ai-match__lead-hint {
  margin: 10px 0 0;
  font-size: 13px;
  opacity: 0.7;
}

.ai-match__lead-hint a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Ответ формы: появляется только после отправки, поэтому без отступа впустую */
.ai-match__note:empty {
  margin: 0;
}

/* Подсказка, что подборка продолжается: затухание у нижнего края окна */
.ai-match__fade {
  position: sticky;
  bottom: -1px;
  height: 36px;
  margin-top: -36px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}

.ai-match__again {
  margin: 26px 0 40px; /* нижний отступ — чтобы затухание не легло на кнопку */
  padding: 11px 22px;
  border: 1px solid var(--green);
  border-radius: 5px;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--green);
  cursor: pointer;
}

.ai-match__again:hover {
  background: var(--green);
  color: #fff;
}

.ai-match__contact-row {
  display: flex;
  gap: 10px;
}

.ai-match__contact-row input {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  height: 46px;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 14px;
}

.ai-match__contact-row input:focus {
  outline: 2px solid var(--green);
  outline-offset: -1px;
  border-color: var(--green);
}

.ai-match__contact-row .button-green {
  height: 46px;
  padding: 0 24px;
  flex-shrink: 0;
}

/* На узком экране поля встают в столбик, а закреплять форму не нужно:
   она и так первое, что видно при открытии результата */
@media (max-width: 559px) {
  .ai-match__lead {
    position: static;
  }

  .ai-match__contact-row {
    flex-wrap: wrap;
  }

  .ai-match__contact-row input,
  .ai-match__contact-row .button-green {
    flex: 1 1 100%;
  }
}

.media-side {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--light-card);
}

.media-side + .media-side {
  margin-top: 20px;
}

.media-layout__aside {
  min-width: 0;
  position: sticky;
  /* шапка сайта не липкая, поэтому отступ сверху минимальный:
     при прокрутке сайдбар почти у края и сферы влезают в экран */
  top: 16px;
  align-self: start;
}

.media-side__title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
}

/* Блоки сайдбара сворачиваются, как оглавление на страницах кейсов:
   заголовок — summary с шевроном, плавное складывание на чистом CSS */
.media-side__box {
  interpolate-size: allow-keywords;
}

.media-side__box > .media-side__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.media-side__box > .media-side__title::-webkit-details-marker {
  display: none;
}

.media-side__box:not([open]) > .media-side__title {
  margin-bottom: 0;
}

.media-side__box::details-content {
  block-size: 0;
  overflow-y: clip;
  transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
}

.media-side__box[open]::details-content {
  block-size: auto;
}

.media-side__box:not([open]) .toc__chevron {
  transform: rotate(-90deg);
}

.media-side__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.media-side__link {
  text-decoration: none;  /* пункт может быть и ссылкой-якорем, не только кнопкой */
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  padding: 8px 0 8px 14px;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.media-side__link span {
  font-size: 12px;
  font-weight: 400;
}

.media-side__link:hover {
  color: var(--text);
}

.media-side__link--active {
  border-left-color: var(--green);
  color: var(--green);
}

.media-side--subscribe .media-side__text {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.button-green--small {
  height: 44px;
  padding: 0 26px;
}

/* Лента материалов */

.feed__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
}

.feed-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--light-card);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.feed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.09);
}

.feed-card__media {
  display: block;
  background: #e9e9e9;
}

/* Пропорция задана на самом img: на обёртке-ссылке (флекс-элемент
   карточки) aspect-ratio проигрывает min-height:auto, и вертикальные
   фото из ТГ растягивали карточку на всю высоту. */
.feed-card__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.feed-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 22px 20px;
}

.feed-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

/* Теги — квадратики (пиксельная айдентика, никаких пилюль) */
.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.tag--case    { background: var(--green); color: #fff; }
.tag--article { background: var(--dark);  color: #fff; }
.tag--post    { background: var(--blue);  color: #fff; }
.tag--kind    { background: var(--green); color: #fff; }  /* тип системы на карточках портфолио */
.tag--video   { background: var(--dark);  color: #fff; }  /* на странице кейса есть видеоролик */

/* Самолётик в теге «Пост» — материал из телеграм-канала */
.tag__plane {
  vertical-align: -1px;
  margin-right: 3px;
}

/* Дополнительные теги («Тут есть ИИ», «Маркетинг») — контурные квадратики */
.tag--extra {
  background: #fff;
  border: 1px solid #cfcfcf;
  color: var(--muted);
}

.feed-card__title {
  font-size: 19px;
  margin: 0 0 8px;
}

.feed-card__title a {
  text-decoration: none;
}

.feed-card__title a:hover {
  color: var(--green);
}

.feed-card__descr {
  margin: 0;
  font-size: 14px;
  opacity: 0.65;
}

.feed-card__stack {
  margin: 10px 0 0;
  padding-top: auto;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-top: auto;
  padding-top: 12px;
}

/* ---------- Плашка ИИ-подбора внизу (все страницы, кроме /blog) ---------- */

/* ---------- Нижняя плашка ИИ-подбора со строкой о cookie ---------- */

body.has-bottom-bar {
  padding-bottom: 72px;
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 9px 20px;
  background: #222;
  color: #fff;
}

.bottom-bar[hidden] {
  display: none;
}

.bottom-bar__ai-text {
  margin: 0;
  font-size: 14.5px;
}

.bottom-bar .ai-match-invite__hl {
  border-bottom-color: var(--green);
}

/* уведомление о cookie — мелкая строка под приглашением */
.bottom-bar__cookie-line {
  margin: 3px 0 0;
  font-size: 11.5px;
  line-height: 1.3;
  color: #8a8a8a;
}

.bottom-bar__cookie-line a {
  color: inherit;
  text-decoration: underline;
}

.ai-bar__btn {
  flex-shrink: 0;
  padding: 10px 22px;
  border: 0;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.ai-bar__btn:hover {
  background: #069a5c;
}

/* ---------- Ранние проекты на /portfolio (до 2018) ---------- */

.early-intro {
  max-width: 760px;
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.6;
}

.early-group {
  border-bottom: 1px solid #e8e8ea;
  interpolate-size: allow-keywords;
}

.early-group:first-child {
  border-top: 1px solid #e8e8ea;
}

.early-group summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.early-group summary::-webkit-details-marker {
  display: none;
}

.early-group__count {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.early-group summary svg {
  flex: none;
  color: var(--muted);
  transition: transform 0.2s;
}

.early-group[open] summary svg {
  transform: rotate(180deg);
}

.early-group::details-content {
  block-size: 0;
  overflow-y: clip;
  transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
}

.early-group[open]::details-content {
  block-size: auto;
}

.early-group__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 48px;
  padding: 4px 4px 32px;
}

.early-project__title {
  margin: 0 0 8px;
  font-size: 18px;
}

.early-project__sphere {
  margin-left: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.early-project__about {
  margin: 0 0 8px;
  font-size: 14.5px;
  line-height: 1.55;
}

.early-project__customer {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.early-project__customer strong {
  color: var(--green);
}

.early-project__more {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .early-group__list { grid-template-columns: 1fr; }
}

/* ---------- Новая страница услуги (/razrabotka-erp) ---------- */

/* Шапка услуги — на базе шапки статьи (.article-hero); справа вместо
   обложки — тёмные карточки цифр в стиле блока цифр главной */
.erp-hero__inner {
  align-items: center;
}

.erp-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.erp-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.erp-hero__stat {
  padding: 20px 22px;
  background: var(--dark-card);
}

.erp-hero__stat strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-size: 27px;
  line-height: 1.15;
  color: var(--green);
}

/* карточка, где вместо цифры имена клиентов — шрифт поменьше */
.erp-hero__stat--names strong {
  font-size: 18px;
}

.erp-hero__stat span {
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  opacity: 0.7;
}

/* Разделы услуги в теле статьи: якоря для оглавления */
.article__body section[id] {
  scroll-margin-top: 24px;
}

.article__body section:first-child h2 {
  margin-top: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 28px 0 8px;
}

.erp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}

.erp-table th {
  text-align: left;
  padding: 12px 16px;
  background: #222;
  color: #fff;
  font-weight: 600;
}

.erp-table th:first-child {
  border-radius: 5px 0 0 0;
}

.erp-table th:last-child {
  border-radius: 0 5px 0 0;
}

.erp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8ea;
  vertical-align: top;
}

.erp-table td:first-child {
  font-weight: 600;
}

/* В сравнительной таблице колонка «Разработка на заказ» — акцентная */
.erp-table--compare th:last-child {
  background: var(--green);
}

.erp-table--compare td:last-child {
  background: #eefaf4;
  font-weight: 500;
}

/* Тёмная карточка «сколько это будет стоить» в конце раздела.
   Раньше на её месте планировался квиз — его отменили 26.07.2026,
   расспрашивать посетителя теперь умеет ИИ-подбор */
.price-invite {
  margin-top: 32px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--dark-card);
  color: #fff;
}

.price-invite__title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
}

.price-invite p {
  margin: 0 0 20px;
  color: #fff;
  opacity: 0.75;
}

.erp-why {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.erp-why__card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--light-card);
}

.erp-why__card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.erp-why__card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.erp-case {
  margin: 0 0 28px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--light-card);
}

.erp-case h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.erp-case p:last-child {
  margin-bottom: 0;
}

.erp-case p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.6;
}

.erp-case__video-note {
  font-weight: 600;
}

.erp-case__gif {
  display: block;
  width: 100%;
  margin: 4px 0 16px;
  border-radius: 5px;
}

.erp-case__video {
  display: block;
  width: 100%;
  margin: 4px 0 16px;
  border-radius: 5px;
}

/* в колонке контента плитки в два столбца, а не в три
   (двойной класс — чтобы перебить базовый .case-tiles, он ниже в файле) */
.case-tiles.case-tiles--erp {
  margin-top: 8px;
  grid-template-columns: repeat(2, 1fr);
}

/* Этапы: крупные зелёные номера 01–07 слева, как цифры на главной */
.erp-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: erp-step;
}

.erp-steps li {
  position: relative;
  margin-bottom: 26px;
  padding-left: 64px;
  counter-increment: erp-step;
}

.erp-steps li::before {
  content: counter(erp-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -2px;
  font-family: var(--font-heading);
  font-size: 27px;
  font-weight: 700;
  color: var(--green);
}

.erp-steps h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.erp-steps p {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

/* FAQ на details/summary — как оглавление, с плавным раскрытием */
.faq {
  max-width: 860px;
}

.faq__item {
  border-bottom: 1px solid #e8e8ea;
  interpolate-size: allow-keywords;
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 16.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary svg {
  flex: none;
  color: var(--muted);
  transition: transform 0.2s;
}

.faq__item[open] summary svg {
  transform: rotate(180deg);
}

.faq__item::details-content {
  block-size: 0;
  overflow-y: clip;
  transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
}

.faq__item[open]::details-content {
  block-size: auto;
}

.faq__item p {
  max-width: 720px;
  margin: 0;
  padding: 0 0 20px;
  line-height: 1.6;
  color: var(--muted);
}

.erp-read-more {
  font-weight: 700;
  margin-top: 28px;
}

.erp-read-more__list {
  margin: 0;
  padding-left: 22px;
}

.erp-read-more__list li {
  margin-bottom: 8px;
}

.erp-read-more__list a {
  color: var(--green);
}

/* Липкая колонка сайдбара: оглавление + карточка расчёта */
.aside-stack {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-stack .toc {
  position: static;
}

.aside-cta {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--dark-card);
  color: #fff;
}

.aside-cta__title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
}

.aside-cta__text {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #fff;
  opacity: 0.75;
}

.aside-cta .button-green {
  display: block;
  text-align: center;
}

@media (max-width: 1000px) {
  .erp-hero__stats { margin-top: 8px; }
  .erp-why { grid-template-columns: 1fr; }
  .aside-stack { position: static; }
  /* на мобильном сайдбар встаёт над контентом — тёмную карточку прячем,
     тот же призыв уже есть в блоке стоимости */
  .aside-cta { display: none; }
}

/* ---------- Контакты (1:1 с t555) ---------- */

.contacts {
  padding: 56px 0 88px;
}

.contacts__office {
  display: grid;
  grid-template-columns: minmax(0, 460px) 1fr;
  gap: 48px;
  align-items: start;
  padding: 32px 0;
}

.contacts__office h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.contacts__info p {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.6;
}

.contacts__info a {
  color: inherit;
  text-decoration: none;
}

/* Каналы связи — блоками «подпись + значение», как во всплывашке телефона
   в шапке: подпись мелкая приглушённая, значение жирное. Телефоны стоят
   подряд в одном блоке (решение владельца от 26.07.2026) */
.contacts__channel {
  margin: 0 0 14px;
}

.contacts__channel span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--muted);
}

.contacts__channel a {
  display: block;
  width: fit-content;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
}

.contacts__channel a:hover {
  color: var(--green);
}

.contacts__hours {
  margin-top: 20px;
}

.contacts__map {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 8px;
  filter: grayscale(1);   /* как bw_light на старом сайте */
}

@media (max-width: 900px) {
  .contacts__office { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Список портфолио ---------- */

.portfolio-list {
  /* нижний отступ даёт .media-layout внутри */
  padding: 56px 0 0;
}

.portfolio-list__title {
  font-size: 38px;
  margin-bottom: 48px;
}

.feed__grid--three {
  grid-template-columns: repeat(3, 1fr);
}

/* Плитки кейсов — 1:1 со старой t959 */
.case-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Карточки кейсов на /portfolio — те же карточки, что в ленте /blog,
   но обложка-гифка без затемнения и в родной пропорции плиток */
.case-card .feed-card__media img {
  aspect-ratio: 4 / 3;
  image-rendering: pixelated;
}

/* Плиток типа и стека до пяти на карточку — пусть переносятся */
.case-card .feed-card__meta {
  flex-wrap: wrap;
  gap: 6px;
}

/* Сообщение, когда фильтры не оставили ни одного кейса */
.feed__empty {
  margin: 8px 0 0;
  color: var(--muted);
}

.case-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  background-color: #9c9c9c;   /* плитки без фото — серые, как в оригинале */
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
  color: #fff;
  text-decoration: none;
}

.case-tile__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  transition: background 0.2s;
}

.case-tile:hover .case-tile__overlay {
  background: rgba(0, 0, 0, 0.35);
}

.case-tile__title {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
}

.case-tile__title svg {
  flex-shrink: 0;
  margin-top: 7px;
}

.case-tile__descr {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  font-size: 14px;
  line-height: 1.45;
}

.portfolio-list__title--mini {
  margin-top: 72px;
  scroll-margin-top: 90px;  /* якорь #early не ныряет под липкую шапку */
}

.portfolio-list__note {
  margin: -32px 0 32px;
  color: var(--muted);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.mini-card {
  padding: 22px 18px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.mini-card:hover {
  border-color: var(--green);
  color: var(--green);
}

.mini-popup {
  width: min(680px, calc(100vw - 40px));
  max-height: 85vh;
  padding: 32px 36px;
  border: 0;
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
}

.mini-popup::backdrop {
  background: rgba(17, 17, 17, 0.55);
}

.mini-popup h3 {
  font-size: 22px;
  margin-bottom: 12px;
  padding-right: 32px;
}

.mini-popup p {
  font-size: 14.5px;
  line-height: 1.55;
}

.mini-popup figure {
  margin: 16px 0 0;
}

@media (max-width: 1000px) {
  .feed__grid--three { grid-template-columns: repeat(2, 1fr); }
  .case-tiles { grid-template-columns: repeat(2, 1fr); }
  .mini-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .case-tiles { grid-template-columns: 1fr; }
}

/* Попап подбора на телефоне. Боковые отступы 36 пикселей съедали пятую часть
   ширины, а кнопка «Подобрать материалы» с подписью «Результат за 1 минуту»
   стояли в один ряд и требовали 291 пиксель при 274 доступных. Из-за этого
   внутри попапа появлялась горизонтальная прокрутка и контент уезжал вбок */
@media (max-width: 560px) {
  .ai-match { padding: 24px 20px; }
  .ai-match__actions { flex-wrap: wrap; gap: 10px 14px; }
  .ai-match__close { top: 12px; right: 10px; }
}

@media (max-width: 560px) {
  .feed__grid--three { grid-template-columns: 1fr; }
}

/* ---------- Подвал ---------- */

.site-footer {
  padding: 48px 0 40px;
}

.site-footer__contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Типографика как у Тильды: заголовки колонок — t-name (Glober 500),
   текст — t562__text с opacity .7 */
.site-footer__contact-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
}

.site-footer__contact p {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  opacity: 0.7;
  line-height: 1.55;
}

.site-footer__legal {
  margin-top: 48px;
  text-align: center;
  font-size: 12px;
  color: var(--text);
}

.site-footer__company {
  margin: 10px 0 6px;
  font-size: 14px;
  font-weight: 500;
}

.site-footer__requisites {
  margin: 0 0 8px;
  line-height: 1.7;
  opacity: 0.7;
}

.site-footer__privacy {
  font-size: 12px;
}

.site-footer__cookie {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
  .site-nav__link { padding: 10px 8px; font-size: 15px; }
  .outline-button { font-size: 11px; padding: 10px 12px; }
}

@media (max-width: 1000px) {
  .section-title { font-size: 32px; }
  .hero__title { font-size: 40px; }
  /* Подзаголовок столбиком: «по количеству работ» прямо под «CRM №1
     в России», а не под «Работаем с 2010 года», как выходило при переносе */
  .hero__subtitle-part { display: block; }
  .hero__subtitle-sep { display: none; }
  .hero__subtitle-link { display: none; }
  .hero__subtitle-inline {
    display: block;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    color: var(--green);
    text-decoration: underline;
    text-underline-offset: 3px;
    margin: 2px 0 10px;
  }
  .hero__fact { flex-direction: column; gap: 28px; }
  .cases__rows { gap: 48px; }
  .case-row { grid-template-columns: 1fr; gap: 20px; }
  .case-row--flip .case-card__media { order: 0; }
  .features-line { grid-template-columns: 1fr; }
  .features-line__arrow { display: none; }
  .clients__dark-row { grid-template-columns: repeat(2, 1fr); }
  .clients__light-row { grid-template-columns: 1fr; }
  .blog-preview__grid { grid-template-columns: 1fr; }
  .site-footer__contacts { grid-template-columns: 1fr; }

  /* Мобильная шапка без бургера (решение владельца от 26.07.2026):
     кот и меню в первой строке, телефон с кнопкой во второй. «Наше медиа»
     переезжает во вторую строку и сокращается до «Медиа» — целиком оно туда
     не влезает: медиа 91 + телефон 134 + кнопка 120 при 324 свободных.
     Освободившееся место убирает у меню целую строку */
  .site-header__inner { flex-wrap: wrap; align-items: flex-start; row-gap: 8px; padding: 10px 20px; }
  /* Кот прижат к верху: иначе флекс центрирует его по всей высоте меню,
     и на нескольких строках пунктов он повисает напротив второй строки */
  .site-header__logo { flex: 0 0 auto; align-self: flex-start; }
  .site-nav { flex: 1 1 0; min-width: 0; }
  .site-nav__list { flex-wrap: wrap; }
  .site-nav__item--media { display: none; }
  /* Выпадашки «Услуги» и «Решения» привязаны к пункту меню и уезжали
     за правый край: 310 пикселей от позиции пункта на 155-й. Привязываем
     их к самому меню и растягиваем по его ширине — тогда они всегда
     внутри экрана, где бы ни стоял пункт */
  .site-nav { position: relative; }
  .site-nav__item { position: static; }
  .site-nav__dropdown { left: 0; right: 0; min-width: 0; }
  /* Вторая строка целиком: медиа, телефон, кнопка — в один ряд без переноса */
  .site-header__actions { flex: 1 0 100%; flex-wrap: nowrap; align-items: center; gap: 8px; margin-left: 0; }
  .site-header__media { display: inline-flex; }
  /* Компактнее на 20 пикселей: без этого ряд не помещается в ширину экрана */
  .site-header__cta { padding: 12px; font-size: 13px; }
  .header-contacts__toggle { font-size: 13.5px; }
}

/* Совсем узкие экраны (320 и уже): медиа, телефон и кнопка в один ряд
   не помещаются — 325 пикселей при 280 свободных, и страница получала
   горизонтальную прокрутку. Разрешаем ряду переноситься.
   Порог 350, а не 380: на 360 и 375 ряд ещё помещается в одну строку */
@media (max-width: 350px) {
  .site-header__actions { flex-wrap: wrap; row-gap: 6px; }
  .site-header__media { order: -1; }
}

@media (max-width: 1000px) {
  .media-hero h1 { font-size: 34px; }
  .media-hero__inner { grid-template-columns: 1fr; }
  .media-hero__pixels { display: none; }
  .media-layout { grid-template-columns: 1fr; gap: 32px; }
  .feed__grid { grid-template-columns: 1fr; }
  /* minmax(0, 1fr), а не 1fr: у колонки 1fr минимум считается по контенту,
     и широкая таблица внутри .table-scroll распирала её до 536 пикселей
     вместе со всем текстом статьи (горизонтальная прокрутка на мобильном) */
  .article { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .article__aside { order: -1; margin-bottom: 32px; }
  .toc { position: static; }
  .article-hero__inner { grid-template-columns: 1fr; }
  .article-hero__cover { order: -1; max-width: 420px; }
}

@media (max-width: 900px) {
  .bottom-bar { flex-direction: column; gap: 8px; padding: 10px 16px; text-align: center; }
  .bottom-bar__ai-text { font-size: 13px; }
  body.has-bottom-bar { padding-bottom: 150px; }
}

@media (max-width: 560px) {
  .feed__grid { grid-template-columns: 1fr; }
  /* Печатающуюся строку на телефоне не показываем: экран героя и так
     плотный, анимированная строка добавляла шума (владелец, 26.07.2026) */
  .hero__typed { display: none; }
  .hero__title { font-size: 30px; }
  .section-title { font-size: 26px; }
  .clients__dark-row { grid-template-columns: 1fr; }
  .clients__banner { padding: 32px 24px; }
}

/* ────────────────────────────────────────────────────────────────
   Страница поста из Телеграма (/blog/tg/N)
   Макет единый со статьями (article-hero + сетка article). Телеграм
   подсказывают детали: тег «Пост», строка канала, пилюли реакций
   (осознанная цитата чужого интерфейса), синяя кнопка на оригинал.
   ──────────────────────────────────────────────────────────────── */

.tg-hero-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.tg-hero-tag__date {
  font-size: 13px;
  color: var(--muted);
}

/* Строка канала над текстом поста */
.tg-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}

.tg-channel__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.tg-channel__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* селекторы с .article__body — перебивают зелёные ссылки тела статьи */
.article__body .tg-channel__who a {
  font-weight: 700;
  font-size: 15px;
  color: inherit;
  text-decoration: none;
}

.article__body .tg-channel__who a:hover {
  color: var(--blue);
}

.tg-channel__who span {
  font-size: 13px;
  color: var(--muted);
}

/* Низ поста: реакции и кнопка на оригинал */
.tg-post-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
}

.tg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.tg-reactions li {
  padding: 5px 12px;
  border-radius: 999px;
  background: #ebf3fa;
  color: #168ade;
  font-size: 14px;
  font-weight: 700;
}

.article__body .tg-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.article__body .tg-open-btn:hover {
  background: #0077b3;
  color: #fff;
}

.tg-open-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Сквозной правый блок: липкий, как оглавление статьи */
.tg-aside {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* та же карточка, что и у блоков сайдбара на /blog (.media-side) */
.tg-side {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--light-card);
}

.tg-side__channel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}

.tg-side__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.tg-side__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tg-side__name {
  font-weight: 700;
  font-size: 15px;
}

.tg-side__handle {
  font-size: 13px;
  color: var(--muted);
}

.tg-side__text {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.tg-side__subscribe {
  display: block;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.tg-side__subscribe:hover {
  background: #0077b3;
}

.tg-side__title {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 15px;
}

.tg-side__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tg-side__list a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.tg-side__list a:hover {
  color: var(--blue);
}

.tg-side__list time {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .tg-aside { position: static; }
}

/* ────────────────────────────────────────────────────────────────
   Шапка кейса: факты, цифры результата, цитата заказчика
   (необязательные блоки ArticleLayout, выводятся только у кейсов
   с размеченными данными; данные — из текста самого кейса)
   ──────────────────────────────────────────────────────────────── */

.case-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

/* квадратики в пиксельной айдентике, как теги ленты */
.case-fact {
  padding: 7px 12px;
  border: 1px solid #cfcfcf;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.case-fact__label {
  margin-right: 6px;
  color: var(--muted);
  font-weight: 400;
}

.case-stats {
  padding-top: 28px;
}

.case-stats__grid {
  display: grid;
  /* auto-fit: 3 карточки занимают весь ряд без пустой колонки */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.case-stat {
  padding: 22px 24px;
  background: var(--dark-card);
}

.case-stat__num {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--green);
}

.case-stat__label {
  margin: 0;
  font-size: 13px;
  color: #fff;
  opacity: 0.7;
}

.case-quote {
  margin: 36px 0 0;
  padding: 6px 0 6px 24px;
  border-left: 4px solid var(--green);
}

.case-quote p {
  margin: 0 0 10px;
  max-width: 760px;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 500;
}

.case-quote footer {
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .case-stats__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .case-stats__grid { grid-template-columns: 1fr; }
  .case-quote p { font-size: 17px; }
}

/* ────────────────────────────────────────────────────────────────
   «Об этом проекте» — связанные материалы (кейс/статья/пост).
   Текстовые строки в шапке: тип цветным словом + заголовок-ссылка.
   Нарочно БЕЗ рамок и заливок, чтобы не путались с квадратиками
   фактов (правка владельца). Связи — в src/data/related.mjs.
   ──────────────────────────────────────────────────────────────── */

.hero-related {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 22px 0 0;
}

.hero-related__label {
  font-size: 13px;
  color: var(--muted);
}

.hero-related__link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  max-width: 100%;
  font-size: 14.5px;
  text-decoration: none;
}

/* тип материала — цветное слово без заливки */
.hero-related__link .tag {
  flex: none;
  padding: 0;
  background: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-related__link .tag--case    { color: var(--green); }
.hero-related__link .tag--article { color: var(--dark); }
.hero-related__link .tag--post    { color: var(--blue); }

.hero-related__text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-decoration-color: #c4c9d4;
  text-underline-offset: 3px;
}

.hero-related__link:hover .hero-related__text {
  color: var(--green);
  text-decoration-color: var(--green);
}

/* ────────────────────────────────────────────────────────────────
   Содержание в теле материала (компонент BodyToc): генерируется
   из toc страницы, всегда перед текстом. Вшитые в текст тильдовские
   содержания с мёртвыми #rec-якорями удалены.
   ──────────────────────────────────────────────────────────────── */

.body-toc {
  margin: 0 0 32px;
}

.body-toc__title {
  margin: 0 0 10px;
  font-weight: 700;
}

.body-toc__list {
  margin: 0;
}

/* ────────────────────────────────────────────────────────────────
   Перелинковка в сайдбаре кейса: услуга по теме + кейс в дополнение
   с объяснением. Стоит под «Содержанием» — виден, пока оно свёрнуто.
   Данные — src/data/crosslinks.mjs.
   ──────────────────────────────────────────────────────────────── */

.side-next {
  border-radius: var(--radius);
  background: var(--light-card);
}

/* Чёрная фирменная шапка медиа — компактная, в одну строку.
   Это summary: щелчок сворачивает блок */
.side-next__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--dark);
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.side-next__head::-webkit-details-marker {
  display: none;
}

.side-next__box:not([open]) .side-next__head {
  border-radius: var(--radius);
}

.side-next__chevron {
  flex: none;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s;
}

.side-next__head:hover .side-next__chevron {
  color: #fff;
}

.side-next__box:not([open]) .side-next__chevron {
  transform: rotate(-90deg);
}

.side-next__logo {
  width: 18px;
  height: 20px;
  flex: none;
}

.side-next__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
}

.side-next__brand a {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.side-next__brand a span {
  color: var(--green);
}

.side-next__brand a:hover {
  text-decoration: underline;
}

.side-next__media {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* «?» с хинтом, что это за медиа */
.side-next__q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0;
}

/* пилюля хинта не должна вылезать за правый край экрана */
.side-next__q .hint__tip {
  left: auto;
  right: -12px;
  /* вниз, а не вверх: блок липкий и у верха экрана — вверху места нет */
  bottom: auto;
  top: calc(100% + 12px);
  transform: translateY(-8px);
  width: 260px;
  text-align: left;
  /* сбрасываем унаследованное от шапки: капс и запрет переносов */
  white-space: normal;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.side-next__q:hover .hint__tip {
  transform: translateY(0);
}

.side-next__body {
  padding: 20px 24px 24px;
}

.side-next__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.side-next__item + .side-next__item {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e2e2;
}

/* второй кейс идёт под первым без разделителя */
.side-next__item--follow {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}

.side-next__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.side-next__link {
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.side-next__link:hover {
  color: var(--green);
}

.side-next__why {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

/* Пиктограммы и сетка строк в плашке перелинковки */
.side-next__row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.side-next__pict {
  flex: none;
  margin-top: 3px;
}

.side-next__pict--service { color: var(--dark); }
.side-next__pict--case    { color: var(--green); }
.side-next__pict--article { color: var(--dark); }

.side-next__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Плавное сворачивание блоков сайдбара (details).
   Работает в свежем Chrome; в остальных браузерах — мгновенно. */
:root {
  interpolate-size: allow-keywords;
}

.toc__box::details-content,
.side-next__box::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
}

.toc__box[open]::details-content,
.side-next__box[open]::details-content {
  block-size: auto;
}

/* ===== Страница /razrabotka-crm: отраслевые табы и мелкие блоки ===== */

/* Технологии: три карточки в ряд (базовый .erp-why двухколоночный) */
.erp-why--cols3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Отраслевые табы. Панели присутствуют в DOM целиком (h2 внутри них
   индексируются), переключение только визуальное */
.itabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.itabs__btn {
  padding: 8px 16px;
  border: 1px solid var(--dark);
  border-radius: 100px;
  background: none;
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.itabs__btn:hover {
  background: var(--light-card);
}

.itabs__btn--active {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.itabs__panel {
  display: none;
}

.itabs__panel--active {
  display: block;
}

.itabs__panel h2 {
  margin-top: 8px;
}

@media (max-width: 700px) {
  .erp-why--cols3 {
    grid-template-columns: 1fr;
  }
}

/* Примеры-документы в этапах: скриншот + подпись-ссылка, как на
   лендинге longcatcrm.com. Разметка общая для /razrabotka-crm и -erp */
.erp-step__examples {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.erp-step-doc {
  display: block;
  width: min(320px, 100%);
  border: 1px solid #e3e3e3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.erp-step-doc:hover {
  border-color: var(--green);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.erp-step-doc__shot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid #eee;
  background: var(--light-card);
}

.erp-step-doc__label {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.4;
}

a.erp-step-doc .erp-step-doc__label {
  color: var(--green);
  font-weight: 600;
}

/* Пруф «С 2010 года» в hero страниц услуг: карточка с данными ЕГРЮЛ,
   всплывает только при наведении (или фокусе) на знак «?» после цифры
   (компонент Proof2010.astro) */
.erp-hero__stat--proof {
  position: relative;
}

.stat-proof-hint {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  border: 1px dotted currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 400;
  line-height: 14px;
  text-align: center;
  vertical-align: super;
  cursor: help;
  opacity: 0.65;
}

.stat-proof-hint:hover,
.stat-proof-hint:focus {
  opacity: 1;
}

/* мелкая подстрочная строка в плашке (например «топ-5 в „Рейтинге Рунета“»);
   плитки после оформительского слоя светлые — цвет приглушённый */
.erp-hero__stat-sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
}

.stat-proof {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 30;
  display: block;
  width: 264px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  color: #1f1f1f;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

/* карточка светлая, а глобальное правило .erp-hero__stat span красит
   все span'ы (включая саму карточку .stat-proof — она тоже span) в белый
   с прозрачностью — возвращаем подсказке тёмный цвет и полную непрозрачность */
.erp-hero__stat span.stat-proof {
  color: #1f1f1f;
  opacity: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

.erp-hero__stat--proof:has(.stat-proof-hint:hover) span.stat-proof,
.erp-hero__stat--proof:has(.stat-proof-hint:focus) span.stat-proof,
.erp-hero__stat span.stat-proof:hover {
  opacity: 1;
}

.erp-hero__stat .stat-proof span {
  color: inherit;
  opacity: 1;
  font-size: inherit;
  line-height: inherit;
}

.erp-hero__stat--proof:has(.stat-proof-hint:hover) .stat-proof,
.erp-hero__stat--proof:has(.stat-proof-hint:focus) .stat-proof,
.stat-proof:hover {
  opacity: 1;
  visibility: visible;
}

.stat-proof span.stat-proof__title {
  display: block;
  font-weight: 700;
  font-size: 15px;
}

.stat-proof span.stat-proof__status {
  display: block;
  margin: 2px 0 10px;
  color: var(--green);
  font-weight: 600;
}

.stat-proof span.stat-proof__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
}

.stat-proof .stat-proof__grid span:nth-child(odd) {
  color: #888;
}

.stat-proof span.stat-proof__date {
  display: block;
  margin-top: 10px;
  font-weight: 600;
}

.stat-proof span.stat-proof__note {
  display: block;
  margin-top: 6px;
  color: #888;
  font-size: 12px;
}


/* ============================================================
   ОФОРМИТЕЛЬСКИЙ СЛОЙ (текст и разметка контента не менялись).
   Кнопки на сайте квадратные — радиусы только у карточек и панелей.
   ============================================================ */

/* --- первый экран --- */
.article-hero { padding: 64px 0 72px; }
.article-hero__inner { gap: 56px; align-items: center; }
.article-hero__breadcrumb { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.article-hero__text h1 { font-size: clamp(34px, 3.4vw, 50px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 20px; text-wrap: balance; }
.article-hero__intro { font-size: 18px; line-height: 1.6; max-width: 56ch; color: #4c4f52; }
.erp-hero__cta { margin-top: 30px; gap: 14px; }
.button-green, .outline-button { white-space: nowrap; }

/* четыре плитки: светлые, с зелёной линией снизу */
.erp-hero__stats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.erp-hero__stat {
  display: flex; flex-direction: column; gap: 8px; min-height: 118px;
  padding: 20px 22px; background: #fff;
  border: 1px solid #e4e5e7; border-bottom: 3px solid var(--green); border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.erp-hero__stat:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,0.09); }
.erp-hero__stat strong { margin: 0; font-size: 26px; line-height: 1.05; letter-spacing: -0.01em; color: var(--text); }
.erp-hero__stat:nth-child(3) strong, .erp-hero__stat:nth-child(4) strong { color: var(--green); }
.erp-hero__stat--names strong { font-size: 17px; line-height: 1.25; }
.erp-hero__stat span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.erp-hero__stat .stat-proof span { color: inherit; }

/* --- ритм разделов --- */
.article__body { line-height: 1.7; }
.article__body section + section { margin-top: 56px; }
.article__body section > h2 { margin-top: 0; font-size: 29px; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.article__body section > h2 ~ h2 { margin-top: 52px; }
.article__body section > h2::before { content: ""; display: block; width: 38px; height: 3px; margin-bottom: 18px; background: var(--green); }
.article__body section > h2 + p { font-size: 18.5px; line-height: 1.6; color: #4c4f52; max-width: 64ch; }
.article__body h3 { font-size: 19px; text-wrap: pretty; }

/* --- карточки --- */
.erp-why { gap: 16px; }
.erp-why__card { padding: 26px 28px 28px; border: 1px solid #ebecee; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.erp-why__card:hover { transform: translateY(-2px); border-color: #dcdee1; box-shadow: 0 10px 28px rgba(0,0,0,0.06); }
.erp-why__card h3 { font-size: 18px; line-height: 1.3; }
.erp-why__card p { font-size: 15px; line-height: 1.6; }
.erp-why__card ul { margin: 0 0 14px; padding-left: 20px; font-size: 15px; }
.erp-why__card li { margin: 6px 0; color: var(--muted); }

/* «почему у нас» — нумерация */
#pochemu .erp-why { counter-reset: why; }
#pochemu .erp-why__card { position: relative; counter-increment: why; padding-top: 44px; background: #fff; border-color: #e7e8ea; }
#pochemu .erp-why__card::before { content: counter(why, decimal-leading-zero); position: absolute; top: 18px; left: 28px; font-family: var(--font-heading); font-size: 15px; font-weight: 700; letter-spacing: 0.04em; color: var(--green); }

/* --- сравнение: «против» и «за» --- */
#sravnenie .erp-why { gap: 18px; align-items: stretch; }
#sravnenie .erp-why__card { display: flex; flex-direction: column; padding: 28px 30px 26px; background: #fff; border-color: #e5e6e8; }
#sravnenie .erp-why__card:hover { transform: none; box-shadow: none; }
#sravnenie .erp-why__card h3 { margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid #edeef0; font-size: 18px; line-height: 1.3; }
#sravnenie .erp-why__card ul { margin: 0 0 auto; padding-left: 0; list-style: none; }
#sravnenie .erp-why__card li { position: relative; margin: 0; padding: 9px 0 9px 26px; font-size: 15px; line-height: 1.5; color: var(--text); border-bottom: 1px solid #f3f4f5; }
#sravnenie .erp-why__card li:last-child { border-bottom: 0; }
#sravnenie .erp-why__card li::before {
  content: ""; position: absolute; left: 1px; top: 14px;
  width: 12px; height: 12px; border: 1.5px solid #c9ccd0; border-radius: 3px; background: #fff;
}
#sravnenie .erp-why__card:nth-child(2) { background: #f4fbf7; border-color: #cdece0; }
#sravnenie .erp-why__card:nth-child(2) h3 { border-bottom-color: #d9ece3; }
#sravnenie .erp-why__card:nth-child(2) li { border-bottom-color: #e4f2ea; }
#sravnenie .erp-why__card:nth-child(2) li::before {
  border-color: var(--green); background: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.3l2.2 2.2 4.9-4.9' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px 12px; background-position: center; background-repeat: no-repeat;
}
#sravnenie .erp-why__card > p:last-child { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e2e4e6; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
#sravnenie .erp-why__card:nth-child(2) > p:last-child { border-top-color: #d9ece3; }

/* --- таблицы --- */
.table-scroll { margin: 26px 0 14px; border: 1px solid #ebecee; border-radius: 14px; overflow: auto; }
.erp-table { font-size: 15px; font-variant-numeric: tabular-nums; }
.erp-table th { background: var(--dark); color: #fff; font-size: 13.5px; padding: 12px 14px; }
.erp-table th:first-child, .erp-table th:last-child { border-radius: 0; }
.erp-table:has(td.num) th:nth-child(n + 3), .erp-table:has(td.term) th:nth-child(n + 3) { text-align: right; padding-left: 10px; padding-right: 10px; }
/* колонки с обычным текстом остаются по левому краю */
.erp-table th:not(:has(*)) { padding-left: 14px; padding-right: 14px; }
.erp-table td { padding: 12px 14px; line-height: 1.5; }
.erp-table td:first-child { vertical-align: top; }
.erp-table td:nth-child(2) { padding-right: 14px; }
.erp-table tbody tr:nth-child(even) { background: #fafafb; }
.erp-table tbody tr:hover { background: #f2f8f5; }
.erp-table tbody tr:last-child td { border-bottom: 0; }
.erp-table td.num { white-space: nowrap; text-align: right; vertical-align: top; padding-left: 10px; padding-right: 10px; }
.num__pre { font-size: 12.5px; color: var(--muted); }
.num__v { font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; }
.num__u { font-size: 12px; letter-spacing: 0.02em; color: var(--muted); }
.erp-table td.term { white-space: nowrap; text-align: right; vertical-align: top; padding-left: 10px; font-size: 14px; color: var(--muted); }

/* смета: похоже на счёт */
#stoimost h3 { margin: 40px 0 10px; font-size: 21px; }
.erp-table:has(th:nth-child(2):last-child) th { white-space: nowrap; }
.erp-table:has(th:nth-child(2):last-child) th:last-child { text-align: right; padding-right: 20px; }
.erp-table:has(th:nth-child(2):last-child) td:first-child { padding-right: 24px; vertical-align: middle; font-weight: 400; }
.erp-table:has(th:nth-child(2):last-child) td:last-child { width: 170px; padding-right: 20px; text-align: right; white-space: nowrap; font-size: 16px; font-weight: 600; vertical-align: middle; }
.erp-table:has(th:nth-child(2):last-child) tbody tr:last-child { background: #eefaf4; }
.erp-table:has(th:nth-child(2):last-child) tbody tr:last-child td { padding-top: 16px; padding-bottom: 16px; border-top: 2px solid var(--dark); font-size: 17px; }

.price-invite { display: grid; gap: 6px; margin-top: 36px; padding: 36px; border-radius: var(--radius); }
.price-invite__title { font-size: 24px; line-height: 1.25; }
.price-invite p { max-width: 52ch; }
.price-invite .button-green { justify-self: start; margin-top: 10px; }

/* --- отзывы --- */
.erp-case { padding: 30px 32px; border-radius: var(--radius); }
.erp-case h3 { display: flex; align-items: baseline; gap: 10px; font-size: 19px; line-height: 1.3; }
.erp-case h3::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--green); }
.erp-case .article-callout { margin: 18px 0; padding: 22px 26px; background: #fff; border: 1px solid #ececee; border-left: 0; border-radius: 14px; font-size: 15.5px; line-height: 1.6; }
.erp-case__author { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eeeff0; font-size: 13.5px; color: var(--muted); }

/* --- отрасли --- */
.itabs__nav { gap: 8px; margin-bottom: 26px; }
.itabs__btn { padding: 9px 16px; border: 1px solid #dfe0e2; border-radius: 5px; background: #fff; font-size: 14.5px; }
.itabs__btn:hover { background: #fff; border-color: var(--dark); }
.itabs__btn--active { background: var(--dark); border-color: var(--dark); color: #fff; }
.itabs__panel h2 { font-size: 22px; margin-top: 4px; }
.itabs__panel h2::before { display: none; }
.itabs__panel > p:first-of-type { font-size: 16px; color: var(--muted); }
.itabs__panel .feed__grid { gap: 18px; }
.feed-card { border: 1px solid #ebecee; }

/* --- ЭТАПЫ: таймлайн, примеры во всю ширину --- */
.erp-steps { counter-reset: erp-step; background: var(--light-card); border-radius: var(--radius); padding: 30px 30px 4px; }
.erp-steps li { padding: 2px 0 30px 62px; margin: 0; }
.erp-steps li::before {
  content: counter(erp-step, decimal-leading-zero); position: absolute; left: 0; top: 0;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 16px; z-index: 1;
}
.erp-steps li::after { content: ""; position: absolute; left: 21px; top: 52px; bottom: 2px; width: 2px; background: #dcdee1; }
.erp-steps li:last-child::after { display: none; }
.erp-steps h3 { margin: 8px 0 8px; font-size: 20px; line-height: 1.3; }
.erp-steps p { font-size: 15.5px; line-height: 1.6; max-width: 62ch; }

.erp-step__examples { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.erp-step-doc {
  display: grid; grid-template-columns: minmax(0, 1fr); width: 100%;
  background: #fff; border: 1px solid #e3e4e6; border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.erp-step-doc__shot {
  grid-row: 1; width: auto; max-width: 100%; height: auto; max-height: none; aspect-ratio: auto;
  margin: 0 auto; object-fit: contain; object-position: top center;
  border-bottom: 1px solid #ececee;
}
/* карточка примера: скриншот по центру и не крупнее оригинала, подпись во всю ширину */
.erp-step-doc { justify-items: center; }
.erp-step-doc__label { justify-self: stretch; width: 100%; }
.erp-step-doc__label { grid-row: 2; margin: 0; padding: 15px 20px 16px; border-top: 0; font-size: 16px; line-height: 1.4; }
span.erp-step-doc .erp-step-doc__label { color: var(--muted); }
a.erp-step-doc:hover { border-color: var(--green); box-shadow: 0 14px 32px rgba(0,0,0,0.1); }

/* --- FAQ --- */
.faq__item { border-bottom-color: #ebecee; }
.faq__item summary { padding: 20px 4px 20px 0; font-size: 17px; }
.faq__item summary:hover, .faq__item[open] summary { color: var(--green); }
.faq__item summary svg { box-sizing: content-box; width: 12px; height: 8px; padding: 11px 9px; border: 1px solid #e3e4e6; border-radius: 50%; background: #fff; }
.faq__item summary:hover svg { border-color: var(--green); color: var(--green); }
.faq__item p { font-size: 16px; padding-right: 48px; }

/* --- перелинковка и закрывающий блок --- */
.erp-read-more { margin-top: 34px; }
.erp-read-more__list li { margin-bottom: 10px; }
.cta718 { padding: 64px 0 88px; }
.cta718__title { font-size: 28px; line-height: 1.3; text-wrap: balance; }

@media (max-width: 1000px) {
  .article-hero__inner { gap: 32px; }
  .erp-table { font-size: 14px; }
  .erp-table th, .erp-table td { padding: 10px 12px; }
}
@media (max-width: 760px) {
  .article__body section > h2 { font-size: 24px; }
  .article__body section > h2 + p { font-size: 17px; }
  .erp-hero__stats { grid-template-columns: 1fr; }
  .erp-steps { padding: 22px 18px 4px; }
  .erp-steps li { padding-left: 50px; }
  .erp-steps li::before { width: 34px; height: 34px; font-size: 14px; }
  .erp-steps li::after { left: 16px; top: 42px; }
  .erp-steps h3 { margin-top: 3px; font-size: 18px; }
  .erp-step-doc__shot { max-height: none; aspect-ratio: auto; }
  .erp-step-doc__label { padding: 13px 16px 14px; }
  .erp-case { padding: 24px 20px; }
  .erp-case .article-callout { padding: 20px; }
  .price-invite { padding: 26px 22px; }
}

/* ============================================================
   Доводка оформительского слоя (правки владельца от 25.07.2026)
   ============================================================ */

/* Пруф ЕГРЮЛ: transform у плиток создаёт контексты наложения, и карточка
   ныряла под соседние плитки нижнего ряда — поднимаем плитку с пруфом */
.erp-hero__stat--proof {
  z-index: 5;
}

/* Кнопка в тёмной карточке сайдбара: display: block из базового правила
   ломал флекс-центровку текста (текст прилипал к верху), а поля 44px
   выталкивали «Рассчитать стоимость» за края узкой колонки */
.aside-cta .button-green {
  display: flex;
  padding-left: 16px;
  padding-right: 16px;
}

/* Стоимость: шапка таблицы в одну строку, в таблице ориентиров цены
   и сроки не переносятся (перенос ломался на символе рубля) */
#stoimost .erp-table th {
  white-space: nowrap;
}

#stoimost .erp-table:has(th:nth-child(5)) td:nth-child(n + 3) {
  white-space: nowrap;
}

/* Цитаты-примеры в услугах (Додо Пицца и т.п.): немного воздуха
   сверху и снизу, снаружи и внутри. Только прямые потомки секций:
   цитаты внутри карточек отзывов (.erp-case) живут по своим отступам */
.article__body section > .article-callout {
  margin-top: 36px;
  margin-bottom: 36px;
  padding-top: 24px;
  padding-bottom: 24px;
}

/* «Почему у нас»: номерам 01–06 больше воздуха до заголовка */
#pochemu .erp-why__card {
  padding-top: 52px;
}

#pochemu .erp-why__card::before {
  top: 22px;
}

/* ---- дополнения оформительского слоя для этой страницы ---- */
/* крупные превью в кейсах: рамка и радиус, как у примеров этапов */
.erp-case__gif, .erp-case__video {
  border: 1px solid #e3e4e6; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  margin: 18px 0 20px;
}
.erp-case__video-note { margin-top: 20px; font-size: 15px; color: var(--muted); font-weight: 500; }
/* карточки функционала: единая высота строки, спокойный фон */
#funkcional .erp-why__card { background: #fff; border-color: #e7e8ea; }
#funkcional .erp-why__card h3 { color: var(--green); }
/* таблица «что разрабатывать с нуля»: оценка целесообразности — бейджем */
.fit span {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
}
.fit { vertical-align: top; }
.fit--high span { background: #e4f6ed; color: #0a7a49; }
.fit--mid span { background: #fdf3e0; color: #96650a; }
.fit--low span { background: #f2f3f4; color: #6b6f73; }
/* подразделы «какие системы мы разрабатываем» */
.crm-industry { padding-top: 30px; border-top: 1px solid #ebecee; margin-top: 30px; }
.crm-industry:first-of-type { padding-top: 0; border-top: 0; margin-top: 22px; }
.crm-industry > h2 { font-size: 22px; line-height: 1.25; margin: 0 0 10px; }
.crm-industry > h2::before { display: none; }
.crm-industry > p { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 68ch; }
.crm-industry .feed__grid { gap: 18px; margin: 18px 0 14px; }

/* ---- кейсы в портфолио: метка слева, текст справа ---- */
#primery .erp-case { padding: 0; overflow: hidden; background: #fff; border: 1px solid #e5e6e8; box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
#primery .erp-case h3 { margin: 0; padding: 24px 30px 18px; font-size: 21px; line-height: 1.3; }
/* кейс: превью во всю ширину, заголовок плашкой поверх нижнего края */
#primery .erp-case { display: flex; flex-direction: column; }
#primery .erp-case .erp-case__media:has(img) {
  order: -1; position: relative; display: block;
  padding: 0 !important; background: #0f1113; border-bottom: 1px solid #ececee;
}
#primery .erp-case .erp-case__gif {
  display: block; width: 100%; height: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none;
}
#primery .erp-case .erp-case__media h3 {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 54px 30px 20px; font-size: 22px; line-height: 1.3; color: #fff;
  background: linear-gradient(to top, rgba(10,12,14,0.92) 0%, rgba(10,12,14,0.75) 45%, rgba(10,12,14,0) 100%);
  text-shadow: 0 1px 12px rgba(0,0,0,0.45);
}
#primery .erp-case > h3 { margin: 0; padding: 24px 30px 0; }
#primery .erp-case .erp-case__media:has(video) { padding: 0 30px 4px !important; background: transparent; border: 0; }
#primery .erp-case .erp-case__video {
  display: block; width: auto; max-width: 100%; margin: 0 auto;
  background: #14161a; border: 1px solid #e6e7e9; border-radius: 10px; box-shadow: none;
}
/* пропорция 16:9 только у плеера с источником; пустой не раздувает карточку */
#primery .erp-case .erp-case__video:is([src], :has(source)) { aspect-ratio: 16 / 9; }
#primery .erp-case .erp-case__video:not([src]):not(:has(source)) { height: 54px; }
#primery .erp-case > p { margin: 0; padding: 0 30px; }
#primery .erp-case > p:last-child { padding: 18px 30px 26px; }
.erp-case__row {
  display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 4px 18px;
  padding-top: 16px !important; padding-bottom: 16px !important;
  border-bottom: 1px solid #f1f2f3; font-size: 15px; line-height: 1.6;
}
.erp-case__row:first-of-type { padding-top: 22px !important; }
.erp-case__row strong {
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  padding-top: 4px;
}
.erp-case__row--res { background: #f4fbf7; border-bottom-color: #e2f1e9; }
.erp-case__row--res strong { color: var(--green); }
.erp-case__row--res, .erp-case__row--res * { font-weight: 500; }
.erp-case__video-note { padding: 18px 30px 0 !important; }
@media (max-width: 900px) {
  #primery .erp-case { grid-template-columns: minmax(0, 1fr); }
  #primery .erp-case > * { grid-column: 1; }
  #primery .erp-case .erp-case__media h3 { padding: 44px 20px 16px; font-size: 19px; }
}
@media (max-width: 700px) {
  #primery .erp-case h3 { padding: 20px 20px 14px; font-size: 19px; }
  #primery .erp-case > p { padding: 0 20px; }
  #primery .erp-case > p:last-child { padding: 16px 20px 22px; }
  .erp-case__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .erp-case__video-note { padding: 16px 20px 0 !important; }
}

/* Приглашение подписаться: две строки по центру перед содержанием.
   Без подложки и рамки — только волосяные линии сверху и снизу: блок стоит
   в начале материала и не должен спорить с текстом, ради которого пришли */
.social-invite {
  margin: 0 0 26px;
  padding: 12px 0;
  border-top: 1px solid #e6e9e8;
  border-bottom: 1px solid #e6e9e8;
  text-align: center;
}

.social-invite p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: #5c6063;
}

.social-invite a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Телеграм выделен: он основной канал, остальные идут перечислением */
.social-invite__tg {
  font-weight: 700;
  white-space: nowrap;
}

.social-invite__tg svg {
  vertical-align: -1px;
  margin-right: 4px;
}

/* Похожие кейсы в сайдбаре: одна карточка с обложкой, остальные листаются */
.side-cases {
  margin-top: 18px;
}

.side-cases__slide[hidden] {
  display: none;
}

.side-cases__media {
  display: block;
  margin: 10px 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--light-card);
}

/* Пропорция обложек портфолио (380x280): в них вписано название проекта,
   поэтому кадрировать нельзя. Заданная пропорция держит высоту карточки
   ровной при листании. */
.side-cases__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 380 / 280;
  object-fit: cover;
}

.side-cases__title {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--green);
  text-decoration: none;
}

.side-cases__title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.side-cases__why {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.75;
}

.side-cases__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.side-cases__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.side-cases__arrow:hover {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.side-cases__counter {
  font-size: 13px;
  color: var(--muted);
}

/* --- мобильные переполнения, найденные предполётным прогоном (26.07.2026) ---
   Общая причина у всех трёх: элементы флекса и грида по умолчанию не
   сжимаются ниже своего содержимого, а колонки не сворачивались в столбик. */
@media (max-width: 760px) {
  .blog-preview__head {
    flex-direction: column;
    gap: 28px;
  }

  .erp-why,
  .erp-why--cols3 {
    grid-template-columns: 1fr;
  }
}

.blog-preview__head > *,
.erp-why > *,
.article-hero__inner > * {
  min-width: 0;
}
