/*
  Оформление самой статьи урока.

  Вынесено из app.css (правки заказчика 25.09.2026: «хочу, чтобы в редакторе
  текст отображался ровно так же, как у пользователя»). Этот файл подключают
  оба экрана — витрина сотрудника и редактор урока в админке, — поэтому
  оформление у них не может разойтись.

  Цвета берутся из переменных витрины (`--accent`, `--line`, `--card`); в
  админке их задаёт обёртка статьи в editor-article.css.
*/

/* --- урок --- */

.lesson-body { font-size: 18px; }
.lesson-body h2 { font-size: 20px; }
.lesson-body img { max-width: 100%; height: auto; border-radius: 12px; }
.lesson-body figure { margin: 16px 0; }
.lesson-body figcaption, .caption { color: var(--muted); font-size: 14px; margin-top: 6px; }
.lesson-body ul, .lesson-body ol { padding-left: 24px; }
.lesson-body li { margin: 6px 0; }

/* Цветная нумерация и маркеры: на телефоне чёрные точки сливаются с текстом. */
.lesson-body ol > li::marker { color: var(--accent); font-weight: 700; }
.lesson-body ul > li::marker { color: var(--accent); font-size: 1.2em; }

/* --- оформление блока: вид маркера и цвет (правки заказчика 23.09.2026) ---

   Цвет переопределяет переменную акцента внутри блока, поэтому вместе с
   маркерами перекрашиваются номера, сноски и полоса цитаты — всё, что и так
   красилось акцентом. Вид маркера меняет только маркированные списки:
   нумерованный остаётся нумерованным. */

.blk--blue { --accent: #2f6fb5; }
.blk--green { --accent: #2e7d4f; }
.blk--red { --accent: #b83636; }
.blk--grey { --accent: #7b8089; }

.blk--arrow ul,
.blk--plus ul { list-style: none; padding-left: 4px; }

.blk--arrow ul > li,
.blk--plus ul > li { position: relative; padding-left: 26px; }

.blk--arrow ul > li::before,
.blk--plus ul > li::before {
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-weight: 700;
}

.blk--arrow ul > li::before { content: "→"; }
.blk--plus ul > li::before { content: "+"; }

/* «Нумерация» у маркированного списка: методист пишет список как обычно, а
   выглядит он нумерованным — так проще, чем переписывать текст. */
.blk--number ul { list-style: decimal; }
.blk--number ul > li::marker { font-weight: 700; font-size: 1em; }

/* Ссылка внутри урока должна выглядеть ссылкой: методист вставлял адрес, а тот
   оставался обычным текстом — палец на телефоне не понимал, куда нажимать. */
.lesson-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.lesson-body a:active { opacity: 0.6; }

/* «Обратите внимание» — спокойная плашка. */
.lesson-body blockquote {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: rgba(47, 111, 237, 0.08);
  color: inherit;
}

/* «Важно» — янтарная плашка, её видно при пролистывании. */
.lesson-body aside {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid #e0a63a;
  border-radius: 0 12px 12px 0;
  background: rgba(224, 166, 58, 0.14);
}

.lesson-body aside::before {
  content: "Важно";
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a9741a;
}

/* Документ в уроке: кнопка размером с палец, а не мелкая ссылка. */
.doc {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin: 16px 0;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
}

.doc:active { border-color: var(--accent); }
.doc__icon { font-size: 22px; line-height: 1; flex: none; }
.doc__text { min-width: 0; }
.doc__name { display: block; font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.doc__size { display: block; color: var(--muted); font-size: 14px; }

.video { position: relative; padding-top: 56.25%; margin: 16px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }

/* --- свёрнутые блоки и тест по ходу урока (правки заказчика 14.09.2026) --- */

.fold {
  margin: 16px 0;
  border: 1px solid var(--line, #e6e8ec);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.fold > summary {
  padding: 13px 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.fold > summary::-webkit-details-marker { display: none; }

.fold > summary::after {
  content: "▾";
  float: right;
  color: var(--muted, #7b8089);
  font-weight: 400;
}

.fold[open] > summary::after { content: "▴"; }

.fold__body { padding: 0 16px 14px; }

.fold__body > *:first-child { margin-top: 0; }

/* «Проверь себя» отличается полосой: это не просто свёрнутый текст, а вопрос. */
.fold--check { border-left: 3px solid var(--accent, #f47b20); }

.inline-test { margin: 18px 0; }

/* --- оформление текста по правилам заказчика (15.09.2026) --- */

/* «Пример» — синяя рамка. «Важно» (aside) — янтарная, см. выше. */
.lesson-body section {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid rgba(47, 111, 237, 0.35);
  border-radius: 12px;
  background: rgba(47, 111, 237, 0.06);
}

.lesson-body section::before {
  content: "Пример";
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Сноска: номер в тексте и пояснение мелко внизу. */
.lesson-body sup { font-size: 0.7em; color: var(--accent); font-weight: 700; }

.lesson-body small {
  display: block;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* --- вкладки, таймлайн, «правильно / неправильно», «соотнеси» --- */

.fold-group { margin: 16px 0; }
.fold-group .fold { margin: 0 0 8px; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}

.tabs__radio { position: absolute; opacity: 0; pointer-events: none; }

.tabs__label {
  order: 1;
  flex: 1 1 auto;
  min-height: 44px;
  padding: 11px 14px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.tabs__panel { order: 2; display: none; width: 100%; padding: 4px 16px 14px; }

.tabs__radio:checked + .tabs__label { border-bottom-color: var(--accent); color: var(--ink); }
.tabs__radio:checked + .tabs__label + .tabs__panel { display: block; }
.tabs__radio:focus-visible + .tabs__label { outline: 2px solid var(--accent); outline-offset: -2px; }

.timeline { margin: 16px 0; padding: 0; list-style: none; }

.timeline__item {
  position: relative;
  padding: 0 0 12px 26px;
  border-left: 2px solid var(--line);
  margin-left: 8px;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 12px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--accent);
}

.timeline__item:last-child { border-left-color: transparent; }

.timeline__title { min-height: 44px; padding: 9px 0; font-weight: 600; cursor: pointer; }
.timeline__body > *:first-child { margin-top: 0; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }

@media (max-width: 520px) { .compare { grid-template-columns: 1fr; } }

.compare__col { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.compare__col--good { background: rgba(31, 146, 84, 0.08); border-color: rgba(31, 146, 84, 0.35); }
.compare__col--bad { background: rgba(192, 57, 43, 0.07); border-color: rgba(192, 57, 43, 0.35); }
.compare__title { margin: 0 0 6px; font-weight: 700; }
.compare__col--good .compare__title { color: var(--done); }
.compare__col--bad .compare__title { color: var(--warn); }

.match { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.match__task { margin: 0 0 10px; font-weight: 600; }

.match__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  margin-bottom: 6px;
  border-radius: 10px;
}

@media (max-width: 520px) { .match__row { grid-template-columns: 1fr; } }

.match__right { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--card); color: var(--ink); }
.match__row--ok { background: rgba(31, 146, 84, 0.1); }
.match__row--bad { background: rgba(192, 57, 43, 0.1); }
.match__verdict { margin: 10px 0 0; font-weight: 600; }
