/*
 * Тема stm2026 — страница: шапка страницы с хлебными крошками, раскладка «меню раздела + текст», текст из
 * редактора (.rich: новые блоки и разметка, которая уже лежит в базе), страница ошибки.
 */

/* --- Шапка страницы: светлый фон с точечной сеткой --- */
.pagehead {
  border-bottom: 1px solid var(--line-2);
  background-color: var(--bg-draft);
  background-image: radial-gradient(rgba(0, 62, 108, .14) 1px, transparent 1.2px);
  background-size: 16px 16px;
}
.pagehead .wrap {
  padding-top: 28px;
  padding-bottom: 40px;
}
.pagehead h1 {
  margin-top: 14px;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: -.015em;
}
.pagehead-lead {
  max-width: 760px;
  margin-top: 12px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.55;
}
/* разделитель крошек — стрелка */
.crumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.crumbs li + li::before {
  content: '';
  width: 6px;
  height: 6px;
  margin: 0 2px 0 0;
  border-top: 1.6px solid #8a97a3;
  border-right: 1.6px solid #8a97a3;
  transform: rotate(45deg);
}
@media (max-width: 767px) {
  .pagehead .wrap {
    padding-top: 16px;
    padding-bottom: 22px;
  }
  .pagehead h1 {
    margin-top: 10px;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -.01em;
  }
  .crumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    font-size: 13px;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .crumbs::-webkit-scrollbar {
    display: none;
  }
}

/* --- Страница с текстом. .page-cols — с левой колонкой (меню и «Остались вопросы?») шириной 300 px, узкая
       колонка (.page-aside-slim) — 264 px; .page-wide — одна колонка текста --- */
.page {
  padding: 44px 0 80px;
}
.page-cols {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
@media (min-width: 1024px) {
  .page-cols:has(> .page-aside-slim) {
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 48px;
  }
}
/* Левая колонка — меню и под ним «Остались вопросы?». При прокрутке длинного текста колонка стоит под шапкой.
   Меню занимает до всей высоты окна под шапкой: когда не помещается, его заголовок стоит на месте, а список
   пунктов прокручивается узкой полосой (.thin-scroll). «Остались вопросы?» в эту высоту не входит: в высоком окне
   он виден сразу под меню, в низком уходит за нижний край окна и показывается, когда текст справа прокручен
   до конца, — тогда колонка поднимается вместе со страницей. */
.page-aside {
  --aside-gap: 20px;
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: var(--aside-gap);
}
.page-aside > * {
  flex: 0 0 auto;
}
/* в совсем низком окне закреплённое меню заняло бы его целиком: колонка идёт вместе со страницей */
@media (max-height: 399px) {
  .page-aside {
    position: static;
  }
  .page-aside > .side {
    max-height: none;
  }
}
.page-cols > .rich {
  max-width: 800px;
}
.page-wide > .rich {
  max-width: 820px;
  margin: 0 auto;
}
/* Меню — карточка; отступ справа держит список: 12 px вместе с местом под его полосу прокрутки (--ts-w).
   Высота — до нижнего края окна за вычетом промежутка колонки: «Остались вопросы?» начинается ровно за краем. */
.page-aside > .side {
  max-height: calc(100vh - var(--header-h) - 24px - var(--aside-gap));
  padding: 10px 0 10px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-16);
  background: #fff;
  overflow: hidden;
}
.side-list {
  flex: 1 1 auto;
  min-height: 0;
  padding-right: calc(12px - var(--ts-w));
}
/* У пункта справа 10 px, а не 12: в макете отступ блока 10 px и отступ пункта 12, здесь под полосу занято 12 px —
   текст пункта и уголок текущего пункта стоят там же, где в макете, и названия переносятся так же */
