/* Article body: headings, paragraphs, lists — readable hierarchy and spacing */

.article-detail__content {
  font-size: 18px;
  line-height: 1.65;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.article-detail__content h1,
.article-detail__content h2,
.article-detail__content h3,
.article-detail__content h4,
.article-detail__content h5,
.article-detail__content h6 {
  font-weight: 700;
  line-height: 1.25;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  color: var(--text-color, #232325);
  font-family: inherit;
}

.article-detail__content h1:first-child,
.article-detail__content h2:first-child,
.article-detail__content h3:first-child,
.article-detail__content h4:first-child,
.article-detail__content .article-detail__section:first-child h6 {
  margin-top: 0;
}

/* H2: крупный подзаголовок с толстой акцентной линией снизу (как на референсе) */
.article-detail__content h2,
.article-detail__content .article-detail__section h6 {
  font-size: 1.75rem;
  border-bottom: 3px solid var(--accent-green, #eaff8a);
  padding-bottom: 0.35em;
}

.article-detail__content h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

.article-detail__content h4 {
  font-size: 1.2rem;
}

.article-detail__content h5,
.article-detail__content h6 {
  font-size: 1.1rem;
}

.article-detail__content p {
  margin-bottom: 1.25em;
}

.article-detail__content p:last-child {
  margin-bottom: 0;
}

.article-detail__content ul,
.article-detail__content ol {
  margin: 1em 0 1.5em;
  padding-left: 1.5em;
}

.article-detail__content ul {
  list-style-type: disc;
}

.article-detail__content ol {
  list-style-type: decimal;
}

.article-detail__content ul li,
.article-detail__content ol li {
  margin-bottom: 0.5em;
  list-style: inherit;
}

.article-detail__content ul li:last-child,
.article-detail__content ol li:last-child {
  margin-bottom: 0;
}

.article-detail__content strong {
  font-weight: 600;
}

/* Spacing between direct children: less than 60px for tighter flow, but headings get extra top */
.article-detail__content > *:not(:last-child) {
  margin-bottom: 1.25em;
}

.article-detail__content > h2:not(:first-child),
.article-detail__content > h3:not(:first-child),
.article-detail__content > h4:not(:first-child) {
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.article-detail__content > .article-code-wrap {
  margin-top: 1em;
  margin-bottom: 1.5em;
}
