/* ============================================================================
   article.css — общий стиль текстовых и разборных страниц.
   Задача: не допускать «простыней». Абзацы ограничены по мере, длинные
   участки разбиваются панелями, callout-блоками и плитками из global.css.
   ========================================================================== */

.page-hero {
  padding-block: 28px 8px;
}

@media (min-width: 1024px) {
  .page-hero {
    padding-block: 40px 12px;
  }
}

.page-hero h1 {
  max-width: 22ch;
  margin-bottom: 20px;
}

.page-hero__lead {
  font-size: 17px;
  line-height: 28px;
  color: var(--on-surface-variant);
  max-width: 66ch;
  margin: 0;
}

@media (min-width: 1024px) {
  .page-hero__lead {
    font-size: 18px;
    line-height: 29px;
  }
}

/* Текстовый поток статьи */

.prose {
  max-width: 74ch;
}

.prose > h2 {
  margin-top: 44px;
  margin-bottom: 16px;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose > h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.prose p {
  font-size: 16px;
  line-height: 27px;
  color: var(--on-surface-variant);
  margin-bottom: 16px;
}

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--on-surface-variant);
}

.prose li {
  font-size: 16px;
  line-height: 27px;
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--primary);
}

/* Широкая колонка для страниц с сетками и таблицами */
.prose--wide {
  max-width: none;
}

.prose--wide p,
.prose--wide li {
  max-width: 74ch;
}

/* Блок «Читать дальше» — внутренняя перелинковка в конце каждой страницы */

.related {
  margin-top: 8px;
}

.related h2 {
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--outline);
  margin-bottom: 18px;
}

.related-grid {
  display: grid;
  gap: 1px;
  background: rgba(65, 71, 80, 0.3);
  border: 1px solid rgba(65, 71, 80, 0.3);
  border-radius: var(--radius-sm);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: rgba(25, 28, 31, 0.9);
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}

.related-card:hover {
  background: var(--surface-container-high);
  text-decoration: none;
}

.related-card span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--on-surface);
}

.related-card .icon {
  color: var(--primary);
}

.related-card em {
  font-style: normal;
  font-size: 13px;
  line-height: 20px;
  color: var(--on-surface-variant);
}

/* Определения: используется на странице классов продуктов */

.def-list {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

.def-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 24px;
  background: var(--surface-container-low);
  border: 1px solid rgba(65, 71, 80, 0.3);
  border-radius: var(--radius-sm);
}

@media (max-width: 620px) {
  .def-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.def-item__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(157, 202, 255, 0.28);
  border-radius: var(--radius-xs);
  background: rgba(157, 202, 255, 0.06);
  color: var(--primary);
}

.def-item h2 {
  font-size: 22px;
  line-height: 29px;
  margin-bottom: 4px;
}

.def-item__abbr {
  display: block;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--outline);
  margin-bottom: 12px;
}

.def-item p {
  font-size: 15px;
  line-height: 25px;
  color: var(--on-surface-variant);
  margin-bottom: 12px;
  max-width: 74ch;
}

.def-item p:last-child {
  margin-bottom: 0;
}

.def-item__when {
  font-size: 14px;
  line-height: 22px;
  padding-top: 12px;
  border-top: 1px solid rgba(65, 71, 80, 0.3);
  color: var(--on-surface-variant);
}

.def-item__when b {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 5px;
}

/* Пара «показатель — значение» для страниц контактов и методологии */

.facts {
  display: grid;
  gap: 1px;
  background: rgba(65, 71, 80, 0.3);
  border: 1px solid rgba(65, 71, 80, 0.3);
  border-radius: var(--radius-sm);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-block: 24px;
}

.facts div {
  padding: 20px;
  background: rgba(25, 28, 31, 0.9);
}

.facts dt {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--outline);
  margin-bottom: 8px;
}

.facts dd {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  color: var(--on-surface-variant);
}