@media (min-width: 1024px) {
  .page-aside > .side .side-list a {
    padding-right: 10px;
  }
}
.side-cap {
  flex: 0 0 auto;
  padding: 10px 12px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.page-aside-slim .side a {
  padding: 9px 12px;
  font-size: 15px;
  line-height: 1.35;
}
/* уголок — только у текущего пункта; у остальных он места не занимает, название идёт во всю ширину */
.side a .ic {
  display: none;
}
.side [aria-current] .ic {
  display: block;
}
/* «Остались вопросы?» */
.page-help {
  padding: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-16);
  background: var(--bg-draft);
}
.page-help-title {
  color: var(--h);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.page-help p {
  margin: 6px 0 12px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}
.page-help-tel {
  display: block;
  color: var(--h);
  font-size: 21px;
  font-weight: 800;
}
.page-help .btn {
  height: 46px;
  margin-top: 14px;
}
.page-help .ic {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
@media (max-width: 1023px) {
  .page {
    padding: 0 0 32px;
  }
  /* блоки страницы — один под другим во всю ширину окна (stretch: иначе блок с коротким содержимым, например сетка
     партнёров с короткими названиями, ужимался бы по содержимому и справа оставалась пустая полоса) */
  .page-cols {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  /* колонка распадается: меню раздела — над текстом, «Остались вопросы?» — под ним */
  .page-aside {
    display: contents;
  }
  /* содержимое страницы — текст (.rich) либо свой блок (.page-main: сетка партнёров, страница партнёра) */
  .page-cols > .rich,
  .page-cols > .page-main {
    order: 1;
  }
  .page-aside > .page-help {
    order: 2;
  }
  /* меню раздела — строка чипов под заголовком, на том же фоне, что шапка страницы */
  .pagehead-with-nav {
    border-bottom: 0;
  }
  .pagehead-with-nav .wrap {
    padding-bottom: 14px;
  }
  /* пункты — чипы самой строки: список своего блока не образует */
  .side-list {
    display: contents;
  }
  .page-aside > .side {
    flex-direction: row;
    gap: 6px;
    width: 100%;
    padding: 0 var(--gutter) 18px;
    overflow-x: auto;
    border: 0;
    border-bottom: 1px solid var(--line-2);
    border-radius: 0;
    background-color: var(--bg-draft);
    background-image: radial-gradient(rgba(0, 62, 108, .14) 1px, transparent 1.2px);
    background-size: 16px 16px;
  }
  .side-cap,
  .page-aside > .side .ic {
    display: none;
  }
  .page-aside > .side a {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line-3);
    border-radius: 999px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 400;
  }
  .page-aside > .side a[aria-current] {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
  }
  .page-cols > .rich,
  .page-cols > .page-main,
  .page-wide > .rich {
    max-width: none;
    padding: 22px var(--gutter) 32px;
  }
  .page-wide {
    padding: 0;
  }
  /* на узком экране «Остались вопросы?» — тёмная карточка внизу страницы */
  .page-aside > .page-help {
    margin: 0 var(--gutter);
    padding: 22px 20px;
    border: 0;
    background-color: var(--brand);
    background-image: var(--grid-on-brand);
    background-size: 24px 24px;
    color: #fff;
    --focus: var(--yellow);
  }
  .page-help-title {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
  }
  .page-help p {
    margin: 8px 0 16px;
    color: var(--on-blue);
    font-size: 15px;
    line-height: 1.5;
  }
  /* порядок — как на широком экране: телефон, под ним кнопка; телефон по левому краю, как заголовок и подпись */
  .page-help-tel {
    padding: 2px 0 4px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
  }
  .page-help-tel:hover {
    color: #fff;
  }
  .page-help {
    display: flex;
    flex-direction: column;
  }
  .page-help .btn {
    height: 48px;
    margin: 10px 0 0;
  }
}

/* --- Текст из редактора --- */
/* flow-root: блоки с обтеканием из старых текстов (float в разметке базы) остаются внутри текста,
   а не выпадают из него на следующие разделы страницы */
.rich {
  display: flow-root;
  color: var(--text-body);
  font-size: 16.5px;
  line-height: 1.7;
}
.rich > :first-child {
  margin-top: 0;
}
.rich > :last-child {
  margin-bottom: 0;
}
.rich h2 {
  margin: 36px 0 14px;
  font-size: 26px;
  line-height: 1.25;
}
.rich h3 {
  margin: 28px 0 10px;
  font-size: 20px;
  line-height: 1.3;
}
.rich h4 {
  margin: 24px 0 8px;
  color: var(--h);
  font-size: 17px;
  line-height: 1.35;
}
.rich p {
  margin: 0 0 16px;
}
.rich ul,
.rich ol {
  margin: 0 0 18px;
  padding-left: 24px;
}
.rich li {
  margin: 0 0 6px;
  padding-left: 4px;
}
.rich ul li::marker {
  color: var(--accent);
}
.rich ol li::marker {
  color: var(--accent);
  font-weight: 700;
}
/* Ссылка в тексте — в тексте из базы и в любом абзаце — подчёркнута тонкой линией; при наведении подчёркивание
   пропадает. Кнопки и ссылки навигации не подчёркиваются */
.rich a,
p a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.rich a:hover,
p a:not(.btn):hover {
  text-decoration: none;
}
/* ссылка на другой сайт: после текста — значок ↗ */
.ext-link .ic {
  width: 14px;
  height: 14px;
  margin-left: 4px;
  vertical-align: -1px;
  stroke-width: 2;
}
.rich blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r-14) var(--r-14) 0;
  background: var(--bg-draft);
  color: var(--h);
  font-size: 17px;
  line-height: 1.65;
}
.rich blockquote > :last-child {
  margin-bottom: 0;
}
/* Прежние блоки «фото, заголовок, текст» в три колонки (описания СТ 16К20 и СТ 16К25): в базе это блоки с шириной
   и обтеканием в атрибуте style. Оформляются карточками, текст в базе не меняется. */
