/* Лаунчер конфигураторов (фолбэк-страница списка направлений).
   Палитра сайта rolls-kran.ru: графит #242424/#292b2f, фон #fff/#f5f5f2,
   жёлтый акцент #f8cc24 с тёмным текстом, hover #f0c012. Оранжевых акцентов нет.
   Шрифты только системные — внешние CDN не используются. Все классы с префиксом k1l-,
   чтобы не влиять на стили полноэкранных диалогов конфигураторов. */
:root {
  --k1l-ink: #242424;
  --k1l-body: #535455;
  --k1l-muted: #6b6f73;
  --k1l-page: #f5f5f2;
  --k1l-card: #ffffff;
  --k1l-line: #e1e5e8;
  --k1l-yellow: #f8cc24;
  --k1l-yellow-hover: #f0c012;
  --k1l-yellow-border: #e5b91a;
  --k1l-radius: 18px;
  --k1l-shadow: 0 10px 28px rgba(36, 36, 36, .07);
  --k1l-shadow-hover: 0 16px 36px rgba(36, 36, 36, .12);
  --k1l-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--k1l-page);
  color: var(--k1l-ink);
  font: 400 16px/1.55 var(--k1l-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Общая тема Soft UI задаёт html body с !important — возвращаем фон лаунчера. */
html body {
  background: var(--k1l-page) !important;
  color: var(--k1l-ink);
}

.k1l-shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

.k1l-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--k1l-ink);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.k1l-skip:focus { left: 16px; }

/* ------------------------------------------------------------------ шапка */
.k1l-topbar {
  background: var(--k1l-card);
  border-bottom: 1px solid var(--k1l-line);
}
.k1l-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding-block: 12px;
}
.k1l-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.k1l-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--k1l-ink);
}
.k1l-brand__mark svg { width: 26px; height: 26px; fill: var(--k1l-yellow); }
.k1l-brand__text { display: grid; gap: 2px; min-width: 0; }
.k1l-brand__text b { font-size: 15px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.k1l-brand__text small { font-size: 12px; line-height: 1.3; color: var(--k1l-muted); }
.k1l-counter {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff8dc;
  border: 1px solid #f0dfa0;
  color: #6b5a06;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* -------------------------------------------------------------- вступление */
.k1l-main { padding-bottom: 72px; }

.k1l-hero {
  display: grid;
  gap: 14px;
  padding: 52px 0 40px;
  border-bottom: 1px solid var(--k1l-line);
}
.k1l-eyebrow {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--k1l-muted);
}
.k1l-title {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -.035em;
  font-weight: 600;
  max-width: 18ch;
  text-wrap: balance;
}
.k1l-title::after {
  content: "";
  display: block;
  width: 92px;
  height: 6px;
  margin-top: 20px;
  border-radius: 4px;
  background: var(--k1l-yellow);
}
.k1l-lead {
  margin: 0;
  max-width: 66ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--k1l-body);
}

.k1l-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 0;
}
.k1l-stat {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 16px 18px 15px;
  border-radius: 16px;
  background: var(--k1l-card);
  border: 1px solid var(--k1l-line);
  box-shadow: 0 4px 14px rgba(41, 43, 47, .04);
}
.k1l-stat dt {
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--k1l-muted);
}
.k1l-stat dd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  min-width: 0;
}
.k1l-stat dd b {
  font-size: 28px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--k1l-ink);
  font-variant-numeric: tabular-nums;
}
.k1l-stat dd span { font-size: 13px; line-height: 1.3; color: var(--k1l-muted); }

/* --------------------------------------------------------------- разделы */
.k1l-group { padding-top: 44px; }
.k1l-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 28px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.k1l-group__title {
  position: relative;
  margin: 0;
  padding-left: 18px;
  font-size: clamp(21px, 2.1vw, 27px);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 600;
}
.k1l-group__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .12em;
  bottom: .12em;
  width: 5px;
  border-radius: 3px;
  background: var(--k1l-yellow);
}
.k1l-group__note {
  margin: 0;
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--k1l-muted);
}

/* ----------------------------------------------------------------- карточки */
.k1l-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.k1l-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 24px 24px 22px;
  border-radius: var(--k1l-radius);
  background: var(--k1l-card);
  border: 1px solid var(--k1l-line);
  box-shadow: var(--k1l-shadow);
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.k1l-card:hover {
  border-color: #d7d7cd;
  box-shadow: var(--k1l-shadow-hover);
  transform: translateY(-2px);
}
.k1l-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 34px;
  height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--k1l-page);
  border: 1px solid var(--k1l-line);
  color: var(--k1l-muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.k1l-card__title {
  margin: 0;
  font-size: 18.5px;
  line-height: 1.28;
  letter-spacing: -.015em;
  font-weight: 600;
  text-wrap: balance;
}
.k1l-card__brief {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--k1l-body);
  overflow-wrap: anywhere;
}
.k1l-card__action { margin-top: auto; padding-top: 6px; }
.k1l-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--k1l-yellow-border);
  border-radius: 10px;
  background: var(--k1l-yellow);
  color: #242424;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.k1l-open:hover {
  background: var(--k1l-yellow-hover);
  border-color: var(--k1l-yellow-border);
  color: #242424;
  box-shadow: 0 8px 20px rgba(240, 192, 18, .24);
}
.k1l-open:active { transform: translateY(1px); }
.k1l-open:focus-visible {
  outline: 3px solid #6b5b16;
  outline-offset: 3px;
}
.k1l-open__arrow { font-size: 16px; line-height: 1; transition: transform .18s ease; }
.k1l-open:hover .k1l-open__arrow { transform: translateX(3px); }

