/* ---------------------------------------------------------------------------
   lesson-kit — общая библиотека интерактивных компонентов уроков.
   Заведена 2026-08-20 при пересборке урока «Энергоцепи — IGUS» (вариант C).
   Правило: компонент живёт ЗДЕСЬ, а не внутри урока. Урок задаёт только контент.
   Цвета и шрифты — из брендбука (см. assets/style.css), своих не вводим.
   Префикс всех классов — lk-, чтобы не пересекаться со стилями уроков.
--------------------------------------------------------------------------- */

.lk { --lk-line: #dfe4f0; --lk-muted: #5b6472; }

/* --- Маршрут урока: где ты сейчас ------------------------------------------ */
.lk-route { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--lk-line); margin-bottom: 22px; }
.lk-route-inner { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.lk-route-inner::-webkit-scrollbar { display: none; }
.lk-route a { flex: 0 0 auto; text-decoration: none; font-size: 0.78rem; font-weight: 700;
  color: var(--lk-muted); background: var(--bg-card); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.lk-route a:hover { color: var(--blue); }
/* Маршрут липкий: без этого якорь уводит заголовок под панель и раздел открывается не с начала. */
h2[id], h3[id] { scroll-margin-top: 68px; }
.lk-route a.active { background: var(--blue); color: #fff; }

/* --- Таймлайн: последовательность событий ---------------------------------- */
.lk-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0; margin: 18px 0 24px; }
.lk-tl-step { position: relative; padding: 26px 12px 14px; text-align: center; }
.lk-tl-step::before { content: ""; position: absolute; top: 10px; left: 0; right: 0; height: 3px; background: var(--bg-card); }
.lk-tl-step:first-child::before { left: 50%; border-radius: 3px 0 0 3px; }
.lk-tl-step:last-child::before { right: 50%; border-radius: 0 3px 3px 0; }
.lk-tl-step::after { content: ""; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%; background: var(--blue-dark); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--blue-dark); }
.lk-tl-step.lk-tl-bad::after { background: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.lk-tl-step b { display: block; font-family: 'Roboto Flex', sans-serif; font-size: 0.8rem; color: var(--blue-dark); margin-bottom: 3px; }
.lk-tl-step span { display: block; font-size: 0.84rem; color: var(--lk-muted); line-height: 1.4; }

/* --- Схема с горячими точками ---------------------------------------------- */
.lk-figure { border: 1px solid var(--lk-line); border-radius: 14px; background: #fff; padding: 14px; margin: 16px 0 22px; }
.lk-figure svg { display: block; width: 100%; height: auto; }
/* Схему не увеличиваем сверх её собственного размера: подписи и точки внутри SVG
   масштабируются вместе с картинкой и становятся нечитаемо крупными. Предел по
   ширине viewBox выставляет lesson-kit.js (решение Марины 2026-10-08). */
.lk-hot { cursor: pointer; }
/* Ненажатая точка — бледно-оранжевая с серой обводкой, чтобы не терялась на
   оранжевых деталях схемы. Нажатая — яркий оранжевый с чёрной обводкой; её вид
   задаётся из JS (см. paint() в lesson-kit.js): CSS-свойства r и fill в SVG
   перебивают атрибут не во всех движках, из-за чего до 2026-08-31 нажатая точка
   визуально ничем не отличалась от ненажатой. */
.lk-hot circle.lk-dot { fill: #FFCDB8; stroke: #7c8ba3; stroke-width: 2;
  transition: fill 0.12s ease, stroke 0.12s ease; }
.lk-hot:hover circle.lk-dot { fill: #FFB08C; stroke: #5b6472; }
.lk-hot text { fill: #284466; font-weight: 700; font-size: 13px; pointer-events: none; }
.lk-hint { font-style: italic; color: var(--lk-muted); font-size: 0.85rem; text-align: center; margin: 6px 0 0; }
.lk-figure-out { margin-top: 12px; border-top: 1px solid var(--lk-line); padding-top: 12px; font-size: 0.92rem; min-height: 62px; }

/* Схема и пояснение рядом, а не одно под другим: иначе на экран помещается только
   картинка, и после каждого нажатия приходится прокручивать страницу вниз за текстом
   и обратно вверх за следующей точкой. На узких экранах раскладка снова вертикальная. */
/* Порог 1080 px, а не 720: колонка урока — 720 px, и при делении её пополам схема
   сжимается вдвое, подписи внутри SVG становятся нечитаемыми. Поэтому две колонки
   включаются только тогда, когда фигура может выйти за колонку текста (ниже), и
   схеме остаётся её собственная ширина. На экранах уже — вертикально, а пояснение
   после нажатия подтягивается к экрану из lesson-kit.js. */
@media (min-width: 1080px) {
  .lk-figure--side { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr);
    column-gap: 18px; align-items: start;
    width: min(1060px, calc(100vw - 40px));
    margin-left: calc(50% - min(1060px, calc(100vw - 40px)) / 2); }
  .lk-figure--side svg,
  .lk-figure--side > img { grid-column: 1; grid-row: 1; }
  .lk-figure--side .lk-hint { grid-column: 1; grid-row: 2; margin: 8px 0 0; }
  .lk-figure--side .lk-credit { grid-column: 1; grid-row: 3; }
  /* Ряд, где описание длинное: картинке меньше места, тексту больше. */
  .lk-figure--side.lk-figure--pic-sm { grid-template-columns: minmax(0, 0.8fr) minmax(250px, 1.3fr); }
  .lk-figure--side .lk-figure-out { grid-column: 2; grid-row: 1 / span 3;
    margin-top: 0; padding: 0 0 0 18px; border-top: 0; border-left: 1px solid var(--lk-line);
    align-self: stretch; }
  /* Узкая схема (её собственная ширина меньше колонки) остаётся на месте: уводить блок
     за колонку текста незачем, а растянутая в полтора раза картинка выбивается из вёрстки
     (находка Марины 2026-10-08). Класс ставит lesson-kit.js по viewBox. */
  /* 2026-10-14: max-content у колонки со схемой не давал ей сжаться, и пояснение
     вылезало за правый край карточки (находка Марины). Теперь колонка схемы
     ужимается, если вдвоём с текстом они не помещаются в карточку. */
  .lk-figure--side.lk-figure--narrow { width: auto; margin-left: 0;
    grid-template-columns: minmax(0, max-content) minmax(200px, 1fr); }
}

/* Подпись-источник под картинкой: нужна там, где лицензия требует указания автора. */
.lk-credit { font-size: 0.68rem; color: #9aa6bb; margin: 6px 0 0; line-height: 1.35; }
.lk-figure-out b { color: var(--blue-dark); display: block; margin-bottom: 4px; }

/* --- Термин с объяснением ---------------------------------------------------
   Первое появление нового слова подсвечено; по клику всплывает облачко с
   определением. Правило: объясняем слово там, где оно встретилось впервые. */
.lk-term { position: relative; display: inline; font: inherit; color: var(--blue);
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  border-bottom: 2px dotted var(--orange); }
.lk-term:hover { color: var(--orange); }
.lk-term.open { color: var(--orange); }
.lk-term::after { content: "?"; font-size: 0.62em; font-weight: 700; vertical-align: super;
  margin-left: 2px; color: var(--orange); }
.lk-term-pop { position: absolute; top: calc(100% + 10px); left: 0; z-index: 40;
  width: min(340px, 78vw); background: #fff; border: 1px solid var(--lk-line);
  border-left: 4px solid var(--orange); border-radius: 12px; padding: 12px 15px;
  box-shadow: 0 10px 28px rgba(40, 68, 102, 0.16); font-size: 0.9rem; line-height: 1.55;
  color: var(--ink); font-weight: 400; text-align: left; cursor: auto; white-space: normal; }
.lk-term-pop b { display: block; color: var(--blue-dark); margin-bottom: 4px;
  font-family: 'Roboto Flex', 'Manrope', sans-serif; }
.lk-term-pop--right { left: auto; right: 0; }
.lk-term-pop--left { left: 0; right: auto; }

/* --- Словарь урока: строка терминов под лидом. Нужна там, где термин впервые
   встречается на схеме, а не в тексте, или повторяется из прошлого урока. ------ */
.lk-term-cloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px;
  margin: 0 0 22px; padding: 12px 16px; background: var(--bg-card);
  border: 1px solid var(--lk-line); border-left: 4px solid var(--blue);
  border-radius: 10px; font-size: 0.94rem; }
.lk-term-cloud-cap { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--lk-muted); }
.lk-term-cloud .lk-term { font-weight: 700; }


/* Пояснения по кадрам схемы: колонка под своим кадром, на узком экране — друг под другом. */
.lk-figure-cols { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 12px;
  border-top: 1px solid var(--lk-line); padding-top: 14px; }
.lk-figure-cols > div { font-size: 0.92rem; line-height: 1.55; }
.lk-figure-cols b { color: var(--blue-dark); }
@media (min-width: 720px) { .lk-figure-cols { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* --- Схема, которую обтекает текст: справа от картинки и дальше под ней. ------
   Нужна там, где описание длинное: в двухколоночной раскладке под картинкой
   оставалось пустое поле в половину блока. ------------------------------------ */
.lk-figure--flow { display: block; }
.lk-figure--flow::after { content: ""; display: block; clear: both; }
.lk-figure--flow > svg { float: left; width: 44%; margin: 0 18px 10px 0; }
.lk-figure--flow > .lk-figure-out { margin-top: 0; border-top: none; padding-top: 0;
  min-height: 0; }
@media (max-width: 719px) {
  .lk-figure--flow > svg { float: none; width: 100%; margin: 0 0 12px; }
}

/* --- Перечень карточками. Заменяет таблицу «пункт — пояснение»: -------------
   таблицу проглядывают, карточки читают. ------------------------------------- */
.lk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px; margin: 16px 0 22px; }
.lk-card { background: var(--bg-card-alt); border-radius: 12px; padding: 14px 16px; }
.lk-card > b { display: block; color: var(--blue-dark); margin-bottom: 6px; }
.lk-card p { margin: 0 0 9px; font-size: 0.92rem; line-height: 1.55; }
.lk-card .lk-card-ask { margin: 0; font-size: 0.9rem;
  border-top: 1px solid #cfe0f5; padding-top: 9px; }
.lk-card .lk-card-ask b { color: var(--blue-dark); }

/* Иконка среды или темы в шапке карточки: рисунок, потом название. */
.lk-card-ic { width: 44px; height: 44px; display: block; margin-bottom: 8px; }

/* Плотная сетка на три колонки — когда карточек много, а текста в каждой мало. */
.lk-cards--3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
/* Карточка «рефлекс — принцип»: сверху приглушённо то, что просится сказать,
   под ним выделенно то, как на самом деле. */
.lk-card--reflex > b { color: #8a94a6; font-weight: 600; }
.lk-card--reflex p { margin: 0; color: var(--blue-dark); font-weight: 700; font-size: 0.95rem; }
/* Одна строка пояснения сразу под названием карточки. */
.lk-card p.lk-card-sub { color: #8a94a6; font-size: 0.86rem; margin: -2px 0 10px; }

/* Серая подпись под блоком: оговорка, источник, ограничение. Курсивом — по правилу
   «все мелкие серые подписи курсивом». Комиксовый двойник — .scene-note, он по центру. */
.lk-note { font-style: italic; color: var(--lk-muted); font-size: 0.85rem;
  line-height: 1.55; margin: -6px 0 16px; }

/* --- Цифры крупно: то, что менеджер должен помнить наизусть и называть вслух. ---
   Не перечень фактов, а шесть чисел, которыми отвечают на вопрос клиента. -------- */
.lk-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px; margin: 18px 0 22px; }
.lk-fig { background: var(--bg-card-alt); border-radius: 14px; padding: 16px 18px; }
.lk-fig > b { display: block; font-family: 'Roboto Flex', sans-serif; font-weight: 800;
  font-size: 2rem; line-height: 1.1; color: var(--orange);
  /* без разрядки цифры в «4400+» слипались (правка пользователя 2026-09-02) */
  letter-spacing: 0.06em; }
/* Плитка, где вместо цифры иконка: в одной сетке цифры и картинки соседствуют,
   поэтому иконка занимает ровно ту же высоту, что и цифра. */
.lk-fig--ic > svg { display: block; width: 42px; height: 42px; margin: 0 0 6px; }
.lk-fig-what { display: block; color: var(--blue-dark); font-weight: 700; font-size: 0.95rem;
  margin: 2px 0 6px; }
.lk-fig-note { display: block; font-size: 0.87rem; color: #5b6472; line-height: 1.5; }

/* --- Практика: тренажёр, подборщик, форма. Своя подложка и метка режима, --------
   чтобы смена «читаю» на «делаю» была видна до чтения заголовка. ----------------- */
.lk-task { margin: 28px 0; padding: 16px 18px 18px; border-radius: 16px;
  background: #F2F7FF; border: 1px solid #D5E2F4; border-left: 5px solid var(--orange); }
.lk-task::before { content: attr(data-mode); display: inline-block; margin-bottom: 10px;
  font-family: 'Roboto Flex', sans-serif; font-weight: 800; font-size: 0.68rem;
  letter-spacing: 0.09em; text-transform: uppercase; color: #fff; background: var(--orange);
  padding: 4px 11px; border-radius: 999px; }
.lk-task > h3 { margin: 0 0 6px; }
.lk-task > p { margin-top: 0; }
.lk-task > p:last-child { margin-bottom: 0; }
.lk-task .lk-drill, .lk-task .lk-tool { background: #fff; margin: 12px 0 0; }
.lk-task .lk-tool { border-left: 1px solid var(--lk-line); }
@media (max-width: 560px) { .lk-task { padding: 14px 14px 16px; border-radius: 14px; } }

/* Инструмент, а не проверка знаний: подборщик, форма — то, что открывают на звонке.
   Тренажёр — голубая подложка и кант слева; инструмент — белое тело в оранжевой рамке. */
.lk-task--tool { background: #fff; border: 2px solid var(--orange); }
.lk-task--tool .lk-tool, .lk-task--tool .lk-drill { background: #fff; border-left-width: 1px; }

/* Шаги процедуры: номер слева, объяснение справа, между шагами линия. -----------
   Заменяет связку «таймлайн + отдельные абзацы»: шаг и его объяснение стоят вместе. */
.lk-steps { margin: 18px 0 24px; }
.lk-step { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 16px;
  padding: 0 0 20px; position: relative; }
.lk-step:not(:last-child)::before { content: ""; position: absolute; left: 18px; top: 43px;
  bottom: 0; width: 2px; background: var(--lk-line); }
/* Хвост со стрелкой у последнего шага: показывает, что читать сверху вниз. */
.lk-step:last-child::before { content: ""; position: absolute; left: 18px; top: 43px;
  height: 20px; width: 2px; background: var(--lk-line); }
.lk-step:last-child::after { content: ""; position: absolute; left: 13px; top: 63px;
  width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 9px solid var(--lk-line); }
.lk-step-n { width: 38px; height: 38px; border-radius: 50%; background: var(--blue-dark);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'Roboto Flex', sans-serif; font-weight: 800; }
.lk-step-body > b { display: block; color: var(--blue-dark); font-size: 1.02rem; margin: 7px 0 5px; }
.lk-step-body p { margin: 0; font-size: 0.95rem; line-height: 1.6; }

/* --- Пара «схема + фото»: картинки внутри пункта, каждая со своей подписью --- */
.lk-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px; margin: 2px 0 14px; }
.lk-pair figure { margin: 0; min-width: 0; }
.lk-pair svg, .lk-pair img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4;
  object-fit: contain; background: #EDF6FF; border-radius: 10px; }
/* Одиночное крупное фото во всю колонку, в своих пропорциях, без пустых полей (решение Марины 2026-10-07). */
.lk-pair--wide { grid-template-columns: 1fr; }
.lk-pair--wide img { aspect-ratio: auto; }
/* Одиночное небольшое фото — по центру, в родном размере (не шире 500 px, чтобы не мылилось), подпись по центру (решение Марины 2026-10-07). */
.lk-pair--one { grid-template-columns: minmax(0, 500px); justify-content: center; }
.lk-pair--one img { aspect-ratio: auto; }
.lk-pair--one figcaption { text-align: center; }
.lk-pair figcaption { margin-top: 7px; font-size: 0.76rem; line-height: 1.45;
  color: #9aa6bb; font-style: italic; }

/* --- Чипы: услышал слово → получил ответ ----------------------------------- */
.lk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.lk-chip { background: var(--bg-card); border: 1px solid var(--lk-line); border-radius: 999px;
  padding: 8px 15px; font-size: 0.88rem; font-weight: 700; color: var(--blue-dark); cursor: pointer; font-family: inherit; }
.lk-chip:hover { border-color: var(--blue); }
.lk-chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.lk-chip-out { border: 1px solid var(--lk-line); border-left: 4px solid var(--orange); border-radius: 10px;
  padding: 12px 16px; font-size: 0.92rem; min-height: 46px; }

/* --- Вкладки ---------------------------------------------------------------- */
.lk-tabs { margin: 16px 0 24px; }
.lk-tabbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.lk-tab { background: var(--bg-card); border: none; border-radius: 999px; padding: 9px 17px;
  font-size: 0.88rem; font-weight: 700; color: var(--blue-dark); cursor: pointer; font-family: inherit; }
.lk-tab.active { background: var(--blue-dark); color: #fff; }
.lk-panel { display: none; }
.lk-panel.active { display: block; }

/* --- Тренажёр с вариантами и разбором --------------------------------------- */
.lk-drill { border: 1px solid var(--lk-line); border-radius: 14px; background: var(--bg-card-alt); padding: 16px 18px; margin: 16px 0; }
.lk-drill-kicker { font-family: 'Roboto Flex', sans-serif; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.7rem; color: var(--orange); margin-bottom: 8px; }
/* Строка «пройти обязательно» под шапкой тренажёра (2026-09-08). Намеренно
   спокойная, не красная: это не ошибка, а правило прохождения. */
.lk-drill-status { font-size: 0.82rem; color: var(--lk-muted); margin-bottom: 10px; }
.lk-drill-status.done { color: #3EA76A; font-weight: 700; }
.lk-drill-q { font-weight: 700; font-size: 0.98rem; margin-bottom: 4px; }
.lk-drill-sub { font-size: 0.86rem; color: var(--lk-muted); margin-bottom: 12px; }
.lk-opt { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--lk-line);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 8px; font-size: 0.92rem; cursor: pointer; font-family: inherit; }
.lk-opt:hover { border-color: var(--blue); }
.lk-opt.correct { border-color: #2e9e5b; background: #f1faf4; }
.lk-opt.wrong { border-color: #d8543f; background: #fdf3f1; }
.lk-drill-fb { display: none; margin-top: 10px; font-size: 0.9rem; border-top: 1px solid var(--lk-line); padding-top: 10px; }
.lk-drill-fb.show { display: block; }
.lk-drill-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 10px; }
.lk-drill-count { font-size: 0.82rem; color: var(--lk-muted); }
.lk-next { background: var(--orange); color: #fff; border: none; border-radius: 999px; padding: 9px 20px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.lk-next[disabled] { opacity: 0.35; cursor: default; }

/* --- Аккордеон-справочник --------------------------------------------------- */
.lk-acc { border: 1px solid var(--lk-line); border-radius: 12px; overflow: hidden; margin: 14px 0 22px; }
.lk-acc-item + .lk-acc-item { border-top: 1px solid var(--lk-line); }
.lk-acc-head { width: 100%; text-align: left; background: #fff; border: none; padding: 13px 16px;
  font-size: 0.92rem; font-weight: 700; color: var(--blue-dark); cursor: pointer; font-family: inherit;
  display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.lk-acc-head:hover { background: var(--bg-card-alt); }
/* Иконка слева от заголовка (аккордеон «Красные флаги», 2026-10-05): кнопка
   остаётся flex-строкой, поэтому заголовок с иконкой собирается в свой span. */
.lk-acc-title { display: flex; align-items: center; gap: 10px; }
.lk-acc-title > svg { width: 22px; height: 22px; flex-shrink: 0; }

.lk-acc-head::after { content: "▾"; color: var(--lk-muted); flex-shrink: 0; }
.lk-acc-item.open .lk-acc-head::after { content: "▴"; }
.lk-acc-body { display: none; padding: 0 16px 14px; font-size: 0.9rem; color: #444; }
.lk-acc-item.open .lk-acc-body { display: block; }

/* --- Калькулятор и заполняемая форма ---------------------------------------- */
.lk-tool { border: 1px solid var(--lk-line); border-left: 4px solid var(--blue); border-radius: 12px;
  background: #fff; padding: 16px 18px; margin: 16px 0 24px; }
.lk-tool h4 { font-family: 'Roboto Flex', sans-serif; font-size: 0.95rem; margin: 0 0 4px; color: var(--blue-dark); }
.lk-tool p.lk-tool-sub { margin: 0 0 12px; font-size: 0.86rem; color: var(--lk-muted); }
.lk-field { margin-bottom: 10px; }
.lk-field label { display: block; font-size: 0.84rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 4px; }
.lk-field input, .lk-field select, .lk-field textarea { width: 100%; border: 1px solid var(--lk-line);
  border-radius: 8px; padding: 9px 12px; font-size: 0.92rem; font-family: inherit; color: var(--ink); background: #fff; }
.lk-field input:focus, .lk-field select:focus, .lk-field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.lk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lk-out { margin-top: 12px; border-top: 1px solid var(--lk-line); padding-top: 12px; font-size: 0.92rem; }
.lk-out b { color: var(--blue-dark); }
.lk-out b.lk-lead { display: block; margin-bottom: 4px; font-size: 1.02rem; }
.lk-out .lk-num { font-family: 'Roboto Flex', sans-serif; font-weight: 900; font-size: 1.25rem; color: var(--blue); }
.lk-btn { background: var(--blue); color: #fff; border: none; border-radius: 999px; padding: 10px 20px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer; font-family: inherit; margin-top: 10px; }
.lk-btn.lk-btn-ghost { background: var(--bg-card); color: var(--blue-dark); }

/* --- Лента коротких фактов -------------------------------------------------- */
.lk-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 22px; }
.lk-badge { border: 1px solid var(--lk-line); border-radius: 12px; padding: 10px 14px; background: #fff; flex: 1 1 150px; }
.lk-badge b { display: block; font-family: 'Roboto Flex', sans-serif; font-weight: 900; color: var(--blue); font-size: 1.05rem; }
.lk-badge span { display: block; font-size: 0.82rem; color: var(--lk-muted); line-height: 1.4; margin-top: 2px; }

/* --- Файлы для скачивания --------------------------------------------------- */
.lk-files { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 22px; }
.lk-file { display: flex; align-items: center; gap: 12px; border: 1px solid var(--lk-line); border-radius: 12px;
  padding: 12px 15px; text-decoration: none; color: var(--ink); background: #fff; }
.lk-file:hover { border-color: var(--blue); }
.lk-file-ic { flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; background: var(--bg-card);
  display: flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 800;
  font-family: 'Roboto Flex', sans-serif; color: var(--blue-dark); }
.lk-file b { display: block; font-size: 0.9rem; }
.lk-file span { display: block; font-size: 0.8rem; color: var(--lk-muted); }

/* --- Широкая таблица: скроллится сама, страницу не тянет --------------------- */
.lk-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 14px; }
.lk-scroll table { margin-bottom: 0; min-width: 440px; }

@media (max-width: 480px) {
  .lk-row { grid-template-columns: 1fr; }
  .lk-timeline { grid-template-columns: 1fr; }
  .lk-tl-step { text-align: left; padding: 8px 0 8px 26px; }
  .lk-tl-step::before { top: 0; bottom: 0; left: 6px; right: auto; width: 3px; height: auto; }
  /* Правила для первого и последнего шага выше по файлу задают left/right 50%%
     и по специфичности перебивают строку выше — в вертикальной раскладке
     линия из-за этого уходила на середину колонки и перечёркивала текст
     (найдено тестировщиком 2026-08-21). Гасим их явно. */
  .lk-tl-step:first-child::before { top: 12px; left: 6px; right: auto; border-radius: 3px 3px 0 0; }
  .lk-tl-step:last-child::before { bottom: auto; height: 12px; left: 6px; right: auto; border-radius: 0 0 3px 3px; }
  .lk-tl-step::after { top: 12px; left: 7px; transform: none; }
  .lk-badge { flex-basis: 100%; }
  /* Кнопка «на главную» (home-link.js) висит фиксированно в левом верхнем
     углу и на узком экране наезжала на первую вкладку маршрута
     (найдено тестировщиком 2026-08-21). Отодвигаем маршрут от неё. */
  .lk-route-inner { padding-left: 40px; }
}

/* --- Калькулятор по формуле и конструктор кода заказа ---------------------- */
.lk-calcline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  padding: 7px 0; border-bottom: 1px dashed var(--lk-line); }
.lk-calcline:last-of-type { border-bottom: none; }
.lk-calcline b { flex: 1 1 180px; font-size: 0.86rem; }
.lk-calcval { font-family: 'Roboto Flex', sans-serif; font-weight: 900; color: var(--blue); font-size: 1rem; }
.lk-calcnote { flex: 1 1 100%; font-size: 0.8rem; color: var(--lk-muted); line-height: 1.45; }
.lk-calcres { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--lk-line); font-weight: 700; }
.lk-calcres .lk-num { white-space: nowrap; }
.lk-calcfoot { margin: 10px 0 0; font-size: 0.8rem; color: var(--lk-muted); line-height: 1.5; }
.lk-code { font-family: 'Roboto Flex', sans-serif; font-weight: 900; font-size: 1.15rem; color: var(--blue);
  background: var(--bg-card); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
  word-break: break-word; letter-spacing: 0.02em; }

/* --- Иконки: перечень, который надо запомнить как набор картинок, а не как -----
   список. Одна иконка = один пункт: сама картинка, короткое «что», серым «зачем».
   Иконки рисуем в палитре урока: металл #7c8ba3, уплотнение #FF632F, среда #9EC5FF.
   Заменяет заполняемую форму там, где урок объясняет, а не работает инструментом. */
.lk-icons { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; margin: 18px 0 24px; }
.lk-icon { background: var(--bg-card-alt); border-radius: 14px; padding: 16px 18px; }
.lk-icon > svg { width: 48px; height: 48px; display: block; margin-bottom: 8px; }
.lk-icon > b { display: block; color: var(--blue-dark); font-size: 1rem; }
/* Вводная карточка ряда — во всю ширину, остальные ровными рядами (не «3-3-1», решение Марины 2026-10-07). */
.lk-icon--lead { grid-column: 1 / -1; }
.lk-icon-what { display: block; font-size: 0.9rem; margin: 3px 0 6px; }
.lk-icon-why { display: block; font-size: 0.85rem; color: var(--lk-muted); line-height: 1.5; }

/* --- Общие оформления уроков ------------------------------------------------
   До 2026-09-02 эти шесть правил лежали копией внутри каждого курса: правка
   в одном месте до остальных не долетала. Теперь живут здесь; в курсе локальные
   копии удаляются, разметка не меняется. */
.lk .flag { background: #fff; border: 1px solid var(--lk-line); border-left: 4px solid var(--orange);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; font-size: 0.92rem; }
.lk .gost { font-size: 0.86rem; color: var(--lk-muted); font-style: italic; }
.lk .lead { color: var(--lk-muted); font-size: 0.95rem; margin: 0 0 28px; font-weight: 600; }
.lk .eyebrow { display: inline-block; font-family: 'Roboto Flex', sans-serif; font-weight: 800;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue);
  background: #fff; border-radius: 999px; padding: 4px 12px; margin-bottom: 10px; }
.lk .outcome-list { list-style: none; padding: 0; margin: 0; }
.lk .outcome-list li { padding-left: 22px; position: relative; margin-bottom: 10px; }
.lk .outcome-list li::before { content: '✓'; position: absolute; left: 0; color: var(--orange);
  font-weight: 800; }
/* Подпись под комикс-сценой: по центру, курсивом. Левый вариант — .lk-note. */
.lk .scene-note { font-style: italic; color: var(--lk-muted); font-size: 0.85rem;
  margin: 0 0 4px; text-align: center; }

/* --- Видео в уроке -----------------------------------------------------------
   Заведено 2026-09-04 для курса «Уплотнения — SPAREAGE». Ставим видео ТОЛЬКО там,
   где в кадре действие: опыт, монтаж, приём руками. Слайд-шоу с закадровым голосом
   видео не является — такое разбираем текстом и схемами, читать быстрее.

   preload="metadata" плюс #t=NN в адресе: страница не тянет сам ролик, пока его
   не запустили, но показывает осмысленный кадр вместо чёрного прямоугольника.
   Дорожка субтитров обязательна, если озвучка не на русском. */
.lk-video { margin: 18px 0 24px; }
.lk-video video { width: 100%; display: block; border-radius: 14px; background: #000;
  border: 1px solid var(--lk-line); }
.lk-video-cap { font-style: italic; color: var(--lk-muted); font-size: 0.85rem;
  margin: 8px 0 0; line-height: 1.5; }
.lk-video-cap b { font-style: normal; color: var(--blue-dark); }

/* Широкие схемы на телефоне листаются вбок внутри рамки, а не ужимаются до нечитаемых
   подписей (lesson-kit.js, initFigureScroll; находка Тестировщика 2026-10-07).
   На широком экране min-width не мешает: схема и так шире. */
.lk-figure-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lk-figure-scroll > svg { display: block; width: 100%; height: auto; }

/* Цифры в точках на схеме, которая на телефоне листается вбок (схема показана в 3/4
   родного размера): крупнее кружок и цифра, чтобы было не мельче ~13 px на экране
   (находка Тестировщика 2026-10-07). */
.lk-figure-scroll .lk-hot circle.lk-dot { r: 17px; }
.lk-figure-scroll .lk-hot text { font-size: 18px; dominant-baseline: central; transform: translateY(-5px); transform-box: fill-box; }