.rich div[style*="width:100%;float:left"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  float: none !important;
  margin: 28px 0;
}
.rich div[style*="width:300px;float:left"] {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}
.rich div[style*="width:300px;float:left"] img {
  display: block;
  width: 100%;
  border-radius: var(--r-12);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.rich div[style*="width:300px;float:left"] h3 {
  margin: 14px 0 6px !important;
  color: var(--h);
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.3;
}
.rich div[style*="width:300px;float:left"] p {
  margin: 0;
  color: #2f3b46;
  font-size: 15px;
  line-height: 1.6;
}
@media (max-width: 1023px) {
  .rich div[style*="width:100%;float:left"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .rich div[style*="width:100%;float:left"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin: 20px 0;
  }
}
.rich img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-12);
}
/* размеры из style (редактор новостей писал «height:552px; width:980px»): действует только ширина, высота
   считается по пропорциям картинки — иначе в колонке уже этой ширины картинка сплющена */
.rich img[style*="height"] {
  height: auto !important;
}
/* две картинки подряд в одном абзаце — парой (класс ставит скрипт темы); на телефоне — одна под другой */
.rich .rich-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
/* Встроенный ролик занимает ширину текста и держит пропорции 16:9: высота из атрибута height (в текстах базы
   ролики вставлены с размерами 853×480, 980×553) не действует — иначе на узком экране ролик вытянут по высоте. */
.rich iframe,
.rich video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
  border-radius: var(--r-14);
  aspect-ratio: 16 / 9;
}
.rich hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--line-2);
}
/* Таблица. Строка заголовков — ячейки <th> либо td.ctd1 (так их размечал редактор в прежнем оформлении).
   Скрипт темы кладёт таблицу в обёртку с прокруткой и размечает простые таблицы вида «параметр — единица —
   значения» классами tbl-*: первый столбец закрепляется при прокрутке, а на телефоне строки таблицы
   с одним–тремя значениями становятся карточками. Сама разметка таблицы в базе не меняется. */
.rich table {
  width: 100%;
  margin: 8px 0 20px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  line-height: 1.5;
}
/* Скрипты выключены: таблицу некому обернуть в прокручиваемый блок (.table-scroll) — она прокручивается сама
   и страницу на узком экране не распирает. */
@media (scripting: none) {
  .rich table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}
.rich td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.rich th,
.rich td.ctd1 {
  padding: 14px 16px;
  border-bottom: 0;
  background: var(--bg-sec);
  color: var(--h);
  font-weight: 600;
  text-align: left;
}
.rich th:first-child,
.rich td.ctd1:first-child {
  border-radius: var(--r-10) 0 0 var(--r-10);
}
.rich th:last-child,
.rich td.ctd1:last-child {
  border-radius: 0 var(--r-10) var(--r-10) 0;
}
.rich th:only-child,
.rich td.ctd1:only-child {
  border-radius: var(--r-10);
}
.table-scroll {
  margin: 8px 0 20px;
  overflow-x: auto;
}
.table-scroll > table {
  margin: 0;
}
/* таблица шире своего места: правый край затухает, пока есть что прокручивать */
.table-scroll.is-scroll:not(.at-end) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
/* простая таблица: параметр — обычным начертанием, единица — серым, значения — полужирным */
.rich .tbl-label,
.rich .tbl-label b {
  color: var(--text-body);
  font-weight: 400;
}
.rich .tbl-unit,
.rich .tbl-unit b {
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}
.rich .tbl-val {
  color: var(--h);
  font-weight: 600;
}
/* строка-заголовок группы параметров */
.rich .tbl-group > * {
  padding: 22px 16px 8px;
  border-bottom: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.rich .tbl-group b {
  font-weight: inherit;
}
.is-scroll > .tbl .tbl-label,
.is-scroll > .tbl .tbl-head > :first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 220px;
  box-shadow: 1px 0 0 var(--line);
}
.is-scroll > .tbl .tbl-label {
  background: #fff;
}
.is-scroll > .tbl .tbl-group-in {
  position: sticky;
  left: 16px;
}
/* ролики Flash из старых текстов: проигрывателя для них нет ни в одном браузере, пустая рамка не выводится */
.rich object[type="application/x-shockwave-flash"] {
  display: none;
}

