/* ── Презентационные кастомные блоки редактора (.rte-*) ───────────────────────
   Палитра в духе сайта: основной #149394 / тёмный #0c4141. Используются на
   публичных страницах (page_render/article) и в превью редактора. */

/* Выноска / уведомление */
.rte-note { display: flex; flex-direction: column; gap: 4px; margin: 18px 0; padding: 14px 18px;
  border-left: 4px solid #149394; border-radius: 10px; background: #f0f7f7; }
.rte-note__title { font-weight: 700; color: #0c4141; }
.rte-note__text { color: #2c3a3a; line-height: 1.55; }
.rte-note--info    { border-color: #149394; background: #eef7f7; }
.rte-note--success { border-color: #1e9e63; background: #eaf7ef; }
.rte-note--success .rte-note__title { color: #14633f; }
.rte-note--warning { border-color: #e0a008; background: #fdf6e3; }
.rte-note--warning .rte-note__title { color: #8a6300; }
.rte-note--danger  { border-color: #e5484d; background: #fdeced; }
.rte-note--danger .rte-note__title { color: #a02329; }

/* Цитата */
.rte-quote { position: relative; margin: 24px 0; padding: 26px 28px 22px; border-radius: 16px;
  background: #f4fafa; border: 1px solid #e2eded; }
.rte-quote::before { content: "\201C"; position: absolute; top: 2px; left: 16px; font-family: Georgia, serif;
  font-size: 64px; line-height: 1; color: #149394; opacity: .25; }
.rte-quote blockquote { margin: 0; border: 0; padding: 0; font-size: 18px; line-height: 1.6; font-style: italic; color: #1c2b2b; }
.rte-quote figcaption { margin-top: 14px; display: flex; flex-direction: column; gap: 1px; padding-top: 12px; border-top: 1px solid #e2eded; }
.rte-quote__author { font-weight: 700; color: #0c4141; }
.rte-quote__role { font-size: 14px; color: #6b7a7a; }

/* Видео (адаптивная обёртка 16:9) */
.rte-video { position: relative; margin: 20px 0; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; }
.rte-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Разделитель */
.rte-divider { margin: 26px 0; border: 0; border-top: 1px solid #d6e6e6; }
.rte-divider--label { display: flex; align-items: center; text-align: center; gap: 14px; border-top: 0; }
.rte-divider--label::before, .rte-divider--label::after { content: ""; flex: 1; border-top: 1px solid #d6e6e6; }
.rte-divider--label span { color: #6b7a7a; font-size: 14px; font-weight: 600; white-space: nowrap; }

/* FAQ (нативный аккордеон) */
.rte-faq { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.rte-faq__item { border: 1px solid #d6e6e6; border-radius: 12px; background: #fff; overflow: hidden; }
.rte-faq__item summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 18px; position: relative;
  font-weight: 600; color: #0c4141; }
.rte-faq__item summary::-webkit-details-marker { display: none; }
.rte-faq__item summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 22px; line-height: 1; color: #149394; transition: transform .2s; }
.rte-faq__item[open] summary::after { content: "\2212"; }
.rte-faq__item[open] summary { background: #f0f7f7; }
.rte-faq__a { padding: 4px 18px 16px; color: #2c3a3a; line-height: 1.6; }

/* Шаги / процесс — вертикальная связанная лента с градиентными бейджами */
.rte-steps { list-style: none; margin: 24px 0; padding: 0; }
.rte-steps__item { position: relative; display: flex; gap: 18px; padding-bottom: 24px; }
.rte-steps__item:last-child { padding-bottom: 0; }
.rte-steps__item:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 46px; bottom: -2px;
  width: 2px; background: linear-gradient(#149394, #cfe6e6); }
.rte-steps__num { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #149394, #0c6f70); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px;
  box-shadow: 0 4px 12px rgba(20,147,148,.30); z-index: 1; }
.rte-steps__body { padding-top: 8px; }
.rte-steps__title { font-weight: 700; font-size: 17px; color: #0c4141; margin-bottom: 4px; }
.rte-steps__text { color: #4a5a5a; line-height: 1.55; }

/* Показатели / счётчики — аккуратные карточки */
.rte-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; margin: 24px 0; }
.rte-stats__item { text-align: center; padding: 26px 18px; border-radius: 16px; background: #f4fafa;
  border: 1px solid #e2eded; transition: transform .15s, box-shadow .15s, border-color .15s; }
.rte-stats__item:hover { transform: translateY(-2px); border-color: #149394; box-shadow: 0 8px 24px rgba(20,147,148,.10); }
.rte-stats__value { font-size: 40px; font-weight: 800; color: #0c6f70; line-height: 1; letter-spacing: -.02em; }
.rte-stats__label { margin-top: 10px; color: #5a6a6a; font-size: 14.5px; }

/* Преимущества (карточки с иконкой) */
.rte-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 22px 0; }
.rte-features__item { padding: 20px; border: 1px solid #e2eded; border-radius: 14px; background: #fff; }
.rte-features__icon { width: 46px; height: 46px; border-radius: 12px; background: #eaf6f6; color: #149394;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.rte-features__icon svg { width: 24px; height: 24px; }
.rte-features__title { font-weight: 700; color: #0c4141; margin-bottom: 4px; }
.rte-features__text { color: #4a5a5a; line-height: 1.55; }

/* Таймлайн / история — соединительная линия идёт по элементам (без «хвоста» под последней точкой) */
.rte-timeline { position: relative; margin: 22px 0; }
.rte-timeline__item { position: relative; padding-left: 28px; padding-bottom: 22px; }
.rte-timeline__item:last-child { padding-bottom: 0; }
.rte-timeline__item:not(:last-child)::before { content: ""; position: absolute; left: 7px; top: 6px;
  bottom: -2px; width: 2px; background: #d6e6e6; }
.rte-timeline__dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid #149394; z-index: 1; }
.rte-timeline__date { font-size: 13px; font-weight: 700; color: #149394; text-transform: uppercase; letter-spacing: .03em; }
.rte-timeline__title { font-weight: 700; color: #0c4141; margin: 2px 0; }
.rte-timeline__text { color: #2c3a3a; line-height: 1.55; }

/* Переиспользуемая SVG-галочка (lucide check) для списков «что входит» и т.п. */
ul.rte-check { list-style: none; padding-left: 0; margin: 12px 0; }
.rte-check li, ul.rte-check > li { position: relative; padding-left: 30px; line-height: 1.5; }
.rte-check li::before, ul.rte-check > li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background-color: #eaf7ef;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%231e9e63' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; }

/* Тарифы */
.rte-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 26px 0; align-items: stretch; }
.rte-pricing__card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px 24px;
  border: 1px solid #e2eded; border-radius: 18px; background: #fff; transition: transform .15s, box-shadow .15s; }
.rte-pricing__card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(12,43,43,.10); }
.rte-pricing__card--featured { border: 1.5px solid #149394; box-shadow: 0 16px 40px rgba(20,147,148,.16); }
.rte-pricing__card--featured::before { content: "Популярный"; position: absolute; top: -11px; left: 24px;
  background: linear-gradient(135deg, #149394, #0c6f70); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; letter-spacing: .02em; }
.rte-pricing__name { font-weight: 700; font-size: 17px; color: #0c4141; }
.rte-pricing__price { font-size: 30px; font-weight: 800; color: #0c6f70; line-height: 1; letter-spacing: -.02em; }
.rte-pricing__period { font-size: 14px; font-weight: 500; color: #8a9a9a; }
ul.rte-pricing__features { list-style: none; margin: 2px 0; padding: 0; display: flex; flex-direction: column; gap: 11px; color: #2c3a3a; }
.rte-pricing__features li { position: relative; padding-left: 30px; line-height: 1.5; }
.rte-pricing__features li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background-color: #eaf7ef;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%231e9e63' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; }
.rte-pricing__card .rte-btn { margin-top: auto; width: 100%; text-align: center; box-sizing: border-box; }
.rte-pricing__card--featured .rte-btn { background: linear-gradient(135deg, #149394, #0c6f70); }

/* ── Госпоказатели ЦБ ([cbr]) ──────────────────────────────────────────────── */
.cbr-value { margin: 22px 0; padding: 22px 24px; border-radius: 16px; background: #f4fafa; border: 1px solid #e1efef; }
.cbr-value__title { font-size: 14px; color: #5a6a6a; margin-bottom: 8px; }
.cbr-value__main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cbr-value__num { font-size: 44px; font-weight: 800; color: #0c6f70; line-height: 1; }
.cbr-value__delta { font-size: 15px; font-weight: 600; }
.cbr-value__delta.cbr-up { color: #e5484d; }
.cbr-value__delta.cbr-down { color: #1e9e63; }
.cbr-value__date { margin-top: 8px; font-size: 13px; color: #9aa7a7; }
.cbr-value--multi .cbr-value__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cbr-value__tile { text-align: center; padding: 14px 10px; border-radius: 12px; background: #fff; border: 1px solid #e1efef; }
.cbr-value__num.cbr-red { color: #e5484d; font-size: 30px; }
.cbr-value__num.cbr-primary { color: #0c6f70; font-size: 30px; }
.cbr-value__num.cbr-green { color: #1e9e63; font-size: 30px; }
.cbr-value__lab { margin-top: 6px; font-size: 12px; color: #5a6a6a; }

.cbr-chart { margin: 24px 0; padding: 18px 20px; border-radius: 16px; background: #fff; border: 1px solid #e1efef; }
.cbr-chart__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cbr-chart__title { font-size: 16px; font-weight: 700; color: #0c4141; }
.cbr-chart__ranges { display: inline-flex; gap: 6px; }
.cbr-range { padding: 4px 12px; border-radius: 999px; border: 1px solid #d6e6e6; background: #fff; color: #5a6a6a; font-size: 13px; cursor: pointer; transition: all .15s; }
.cbr-range:hover { border-color: #149394; color: #0c6f70; }
.cbr-range.is-active { background: #149394; border-color: #149394; color: #fff; }
.cbr-chart__canvas { position: relative; height: 320px; }

.cbr-loans { margin: 24px 0; }
.cbr-loans__title { font-size: 16px; font-weight: 700; color: #0c4141; margin-bottom: 12px; }
.cbr-loans-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cbr-loans-table th, .cbr-loans-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #eef4f4; }
.cbr-loans-table th { font-size: 13px; color: #5a6a6a; font-weight: 600; background: #f4fafa; }
.cbr-loans-table td:last-child, .cbr-loans-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: #0c6f70; }
.cbr-loans__note { margin-top: 10px; font-size: 13px; color: #9aa7a7; }

/* ── Госпоказатели: расширения (метрики, навигация таблицы, источник) ──────── */
.cbr-wrap { margin: 24px 0; }
.cbr-wrap > .cbr-value, .cbr-wrap > .cbr-chart, .cbr-wrap > .cbr-loans, .cbr-wrap > .cbr-tbl { margin: 0; }
.cbr-chart__toolbar { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cbr-chart__metrics { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cbr-metric { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid #d6e6e6; background: #fff; color: #5a6a6a; font-size: 12px; cursor: pointer; transition: all .15s; }
.cbr-metric__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; transition: opacity .15s; }
.cbr-metric:not(.is-active) { opacity: .5; text-decoration: line-through; }
.cbr-metric:not(.is-active) .cbr-metric__dot { opacity: .35; }

.cbr-tbl { margin: 24px 0; }
.cbr-tbl__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cbr-tbl__title { font-size: 16px; font-weight: 700; color: #0c4141; }
.cbr-tbl__nav { display: inline-flex; gap: 6px; }
.cbr-navbtn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #d6e6e6; background: #fff; color: #0c6f70; font-size: 18px; line-height: 1; cursor: pointer; transition: all .15s; }
.cbr-navbtn:hover:not(:disabled) { border-color: #149394; background: #f4fafa; }
.cbr-navbtn:disabled { opacity: .35; cursor: default; }
.cbr-tbl__wrap { overflow-x: auto; }
.cbr-tbl__table th:first-child, .cbr-tbl__table td:first-child { position: sticky; left: 0; background: #fff; text-align: left; font-weight: 500; }
.cbr-tbl__table th:not(:first-child), .cbr-tbl__table td:not(:first-child) { text-align: right; white-space: nowrap; }

.cbr-value__tiles--wrap { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.cbr-value__num.cbr-blue { color: #0ea5e9; font-size: 30px; }
.cbr-value__num.cbr-violet { color: #7c3aed; font-size: 30px; }

.cbr-source { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid #e1efef; background: #f4fafa; text-decoration: none; transition: all .15s; }
.cbr-source:hover { border-color: #149394; background: #eaf6f6; }
.cbr-source__ico { flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #149394; color: #fff; font-size: 15px; }
.cbr-source__body { display: flex; flex-direction: column; line-height: 1.3; }
.cbr-source__label { font-size: 13px; font-weight: 600; color: #0c4141; }
.cbr-source__host { font-size: 12px; color: #6b7a7a; }

/* ── Кредиты ОКВЭД: интерактивный подвид (панель + график) ─────────────────── */
.cbr-board { display: grid; grid-template-columns: 300px 1fr; gap: 16px; margin: 24px 0; }
.cbr-board__side { border: 1px solid #e1efef; border-radius: 16px; padding: 16px; background: #fff; }
.cbr-board__side-title { font-size: 16px; font-weight: 700; color: #0c4141; }
.cbr-board__side-sub { font-size: 12px; color: #9aa7a7; margin-bottom: 10px; }
.cbr-board__list { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; }
.cbr-board__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; transition: background .15s; }
.cbr-board__item:hover { background: #f4fafa; }
.cbr-board__item.is-active { background: #eef6f6; }
.cbr-board__badge { flex: none; width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; opacity: .35; transition: opacity .15s; }
.cbr-board__item.is-active .cbr-board__badge { opacity: 1; }
.cbr-board__name { flex: 1 1 auto; min-width: 0; font-size: 13px; color: #3a4a4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbr-board__val { flex: none; font-size: 13px; font-weight: 700; color: #0c6f70; font-variant-numeric: tabular-nums; }
.cbr-board__main { border: 1px solid #e1efef; border-radius: 16px; padding: 16px 18px; background: #fff; display: flex; flex-direction: column; }
.cbr-board__main-title { font-size: 16px; font-weight: 700; color: #0c4141; }
.cbr-board__hint { font-size: 12px; color: #9aa7a7; margin-bottom: 10px; }
.cbr-board__canvas { position: relative; flex: 1; min-height: 300px; }
@media (max-width: 720px) { .cbr-board { grid-template-columns: 1fr; } }

/* Таблица кредитов ОКВЭД — сетка «месяцы × отрасли» (горизонтальный скролл) */
.cbr-loans-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cbr-loans-table--grid { font-size: 14px; min-width: 100%; }
.cbr-loans-table--grid th, .cbr-loans-table--grid td { white-space: nowrap; text-align: center; }
.cbr-loans-table--grid th:first-child, .cbr-loans-table--grid td:first-child {
  text-align: left; position: sticky; left: 0; background: #fff; min-width: 210px; max-width: 280px;
  white-space: normal; box-shadow: 1px 0 0 #eef4f4;
}
.cbr-loans-table--grid thead th:first-child { background: #f4fafa; z-index: 2; }
.cbr-loans-table--grid td:not(:first-child) { font-variant-numeric: tabular-nums; font-weight: 600; color: #0c6f70; }
/* перекрываем правило базовой таблицы для последнего столбца */
.cbr-loans-table--grid th:last-child { text-align: center; color: #5a6a6a; }
.cbr-loans-table--grid td:last-child { text-align: center; }
