/*
 * RB-M-LTE2 — стили страницы модема.
 * Подключается из макета YOOtheme (элемент HTML «Стили страницы»).
 * Все правила ограничены классами rbm-*, чтобы не влиять на остальной сайт.
 * Цвета и шрифты — из темы new.redbees.ru: красный #C80002, графит #2B2A29,
 * текст #434446, заголовки Roboto Condensed, текст Helvetica Neue 300.
 */
:root {
  --rbm-red: #c80002;
  --rbm-red-soft: #f54f43;
  --rbm-dark: #2b2a29;
  --rbm-text: #434446;
  --rbm-line: #e5e5e5;
  --rbm-muted: #fafafa;
  --rbm-head: "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --rbm-hex: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}

/* ---------- общие ---------- */
/* В теме нет начертания Roboto Condensed 700 для латиницы — без запасного шрифта
   латинские буквы в заголовках (EDGE, TinyML, MCP) рисуются засечками. */
.rbm h1, .rbm h2, .rbm h3, .rbm h4, .rbm h5, .rbm h6,
.rbm .uk-h1, .rbm .uk-h2, .rbm .uk-h3, .rbm .uk-h4, .rbm .uk-h5, .rbm .uk-h6,
.rbm .uk-tab > * > a, .rbm .uk-accordion-title {
  font-family: var(--rbm-head);
}
.rbm-eyebrow {
  font-family: var(--rbm-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rbm-red);
  display: flex;
  align-items: center;
  gap: 10px;
}
.rbm-eyebrow::before {
  content: "";
  width: 14px; height: 14px;
  background: var(--rbm-red);
  clip-path: var(--rbm-hex);
  flex: none;
}
.rbm-figure img { border-radius: 4px; }
.rbm-figure a { display: block; cursor: zoom-in; }

/* ---------- hero ---------- */
.rbm-hero { position: relative; overflow: hidden; }
.rbm-hero::before {
  /* мягкий «соты»-фон справа */
  content: "";
  position: absolute; right: -120px; top: -60px;
  width: 640px; height: 640px;
  background:
    radial-gradient(circle at 50% 50%, rgba(200, 0, 2, .08), rgba(200, 0, 2, 0) 62%);
  pointer-events: none;
}
.rbm-hero-title {
  font-family: var(--rbm-head);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.12;
  text-transform: uppercase;
  color: var(--rbm-dark);
}
@media (min-width: 960px) { .rbm-hero-title { font-size: 46px; } }
.rbm-hero .uk-text-lead { font-size: 18px; line-height: 1.6; color: var(--rbm-text); }
.rbm-hero-media { position: relative; }
.rbm-hero-media::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: min(92%, 440px); aspect-ratio: 1.1547;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(200, 0, 2, .14), rgba(200, 0, 2, .02));
  clip-path: var(--rbm-hex);
  z-index: 0;
}
.rbm-hero-media img {
  position: relative; z-index: 1;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .22));
  max-height: 520px; width: auto;
}

/* ---------- полоса ключевых цифр ---------- */
/* Разметка YOOtheme 1.4.3: класс элемента Grid стоит на самой сетке (.uk-grid),
   у элементов нет классов el-title / el-content / el-meta. */
.rbm-stats > * > .uk-panel {
  border-left: 3px solid var(--rbm-red);
  padding: 4px 0 4px 14px;
}
.rbm-stats h3 {
  font-family: var(--rbm-head);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--rbm-dark);
  text-transform: none;
  margin: 0 !important;
}
.rbm-stats .uk-panel > div { margin-top: 6px !important; font-size: 14px; line-height: 1.45; }