/* Разметка, которая уже есть в текстах базы (её расставил редактор в прежнем оформлении) */
.rich .tac {
  text-align: center;
}
.rich .tar {
  text-align: right;
}
.rich img.img_border {
  border: 1px solid var(--line-2);
}
/* галерея превью в тексте: превью 3:2, фото открываются в окне просмотра */
.rich ul.sc_menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}
.rich ul.sc_menu li {
  margin: 0;
  padding: 0;
}
.rich ul.sc_menu a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-10);
  aspect-ratio: 3 / 2;
}
.rich ul.sc_menu img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  transition: opacity var(--t);
}
.rich ul.sc_menu a:hover img {
  opacity: .88;
}
.rich ul.sc_menu span {
  display: none;
}
/* длинная галерея в тексте с атрибутом data-gallery-cut (новости): два ряда превью — четыре в ряд, на телефоне
   три; на последнем видимом превью — сколько фото ещё есть. Лишние превью помечает скрипт темы (cut-wide,
   cut-narrow — он же знает, сколько превью видно); в окне просмотра листаются все фото */
.rich[data-gallery-cut] ul.sc_menu {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.rich ul.sc_menu a[data-more-wide]::after,
.rich ul.sc_menu a[data-more-narrow]::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 30, 60, .62);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
@media (min-width: 768px) {
  .rich ul.sc_menu .cut-wide {
    display: none;
  }
  .rich ul.sc_menu a[data-more-wide]::after {
    content: attr(data-more-wide);
  }
}
/* сертификаты и дипломы: сетка карточек с подписью */
.rich .diplom {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.rich .diplom > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-14);
  background: #fff;
  text-align: center;
}
.rich .diplom p {
  margin: 0;
  color: var(--h);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.rich .diplom img {
  border: 1px solid var(--line-2);
  border-radius: var(--r-8);
}
/* Список видео. Заголовок и ролик карточки стоят в общих строках сетки списка (subgrid): заголовки соседних
   карточек получаются одной высоты, и ролики начинаются на одной линии, даже когда один заголовок в две строки. */
.rich ul.video {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px 24px;
  padding: 0;
  list-style: none;
}
.rich ul.video > li {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  row-gap: 10px;
  margin: 0;
  padding: 0;
}
.rich ul.video h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}
/* размеры текста и заголовков на телефоне те же, что на широком экране: так в мобильных макетах */
@media (max-width: 767px) {
  .rich .rich-pair {
    grid-template-columns: minmax(0, 1fr);
  }
  /* три превью в ряд; ровно четыре фото (так устроено большинство галерей новостей) — два ряда по два, а не «три и одно» */
  .rich ul.sc_menu,
  .rich[data-gallery-cut] ul.sc_menu {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }
  .rich ul.sc_menu li {
    grid-column: span 2;
  }
  .rich ul.sc_menu li:first-child:nth-last-child(4),
  .rich ul.sc_menu li:first-child:nth-last-child(4) ~ li {
    grid-column: span 3;
  }
  .rich ul.sc_menu a {
    border-radius: var(--r-8);
  }
  .rich ul.sc_menu .cut-narrow {
    display: none;
  }
  .rich ul.sc_menu a[data-more-narrow]::after {
    content: attr(data-more-narrow);
  }
  .rich .diplom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .rich .diplom > div {
    padding: 10px;
  }
  .rich .diplom p {
    font-size: 13px;
  }
  .rich ul.video {
    grid-template-columns: minmax(0, 1fr);
  }
  .is-scroll > .tbl .tbl-label,
  .is-scroll > .tbl .tbl-head > :first-child {
    min-width: 140px;
  }
  /* простая таблица с одним–тремя значениями — карточками: параметр с единицей, под ним значения с подписями столбцов */
  .rich .tbl-cards,
  .rich .tbl-cards > thead,
  .rich .tbl-cards > tbody,
  .rich .tbl-cards td,
  .rich .tbl-cards th {
    display: block;
  }
  .rich .tbl-cards .tbl-head,
  .rich .tbl-cards .tbl-unit {
    display: none;
  }
  .rich .tbl-cards tr {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .rich .tbl-cards td,
  .rich .tbl-cards th {
    min-width: 0;
    padding: 0;
    border: 0;
  }
  .rich .tbl-cards .tbl-label {
    flex: 0 0 100%;
    color: var(--text-2);
    font-size: 14px;
  }
  .rich .tbl-cards .tbl-label b {
    color: inherit;
  }
  .rich .tbl-cards .tbl-label[data-unit]::after {
    content: ', ' attr(data-unit);
  }
  .rich .tbl-cards .tbl-val {
    font-size: 15px;
    font-weight: 700;
  }
  .rich .tbl-cards .tbl-val[data-th]::before {
    content: attr(data-th);
    margin-right: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
  }
  .rich .tbl-cards .tbl-group {
    padding: 22px 0 8px;
    border-bottom: 0;
  }
}

/* ссылки администратора «Редактировать / Удалить» под страницей */
.admin-edit {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-3);
  font-size: 14px;
}

