/* Стили страниц "О проекте", 404, каталога и хлебных крошек.
   Отдельный файл: site.css уже на границе 150 строк. Все размеры кратны 4 или 8,
   зоны нажатия не меньше 44px, цвета только из переменных site.css. */

/* ---- Видимая рамка при выборе клавиатурой (доступность) ---- */
.ms-cta:focus-visible,
.ms-breadcrumbs a:focus-visible,
.ms-free-module-list a:focus-visible,
.ms-about a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.ms-cta:active { transform: none; opacity: .9; }

/* ---- Хлебные крошки: тот же левый край, что у текста (main: 860px, отступ 20px) ---- */
.ms-breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px;
  max-width: 860px; margin: 0 auto; padding: 8px 20px 0;
  font-size: 14px; color: var(--text-muted);
}
.ms-breadcrumbs a {
  color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px;
  display: inline-flex; align-items: center; min-height: 44px;
}
.ms-breadcrumbs a:hover { color: var(--text); }
.ms-breadcrumbs [aria-current="page"] { color: var(--text); }
.ms-breadcrumbs + main { padding-top: 8px; }

/* ---- Две кнопки подряд: главная (белая) и второстепенная (контур) ---- */
.ms-cta-row { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.ms-cta-row .ms-cta {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; border: 1px solid transparent;
}
.ms-cta-row .ms-cta-secondary {
  background: transparent; color: var(--text); border-color: var(--border);
}
.ms-cta-row .ms-cta-secondary:hover { background: var(--card); }
@media (min-width: 560px) {
  .ms-cta-row { flex-direction: row; }
}

/* ---- Страница "О проекте" ---- */
.ms-about h1 { margin-bottom: 12px; }
.ms-about .ms-lead { font-size: 17px; line-height: 1.6; margin-bottom: 8px; }
.ms-about section { margin-top: 32px; }
.ms-about h2 { font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
.ms-about p { margin: 0 0 12px; line-height: 1.6; }
.ms-about a:not(.ms-cta) { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ms-about a:not(.ms-cta):hover { color: var(--text-muted); }
.ms-about .ms-promo { margin-bottom: 0; }

/* Контакты: строка "подпись слева, ссылка справа", высота не меньше 48px */
.ms-contact-list { list-style: none; padding: 0; margin: 8px 0 0; }
.ms-contact-list li {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 4px 16px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--border);
}
.ms-contact-list li:first-child { border-top: 0; }
.ms-contact-label { color: var(--text-muted); font-size: 14px; }

/* ---- Страница 404 ---- */
.ms-404 { text-align: center; padding-top: 24px; }
.ms-404 h1 { margin-bottom: 8px; }
.ms-404 .ms-free-module-list { margin: 24px 0; }
.ms-404 .ms-free-module-list a { justify-content: center; min-height: 48px; }

/* ---- Каталог модулей ---- */
.ms-module-price { color: var(--text-muted); font-size: 14px; margin: 8px 0 0; }

/* ---- Шапка на узких телефонах: название и кнопка не переносятся на вторую строку ---- */
.ms-header { gap: 12px; padding: 12px 16px; }
.ms-logo span, .ms-cta-header { white-space: nowrap; }
.ms-cta-header { padding: 10px 14px; }
@media (min-width: 560px) {
  .ms-header { padding: 16px 24px; }
  .ms-cta-header { padding: 10px 18px; }
}

/* ---- Кнопки на странице модуля: по центру, на всю ширину на телефоне ---- */
.ms-module .ms-cta {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px;
}
@media (min-width: 560px) {
  .ms-module .ms-cta { display: inline-flex; }
}

/* ---- Длинные разделы страниц модулей (sections): читаемая строка, ритм 8px ---- */
.ms-body { margin-bottom: 32px; }
.ms-body h2 { font-size: 20px; line-height: 1.3; margin: 0 0 12px; }
.ms-body p { margin: 0 0 12px; line-height: 1.7; }
.ms-body ol, .ms-body ul { margin: 0 0 12px; padding-left: 24px; }
.ms-body li { margin-bottom: 8px; line-height: 1.6; }
.ms-body li::marker { color: var(--text-muted); }
.ms-body a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ms-body a:hover { color: var(--text-muted); }
.ms-body a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ms-module-faq h2 { font-size: 20px; margin-bottom: 16px; }

/* ---- Каталог статей /guides/: карточки списком, как ms-module-list, без иконки ---- */
.ms-guide-list { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; }
.ms-guide-list a {
  display: block; padding: 14px 16px; min-height: 44px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card);
  color: var(--text); text-decoration: none;
}
.ms-guide-list a:hover { background: var(--bg); }
.ms-guide-list strong { display: block; font-size: 16px; }
.ms-guide-list p { color: var(--text-muted); margin: 6px 0 0; font-size: 14px; line-height: 1.5; }

/* ---- Статья /guides/<slug>/: тот же читаемый ритм, что и у ms-body ---- */
.ms-guide h1 { margin-bottom: 12px; }
.ms-guide .ms-lead { font-size: 17px; line-height: 1.6; margin-bottom: 8px; }
.ms-guide .ms-related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ms-guide .ms-related a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ms-guide .ms-related a:hover { color: var(--text-muted); }