/* ---------- навигация по странице ---------- */
.rbm-pagenav-section { border-top: 1px solid var(--rbm-line); border-bottom: 1px solid var(--rbm-line); }
.rbm-pagenav { background: #fff; }
.rbm-pagenav.rbm-pagenav-stuck { box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.rbm-pagenav .uk-subnav { padding: 12px 0; row-gap: 6px; }
.rbm-pagenav .uk-subnav > * > a {
  font-family: var(--rbm-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--rbm-text);
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.rbm-pagenav .uk-subnav > * > a:hover,
.rbm-pagenav .uk-subnav > .uk-active > a { color: var(--rbm-red); border-bottom-color: var(--rbm-red); }
@media (max-width: 639px) {
  .rbm-pagenav .uk-subnav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start !important; }
  .rbm-pagenav .uk-subnav > * { flex: none; }
}

/* ---------- карточки ---------- */
.rbm-cards .uk-card, .rbm-flow .uk-card, .rbm-steps .uk-card, .rbm-models .uk-card,
.rbm-hex-steps .uk-card {
  transition: transform .2s ease, box-shadow .2s ease;
  border-top: 3px solid transparent;
}
.rbm-cards .uk-card:hover, .rbm-models .uk-card:hover {
  transform: translateY(-4px);
  border-top-color: var(--rbm-red);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .10);
}
.rbm-cards .uk-card div.uk-margin, .rbm-flow .uk-card div.uk-margin,
.rbm-models .uk-card div.uk-margin { font-size: 15px; line-height: 1.55; }
.rbm-flow .uk-card img { display: block; margin: 0 auto 14px; }

/* ---------- схема «шаги» ---------- */
.rbm-flow > * { position: relative; }
@media (min-width: 960px) {
  .rbm-flow > *:not(:last-child)::after {
    content: "";
    position: absolute; right: -24px; top: 50%;
    width: 18px; height: 18px;
    border-top: 3px solid var(--rbm-red);
    border-right: 3px solid var(--rbm-red);
    transform: translateY(-50%) rotate(45deg);
    z-index: 2;
  }
}
.rbm-flow .uk-text-meta, .rbm-steps .uk-text-meta, .rbm-hex-steps .uk-text-meta {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 34px; padding: 0 8px;
  background: var(--rbm-red); color: #fff !important;
  clip-path: var(--rbm-hex);
  font-family: var(--rbm-head); font-weight: 700; font-size: 15px;
  letter-spacing: .02em; text-transform: uppercase;
}
.rbm-flow .uk-text-meta { min-width: 72px; }
.rbm-flow .uk-text-meta + h3, .rbm-steps .uk-text-meta + h3, .rbm-hex-steps .uk-text-meta + h3 { margin-top: 12px !important; }

/* ---------- характеристики ---------- */
/* Переключатели выводятся с навигацией «снизу» (обход Warning шаблона 1.4.3 под PHP 8),
   здесь навигация визуально поднимается наверх. */
.rbm-specs, .rbm-code-switcher { display: flex; flex-direction: column; }
.rbm-specs > [uk-tab], .rbm-specs > .uk-tab,
.rbm-code-switcher > [uk-switcher], .rbm-code-switcher > .uk-subnav { order: -1; margin-top: 0 !important; }
.rbm-specs > .uk-switcher, .rbm-code-switcher > .uk-switcher { margin-top: 20px; }
.rbm-specs .uk-tab > * > a { font-family: var(--rbm-head); font-weight: 700; font-size: 15px; }
.rbm-specs .uk-tab > .uk-active > a { border-color: var(--rbm-red); color: var(--rbm-dark); }
.rbm-spec-table td { vertical-align: top; }
.rbm-spec-table td:first-child {
  width: 34%;
  color: var(--rbm-dark);
  font-weight: 400;
}
@media (max-width: 639px) {
  .rbm-spec-table td { display: block; width: auto !important; padding-left: 0; }
  .rbm-spec-table td:first-child { padding-bottom: 0; font-weight: 700; }
}
.rbm-specs .uk-switcher { background: #fff; padding: 8px 24px 16px; box-shadow: 0 5px 15px rgba(0, 0, 0, .06); }

/* ---------- код ---------- */
.rbm-pre {
  background: #1f2023;
  color: #f2f2f2;
  border: 0;
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}
.rbm-pre code { color: inherit; background: none; font-size: inherit; padding: 0; }
.rbm-steps .rbm-pre { font-size: 12px; padding: 10px 12px; }
.rbm-steps .uk-card p { margin: 0 0 8px; font-size: 14px; }
.rbm-code-switcher .uk-subnav-pill > .uk-active > a { background: var(--rbm-red); color: #fff; }
.rbm-prompts li .uk-grid > :last-child { font-style: italic; }

/* ---------- ML Studio ---------- */
.rbm-hex-steps .uk-text-meta { width: 46px; height: 40px; font-size: 18px; }
.rbm-hex-steps .uk-card div.uk-margin:not(.uk-text-meta) { font-size: 13px; line-height: 1.4; margin-top: 6px; }
.rbm-ml-req li .uk-grid > :last-child { font-size: 14px; }

/* ---------- приложения / модели ---------- */
.rbm-models .uk-text-meta {
  font-family: var(--rbm-head); font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  font-size: 12px; color: var(--rbm-red) !important;
}
.rbm-apps strong { display: block; font-family: "SFMono-Regular", Consolas, monospace; font-weight: 400; font-size: 14px; color: var(--rbm-red); }
.rbm-cases .uk-accordion-title { font-family: var(--rbm-head); font-weight: 700; text-transform: uppercase; font-size: 18px; }

/* ---------- загрузки ---------- */
.rbm-downloads .uk-tab > * > a { font-family: var(--rbm-head); font-weight: 700; font-size: 15px; }
.rbm-dl-table { background: #fff; box-shadow: 0 5px 15px rgba(0, 0, 0, .06); }
.rbm-dl-table td { vertical-align: middle; }
.rbm-dl-title { color: var(--rbm-dark); font-weight: 400; }
.rbm-dl-notes { font-size: 13px; color: #8a8a8a; margin-top: 2px; }
.rbm-dl-badge {
  display: inline-block; margin-left: 8px; padding: 1px 8px;
  font-family: var(--rbm-head); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--rbm-red); border-radius: 2px; vertical-align: 2px;
}
.rbm-dl-badge.is-soon { background: #9a9a9a; }
.rbm-dl-icon { width: 36px; height: 36px; display: block; }
.rbm-dl-icon-cell { width: 36px; }
.rbm-dl-table th { font-family: var(--rbm-head); font-weight: 700; }
.rbm-dl-table .uk-button[disabled] { opacity: .55; cursor: not-allowed; }
.rbm-dl-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rbm-dl-action { text-align: right; width: 1%; }
.rbm-nowrap { white-space: nowrap; }
.rbm-dl-desc { color: #6d6d6d; font-size: 15px; }
.rbm-dl-count {
  display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px;
  font-size: 11px; line-height: 18px; text-align: center;
  color: #fff; background: #b5b5b5; border-radius: 9px; vertical-align: 1px;
}
.rbm-dl-tabs > .uk-active .rbm-dl-count { background: var(--rbm-red); }
.rbm-dl-tabs > * > a { cursor: pointer; }
.rbm-dl-pane[hidden] { display: none; }
.rbm-dl-meta-s { display: none; font-size: 13px; color: #8a8a8a; }
@media (max-width: 639px) {
  .rbm-dl-table .rbm-dl-hide-s { display: none; }
  .rbm-dl-meta-s { display: block; }
  .rbm-dl-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .rbm-dl-tabs > * { flex: none; }
}

/* ---------- CTA ---------- */
.rbm-cta { border-top: 4px solid var(--rbm-red); }
@media (min-width: 960px) { .rbm-cta-buttons { text-align: right; } }

/* описание готовых приложений: заголовок над текстом */
.rbm-apps li > div { font-size: 15px; margin-top: 2px; }

/* команды в карточках шагов переносятся, без горизонтальной прокрутки */
.rbm-steps .rbm-pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Вкладки, поднятые наверх, выглядят как обычные (UIkit добавляет им uk-tab-bottom) */
.rbm-specs .uk-tab-bottom > * > a { border-top: 0; border-bottom: 2px solid transparent; }
.rbm-specs .uk-tab-bottom > .uk-active > a { border-bottom-color: var(--rbm-red); }
.rbm-specs .uk-tab > * > a:hover { color: var(--rbm-dark); }

/* загрузки: дополнительные ссылки и контрольная сумма */
.rbm-dl-links { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.rbm-dl-link { color: var(--rbm-red); }
.rbm-dl-link::after { content: " →"; }
.rbm-dl-hash { margin-top: 2px; font-size: 12px; color: #9a9a9a; }
.rbm-dl-hash code { font-size: 11px; color: #8a8a8a; background: none; padding: 0; }
.rbm-dl-notes { overflow-wrap: anywhere; }

/* распиновка */
.rbm-pin-table { margin-top: 8px; }
.rbm-pin-table td:first-child { white-space: nowrap; width: 1%; }
.rbm-pin { font-family: var(--rbm-head); font-weight: 700; color: var(--rbm-red); }
.rbm-pin-table td strong { font-family: "SFMono-Regular", Consolas, monospace; font-weight: 400; font-size: 14px; color: var(--rbm-dark); white-space: nowrap; }
.rbm-leds li .uk-grid > :first-child strong { font-family: var(--rbm-head); color: var(--rbm-dark); }

/* меню страницы: 9 пунктов в одну строку на ноутбуке */
@media (min-width: 960px) {
  .rbm-pagenav .uk-subnav { margin-left: -16px; }
  .rbm-pagenav .uk-subnav > * { padding-left: 16px; }
  .rbm-pagenav .uk-subnav > * > a { font-size: 14px; letter-spacing: .02em; }
}

/* =====================================================================
   Ревизия типографики, отступов и размеров (11.2026)
   ===================================================================== */

/* --- 1. Единая гарнитура заголовков ---
   В fonts.css темы нет правила Roboto Condensed 700 для базовой латиницы, поэтому
   «RB-M-LTE2», «TinyML», «MCP» и цифры в жирных заголовках рисовались Arial Bold
   рядом с кириллицей Roboto Condensed. Файл латиницы темы — вариативный (ось wght),
   его копия лежит в fonts/ и подключается под своим именем только для латиницы. */
@font-face {
  font-family: "RBM Condensed Latin";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/roboto-condensed-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --rbm-head: "RBM Condensed Latin", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --rbm-soft: #6e6e6e; /* вспомогательный текст: контраст 5:1 на белом, 4,8:1 на #fafafa */
}

/* --- 2. Контраст вспомогательного текста (в теме #cbcbcb ≈ 1,6:1) --- */
.rbm .uk-text-meta,
.rbm .uk-tab > * > a,
.rbm .uk-subnav-pill > * > a,
.rbm .uk-table th,
.rbm-dl-notes, .rbm-dl-hash, .rbm-dl-hash code, .rbm-dl-meta-s, .rbm-dl-desc { color: var(--rbm-soft); }
.rbm .uk-tab > .uk-active > a, .rbm .uk-tab > * > a:hover { color: var(--rbm-dark); }
.rbm .uk-subnav-pill > * > a:hover { color: var(--rbm-dark); }
.rbm-code-switcher .uk-subnav-pill > .uk-active > a,
.rbm-code-switcher .uk-subnav-pill > .uk-active > a:hover { color: #fff; }
.rbm-dl-count, .rbm-dl-badge.is-soon { background: var(--rbm-soft); }
.rbm-cases .uk-accordion-title { color: var(--rbm-dark); padding: 6px 0; }
.rbm-cases .uk-accordion-title:hover, .rbm-cases .uk-open > .uk-accordion-title { color: var(--rbm-red); }
/* статус, отличный от «Доступен…», — нейтральный; класс ставит rb-modem.js по тексту статуса */
.rbm-models .uk-text-meta.rbm-soon { color: var(--rbm-soft) !important; }

/* --- 3. Шкала кеглей: 16 основной / 15 вторичный / 13 служебный --- */
.rbm-stats .uk-panel > div,
.rbm-steps .uk-card p,
.rbm-ml-req li .uk-grid > :last-child,
.rbm-apps li > div,
.rbm-dl-desc { font-size: 15px; line-height: 1.55; }
.rbm-models .uk-text-meta, .rbm-dl-hash { font-size: 13px; }
.rbm-dl-hash code { font-size: 12px; }
.rbm-steps .rbm-pre { font-size: 13px; }
/* подзаголовок «Требования к моделям…» — как остальные подзаголовки (18px) */
.rbm h3.uk-h5.uk-margin-medium { font-size: 18px; line-height: 1.4; }
/* имена файлов в примерах настройки — без капса */
.rbm-code-switcher .uk-switcher h3 {
  text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--rbm-dark);
}

/* --- 4. Подзаголовок ближе к своему блоку, чем к предыдущему ---
   uk-margin-medium / uk-margin-large дают одинаковый отступ сверху и снизу (40/40, 70/70). */
.rbm h3.uk-margin-medium, .rbm h3.uk-margin-large { margin-bottom: 20px !important; }
.rbm h3.uk-margin-medium + *, .rbm h3.uk-margin-large + * { margin-top: 20px !important; }
.rbm h3.uk-margin-large:not(:first-child) { margin-top: 56px !important; }

/* --- 5. Hero: шестигранник обрамляет фото, а не торчит из-за него --- */
.rbm-hero-media::before { width: min(100%, 560px); }
@media (min-width: 960px) { .rbm-hero-media img { max-height: 460px; } }

/* --- 6. Схема архитектуры крупнее, подпись — по её ширине --- */
.rbm-figure.uk-width-xlarge { width: 760px; max-width: 100%; }
.rbm-figure.uk-width-xlarge + .uk-text-meta { max-width: 760px; margin-left: auto; margin-right: auto; }

/* --- 7. Шаги установки MCP: 2 × 2 вместо четырёх узких колонок --- */
@media (min-width: 960px) { .rbm-steps > * { width: 50% !important; } }

/* --- 8. Требования к моделям: термин в одну строку --- */
@media (min-width: 640px) { .rbm-ml-req li .uk-grid > :first-child { width: 200px; } }

/* --- 9. Вкладки загрузок — в одну строку на ноутбуке --- */
@media (min-width: 960px) {
  .rbm-dl-tabs { margin-left: -12px; }
  .rbm-dl-tabs > * { padding-left: 12px; }
  .rbm-dl-tabs > * > a { padding-left: 8px; padding-right: 8px; }
}

/* --- 10. CTA: кнопки одной ширины --- */
.rbm-cta-buttons .uk-grid > * { width: 100%; }
.rbm-cta-buttons .uk-button { width: 100%; padding-left: 16px; padding-right: 16px; }
@media (min-width: 960px) { .rbm-cta-buttons { max-width: 320px; margin-left: auto; } }

/* --- 11. Планшет и телефон --- */
@media (max-width: 959px) {
  /* меню страницы и вкладки — одна строка с прокруткой пальцем, без полосы */
  .rbm-pagenav .uk-subnav, .rbm-specs > .uk-tab, .rbm-dl-tabs {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start !important;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
  .rbm-pagenav .uk-subnav::-webkit-scrollbar, .rbm-specs > .uk-tab::-webkit-scrollbar,
  .rbm-dl-tabs::-webkit-scrollbar { display: none; }
  .rbm-pagenav .uk-subnav > *, .rbm-specs > .uk-tab > *, .rbm-dl-tabs > * { flex: none; }
  .rbm-pagenav .uk-subnav::after, .rbm-specs > .uk-tab::after, .rbm-dl-tabs::after {
    content: ""; flex: none; width: 32px;
  }
  .rbm-pagenav .uk-subnav > * > a { padding: 9px 2px; }
}
@media (max-width: 639px) {
  /* загрузки: значок + описание, кнопка под описанием (иначе текст сжат в столбик) */
  .rbm-dl-table thead { display: none; }
  .rbm-dl-table, .rbm-dl-table tbody { display: block; }
  .rbm-dl-table tr { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; padding: 14px 12px; }
  .rbm-dl-table td { display: block; padding: 0 !important; }
  .rbm-dl-table td.rbm-dl-hide-s { display: none; }
  .rbm-dl-table td.rbm-dl-action { grid-column: 2; width: auto; text-align: left; margin-top: 10px; }
  .rbm-dl-btn { min-height: 40px; }
  .rbm-dl-link { display: inline-block; padding: 5px 0; }
}

/* заголовки аккордеона на ступень ниже подзаголовка «Типовые сценарии» (18px) */
.rbm-cases .uk-accordion-title { font-size: 16px; }

/* планшет: версия, дата и размер — строкой под названием, иначе название сжато в столбик */
@media (min-width: 640px) and (max-width: 959px) {
  .rbm-dl-table .rbm-dl-hide-s { display: none; }
  .rbm-dl-meta-s { display: block; }
}

/* 12. hero: зазор, когда ссылка «MCP-сервер» переносится под кнопки */
.rbm-hero .uk-grid-small.uk-child-width-auto { row-gap: 14px; }
.rbm-hero .uk-grid-small.uk-child-width-auto > .uk-grid-margin { margin-top: 0; }

/* 13. фото клемм на сером фоне секции — белая карточка, а не «заплатка» */
#connect img[src*="terminals"], #connect a[href*="terminals"] img { border-radius: 4px; box-shadow: 0 5px 15px rgba(0, 0, 0, .06); }

/* 14. кнопки в таблице загрузок — одной ширины */
@media (min-width: 640px) { .rbm-dl-btn { min-width: 136px; justify-content: center; } }