/* --- Страница ошибки --- */
.errpage .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 64px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 88px;
}
.errpage h1 {
  margin: 10px 0 14px;
  font-size: 44px;
  line-height: 1.1;
}
.errpage-text {
  max-width: 560px;
  margin-bottom: 26px;
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.6;
}
.errpage .search {
  width: 100%;
  max-width: 520px;
  height: 52px;
  border: 1px solid var(--line-3);
  border-radius: var(--r-12);
}
.errpage .search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 111, 208, .2);
}
.errpage .search input {
  font-size: max(15.5px, var(--field-fs-min));
}
.errpage .search button {
  width: 40px;
  height: 40px;
}
.errpage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 32px;
}
.errpage-actions .ic {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.errpage-cap {
  margin-bottom: 12px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}
.errpage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.errpage-chips .chip {
  padding: 0 14px;
  font-size: 14px;
}
/* «чертёж» с номером ошибки */
.errpage-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 40px;
  border-radius: 24px;
  background-color: var(--brand);
  background-image: var(--grid-on-brand);
  background-position: center;
  background-size: 24px 24px;
  color: #fff;
}
.errpage-art::before,
.errpage-art::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--yellow);
}
.errpage-art::before {
  left: 16px;
  top: 16px;
  border-width: 2px 0 0 2px;
}
.errpage-art::after {
  right: 16px;
  bottom: 16px;
  border-width: 0 2px 2px 0;
}
.errpage-code {
  color: transparent;
  font-size: clamp(120px, 21vw, 260px);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.04em;
  -webkit-text-stroke: 2px rgba(255, 255, 255, .85);
}
.errpage-dim {
  position: relative;
  width: 82%;
  height: 22px;
  margin-top: 18px;
  border-right: 1.5px solid var(--on-dark-link);
  border-left: 1.5px solid var(--on-dark-link);
}
.errpage-dim::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  border-top: 1.5px solid var(--on-dark-link);
}
.errpage-dim span {
  position: absolute;
  left: 50%;
  top: -2px;
  padding: 0 10px;
  background: var(--brand);
  color: var(--on-dark-link);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
  transform: translateX(-50%);
}
@media (max-width: 1023px) {
  .errpage .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 28px;
    padding-bottom: 40px;
  }
  .errpage h1 {
    font-size: 30px;
  }
  .errpage-text {
    font-size: 16px;
  }
  .errpage-art {
    order: -1;
    padding: 24px 16px 28px;
    border-radius: var(--r-18);
  }
}
@media (max-width: 767px) {
  /* на телефоне кнопки страницы ошибки — во всю ширину, одна под другой */
  .errpage-actions .btn {
    width: 100%;
  }
}

/* --- Строка «Редакция от …» и оглавление над текстом страницы в одну колонку --- */
.rich .page-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.page-meta .ic {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
/* Разделы одной страницы списком (tpl_jump): на узком экране вместо строки чипов меню. Со скриптом — список,
   меню скрыто; без скрипта списка нет и остаётся строка чипов. */
.page-jump {
  display: none;
}
@media (max-width: 767px) {
  .page-jump:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
  }
  .page-jump label {
    color: var(--h);
    font-size: 13px;
    font-weight: 600;
  }
  .page-jump-box {
    position: relative;
    display: block;
  }
  .page-jump select {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 14px;
    border: 1px solid var(--line-3);
    border-radius: var(--r-10);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: max(15px, var(--field-fs-min));
    appearance: none;
  }
  .page-jump .ic {
    position: absolute;
    top: 15px;
    right: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-2);
    stroke-width: 2;
    pointer-events: none;
  }
  .js .page-aside-jump > .side {
    display: none;
  }
}
/* место, к которому ведёт ссылка-якорь, не прячется под закреплённой шапкой: отступ задан один раз, у страницы
   (base.css, scroll-padding-top) */