.k1l-status {
  margin: 24px 0 0;
  min-height: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #a3271f;
}
.k1l-status:empty { display: none; }

/* -------------------------------------------------------------------- подвал */
.k1l-footer {
  border-top: 1px solid var(--k1l-line);
  background: var(--k1l-card);
}
.k1l-footer__inner { padding-block: 24px 28px; }
.k1l-footer p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; color: var(--k1l-body); }
.k1l-footer__link { margin-top: 4px !important; }
.k1l-footer__link a {
  color: #242424;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--k1l-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.k1l-footer__link a:hover { color: #535455; }
.k1l-footer__link a:focus-visible { outline: 3px solid #6b5b16; outline-offset: 3px; }

/* ---------------------------------------------------------------- адаптив */
/* 2 колонки на средних экранах, 1 — на телефоне. Внутренние отступы карточек
   остаются не меньше 16 px по горизонтали и 14 px по вертикали. */
@media (max-width: 1199px) {
  .k1l-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k1l-shell { padding: 0 28px; }
  .k1l-hero { padding: 44px 0 34px; }
}

@media (max-width: 899px) {
  .k1l-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k1l-stat:last-child { grid-column: 1 / -1; }
}

@media (max-width: 699px) {
  .k1l-shell { padding: 0 16px; }
  .k1l-topbar__inner { min-height: 66px; gap: 12px; }
  .k1l-brand__mark { width: 38px; height: 38px; border-radius: 10px; }
  .k1l-brand__mark svg { width: 22px; height: 22px; }
  .k1l-brand__text b { font-size: 13.5px; }
  .k1l-brand__text small { font-size: 11px; }
  .k1l-counter { display: none; }
  .k1l-hero { padding: 32px 0 28px; gap: 12px; }
  .k1l-title::after { margin-top: 16px; width: 72px; height: 5px; }
  .k1l-lead { font-size: 15px; line-height: 1.58; }
  .k1l-stats { grid-template-columns: 1fr; gap: 10px; }
  .k1l-stat:last-child { grid-column: auto; }
  .k1l-stat { padding: 14px 16px; }
  .k1l-group { padding-top: 34px; }
  .k1l-group__head { margin-bottom: 16px; gap: 10px; }
  .k1l-group__title { padding-left: 14px; }
  .k1l-group__title::before { width: 4px; }
  .k1l-grid { grid-template-columns: 1fr; gap: 12px; }
  .k1l-card { padding: 18px 16px 16px; gap: 10px; border-radius: 16px; }
  .k1l-card__title { font-size: 17px; }
  .k1l-card__brief { font-size: 13.5px; }
  .k1l-open { min-height: 48px; font-size: 14px; }
  .k1l-main { padding-bottom: 48px; }
  .k1l-footer__inner { padding-block: 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .k1l-card, .k1l-open, .k1l-open__arrow { transition: none; }
  .k1l-card:hover { transform: none; }
}

/* ------------------------------------------------ embedded-режим (iframe)
   Хост-страница уже показывает заголовок секции, поэтому внутри iframe
   остаются только группы и карточки: без hero и счётчиков.
   Фон белый, лишние верхние отступы убраны, кнопки — жёлтый акцент сайта. */
html.rk-embedded body {
  background: #fff !important;
}
html.rk-embedded .k1l-topbar,
html.rk-embedded .k1l-hero {
  display: none;
}
html.rk-embedded .k1l-shell {
  padding: 0 24px;
}
html.rk-embedded .k1l-main {
  padding-bottom: 8px;
}
html.rk-embedded .k1l-group {
  padding-top: 0;
}
html.rk-embedded .k1l-group + .k1l-group {
  padding-top: 28px;
}
html.rk-embedded .k1l-grid {
  gap: 14px;
}
html.rk-embedded .k1l-card__index {
  background: #fff;
}

/* ?open=<id>&embed=1: пока открыт подбор, от лаунчера не остаётся ничего —
   снаружи (оверлей родительской страницы) виден только диалог конфигуратора.
   Если диалог закрылся, лаунчер возвращается как безопасный фолбэк. */
html.rk-embed-open .k1l-skip,
html.rk-embed-open .k1l-main,
html.rk-embed-open .k1l-footer {
  display: none !important;
}

@media (max-width: 699px) {
  html.rk-embedded .k1l-shell {
    padding: 0 16px;
  }
  html.rk-embedded .k1l-group + .k1l-group {
    padding-top: 24px;
  }
}

/* Embedded host already carries the section disclaimer; keep one note per screen. */
html.rk-embedded .k1l-footer {
  display: none;
}