/* ========================= Страница из универсальных блоков =========================
   Текст страницы, написанный для нового оформления (панель управления → «Страницы» → «Текст для нового оформления»),
   собирается из блоков ниже и занимает всю ширину колонки. Классы блоков ставит автор текста. */

.page-cols > .rich-wide,
.page-wide > .rich-wide {
  max-width: none;
}
/* заголовки разделов страницы и расстояние между блоками */
.rich-wide > h2,
.rich-wide > .sec-head,
.rich-wide > .rich-split,
.rich-wide > .rich-cta,
.rich-wide > .supply {
  margin-top: 72px;
}
.rich-wide > h2,
.rich-wide .sec-head h2,
.rich-split h2,
.rich-cta h2 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}
.rich-wide > h2 {
  margin-bottom: 22px;
}
.rich-wide > :first-child {
  margin-top: 0;
}
.rich-wide .sec-head {
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}
.rich-wide .sec-head h2 {
  margin: 0;
}
/* ссылка рядом с заголовком раздела: своя высота строки, а не строки текста — иначе строка заголовка выше макета */
.rich .sec-more {
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
}

/* --- Шапка страницы (<header class="page-top"> в начале текста): фото во всю ширину, фраза и показатели --- */
.page-has-top {
  padding-top: 0;
}
.page-top {
  position: relative;
  margin-bottom: 56px;
  overflow: hidden;
  background-color: var(--brand);
  background-image: var(--grid-on-brand);
  background-size: 32px 32px;
  color: #fff;
}
.hero-photo {
  position: relative;
  display: block;
  height: 560px;
}
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 62, 108, 0) 0%, rgba(0, 62, 108, 0) 70%, rgba(0, 62, 108, .85) 92%, var(--brand) 100%);
}
.hero-text {
  position: relative;
  max-width: var(--wrap);
  margin: -56px auto 0;
  padding: 0 var(--gutter) 44px;
}
.hero-lead {
  max-width: 820px;
  margin: 0 0 22px;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

/* --- Показатели: 2–4 плитки «число — подпись»; в шапке страницы — на синем --- */
.rich-figs,
.rich .rich-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  grid-auto-flow: column;
  gap: 16px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}
.rich-figs li {
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-16);
  background: #fff;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.4;
}
.rich-figs b {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
}
.page-top .rich-figs {
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-16);
  background: rgba(255, 255, 255, .06);
}
.page-top .rich-figs li {
  padding: 22px 24px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .18);
  border-radius: 0;
  background: none;
  color: var(--on-blue);
}
.page-top .rich-figs li:first-child {
  border-left: 0;
}
/* слово в показателе не рвётся: размер следует за шириной окна (38 px на макете 1440), и «Минпромторг» помещается
   в четверть ширины */
.page-top .rich-figs b {
  color: #fff;
  font-size: clamp(22px, 2.64vw, 38px);
  overflow-wrap: normal;
  white-space: nowrap;
}

/* --- Текст и фото: две колонки; .is-reverse — фото слева; на телефоне фото всегда после текста --- */
.rich-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: center;
}
.rich-split h2 {
  margin: 0 0 16px;
}
.rich-split > div > :last-child {
  margin-bottom: 0;
}
.rich-split > img {
  display: block;
  width: 100%;
  border-radius: var(--r-20);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.rich-split.is-reverse > img {
  order: -1;
}

/* --- Блок с кнопкой на синем: заголовок, строка текста и кнопка справа --- */
.rich-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 32px;
  padding: 40px 44px;
  border-radius: var(--r-20);
  background-color: var(--brand);
  background-image: var(--grid-on-brand);
  background-size: 32px 32px;
  color: #fff;
}
.rich-cta > div {
  max-width: 680px;
}
.rich-cta h2 {
  margin: 0;
  color: #fff;
}
.rich-cta p {
  margin: 10px 0 0;
  color: var(--on-blue);
  font-size: 16.5px;
  line-height: 1.6;
}
.rich .btn {
  color: #fff;
  text-decoration: none;
}
.rich .btn-o {
  color: var(--brand);
}
.rich-cta .btn {
  height: 52px;
}

/* --- Преимущества: плитки со значком --- */
.rich .rich-adv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rich-adv li {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-16);
  background: #fff;
  color: var(--h);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}
.rich-adv .ic {
  display: block;
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: var(--r-12);
  background: var(--bg-tint);
  color: var(--link);
  stroke-width: 2;
}
.rich-adv span {
  display: block;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 400;
}

/* --- Фото плитками 3:2; открываются в окне просмотра --- */
.rich .rich-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rich-gallery li {
  margin: 0;
  padding: 0;
}
.rich-gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--r-14);
  aspect-ratio: 3 / 2;
}
.rich-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  transition: transform .3s;
}
.rich-gallery a:hover img {
  transform: scale(1.04);
}
.rich .hv,
.rich .video-frame {
  border-radius: var(--r-18);
}
.rich .hv img {
  border-radius: 0;
}

/* --- География поставок: показатели, карта и условные знаки на синем --- */
.supply {
  overflow: hidden;
  border-radius: var(--r-20);
  background-color: var(--brand);
  background-image: var(--grid-on-brand);
  background-size: 24px 24px;
  color: #fff;
}
.supply-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 36px 0;
}
.supply-over {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.supply h2 {
  margin: 8px 0 0;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
}
.supply .supply-figs {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.supply-figs li {
  margin: 0;
  padding: 0 22px;
  border-left: 1px solid rgba(255, 255, 255, .18);
}
.supply-figs b {
  display: block;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}
.supply-figs span {
  display: block;
  margin-top: 4px;
  color: var(--on-blue);
  font-size: 13.5px;
}
.supply-map {
  padding-top: 4px;
}
.smap {
  display: block;
  width: 100%;
  height: auto;
}
.smap-mobile {
  display: none;
}
.smap-arcs {
  fill: none;
  stroke: rgba(124, 192, 255, .45);
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
}
.smap-dots circle,
.smap-marked circle {
  fill: var(--yellow);
  stroke: var(--brand);
  stroke-width: 1;
}
.smap-marked circle {
  stroke-width: 1.5;
}
.smap-mobile .smap-dots circle {
  stroke-width: .8;
}
.smap-labels text {
  fill: #fff;
  stroke: var(--brand);
  stroke-width: 3;
  paint-order: stroke;
  font-size: 12px;
  font-weight: 600;
}
.smap-halo {
  fill: #fff;
  fill-opacity: .18;
}
.smap-factory {
  fill: #fff;
  stroke: var(--accent);
  stroke-width: 3;
}
.supply-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 36px 22px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--on-blue);
  font-size: 13px;
}
.supply-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.supply-key::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
}
.supply-key-factory::before {
  width: 12px;
  height: 12px;
  margin: 0 3px;
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent);
}

@media (max-width: 1023px) {
  /* меню раздела здесь — строка чипов под заголовком: шапка страницы встаёт под ней, а не над ней */
  .page-has-top {
    display: flex;
    flex-direction: column;
  }
  .page-has-top > .page-cols {
    display: contents;
  }
  .page-has-top .page-aside > .side {
    order: -1;
  }
  .page-top {
    margin-bottom: 18px;
  }
  .hero-photo {
    height: 420px;
  }
  .hero-lead {
    font-size: 26px;
  }
  .page-top .rich-figs li {
    padding: 18px 16px;
  }
  .rich-split {
    gap: 28px;
  }
  .rich .rich-adv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* рядом с меню раздела колонки «текст и фото» узкие: заголовок меньше, чтобы длинное слово не рвалось */
@media (min-width: 1024px) and (max-width: 1279px) {
  .page-cols .rich-split h2 {
    font-size: 24px;
  }
}
/* четыре показателя шапки на узком планшете в ряд не помещаются (длинное слово рвётся) — два ряда по два */
@media (min-width: 768px) and (max-width: 899px) {
  .page-top .rich-figs:has(li:nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
  }
  .page-top .rich-figs:has(li:nth-child(4)) li:nth-child(odd) {
    border-left: 0;
  }
  .page-top .rich-figs:has(li:nth-child(4)) li:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, .18);
  }
}
@media (max-width: 767px) {
  .rich-wide > h2,
  .rich-wide > .sec-head,
  .rich-wide > .rich-split,
  .rich-wide > .rich-cta,
  .rich-wide > .supply {
    margin-top: 32px;
  }
  .rich-wide > h2,
  .rich-wide .sec-head h2,
  .rich-cta h2 {
    font-size: 22px;
  }
  /* заголовок блока «текст и фото» на телефоне — как обычный заголовок текста (так в мобильном макете) */
  .rich-split h2 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
  }
  /* и отступ над ним такой же, когда блоки идут подряд: от фото до следующего заголовка — как до заголовка в тексте */
  .rich-wide > .rich-split + .rich-split {
    margin-top: 36px;
  }
  .rich .sec-more {
    font-size: 14.5px;
  }
  .rich-wide > h2 {
    margin-bottom: 12px;
  }
  .rich-wide .sec-head {
    margin-bottom: 12px;
  }
  /* шапка страницы на телефоне: фото 4:3, ниже на светлом — фраза и показатели по два в ряд */
  .page-top {
    margin-bottom: 0;
    background: #fff;
    color: var(--text);
  }
  .hero-photo {
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .hero-photo::after {
    content: none;
  }
  .hero-text {
    margin: 0;
    padding: 20px var(--gutter) 8px;
  }
  .hero-lead {
    margin-bottom: 16px;
    color: var(--h);
    font-size: 20px;
    line-height: 1.3;
  }
  .rich .rich-figs,
  .page-top .rich-figs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    gap: 10px;
    overflow: visible;
    border: 0;
    background: none;
  }
  /* на макете 390 px — поля 14 px и число 21 px; на окне уже поля и число уменьшаются, чтобы самое длинное слово
     («сертифицированная», «Минпромторг») помещалось в плитку */
  .rich-figs li,
  .page-top .rich-figs li {
    padding: 14px clamp(11px, calc(6.67vw - 12px), 14px);
    border: 1px solid var(--line-2);
    border-radius: var(--r-14);
    background: #fff;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.35;
  }
  .rich-figs b,
  .page-top .rich-figs b {
    margin-bottom: 4px;
    color: var(--brand);
    font-size: clamp(17px, calc(7vw - 6.3px), 21px);
    white-space: normal;
  }
  /* самый узкий телефон: показатели — по одному в ряд */
  @media (max-width: 359px) {
    .rich .rich-figs,
    .page-top .rich-figs {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .rich-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .rich-split h2 {
    margin-bottom: 10px;
  }
  .rich-split > img,
  .rich-split.is-reverse > img {
    order: 0;
    border-radius: var(--r-14);
    aspect-ratio: auto;
  }
  .rich-cta {
    padding: 24px 20px;
    border-radius: var(--r-16);
  }
  .rich-cta p {
    font-size: 15px;
    line-height: 1.55;
  }
  .rich-cta .btn {
    width: 100%;
    height: 48px;
  }
  .rich-cta > p {
    width: 100%;
    margin: 0;
  }
  /* преимущества — строками со значком */
  .rich .rich-adv {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .rich-adv li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    background: none;
    font-size: 15px;
    font-weight: 600;
  }
  .rich-adv .ic {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 10px;
    border-radius: var(--r-10);
  }
  /* фото — лентой */
  .rich .rich-gallery {
    display: flex;
    gap: 10px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 6px;
    overflow-x: auto;
  }
  .rich-gallery li {
    flex: 0 0 260px;
  }
  .rich-gallery a {
    border-radius: var(--r-12);
  }
  .rich .hv,
  .rich .video-frame {
    border-radius: var(--r-14);
  }
  .supply {
    border-radius: var(--r-16);
  }
  .supply-head {
    display: block;
    padding: 20px 18px 6px;
  }
  .supply-over {
    font-size: 12px;
  }
  .supply h2 {
    margin: 6px 0 14px;
    font-size: 22px;
    line-height: 1.2;
  }
  /* три показателя — равные плитки во всю ширину; число в одну строку, подпись — при нужде в две */
  .supply .supply-figs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .supply-figs li {
    min-width: 0;
    padding: 12px 6px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--r-12);
    background: rgba(255, 255, 255, .06);
    text-align: center;
  }
  .supply-figs b {
    font-size: 22px;
  }
  .supply-figs span {
    font-size: 12.5px;
    line-height: 1.2;
  }
  .supply-map {
    padding: 6px 8px 4px;
  }
  .smap-desktop {
    display: none;
  }
  .smap-mobile {
    display: block;
  }
  .supply-legend {
    gap: 6px 14px;
    padding: 8px 18px 20px;
    border-top: 0;
    font-size: 12.5px;
  }
  .supply-key::before {
    width: 7px;
    height: 7px;
  }
  .supply-key-factory::before {
    width: 10px;
    height: 10px;
    margin: 0 2px;
    box-shadow: 0 0 0 2px var(--accent);
  }
}
