/* =========================================================
   СТРАНИЦА СТАТЬИ
   ========================================================= */

.article {
  max-width: 780px;
  margin-inline: auto;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.article__meta span + span::before {
  content: '•';
  margin-right: 12px;
  color: var(--border);
}

.article h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 22px;
}

.article__lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.article__lead:last-of-type {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.article h2 {
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 48px 0 16px;
  scroll-margin-top: 90px;
}

.article h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 30px 0 10px;
  scroll-margin-top: 90px;
}

.article p {
  margin-bottom: 16px;
}

.article strong {
  color: var(--text);
  font-weight: 700;
}

.article blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.article blockquote p {
  margin-bottom: 0;
}

.article blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-style: normal;
  opacity: 0.8;
}

/* ---------- ОГЛАВЛЕНИЕ ---------- */
.article__toc {
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 40px;
}

.article__toc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.article__toc ol {
  margin: 0;
  padding-left: 20px;
}

.article__toc li {
  margin-bottom: 6px;
  color: var(--text-muted);
}

.article__toc a {
  color: var(--text);
  transition: color 0.2s;
}

.article__toc a:hover {
  color: var(--accent);
}

/* ---------- CTA в конце статьи ---------- */
.article__cta {
  margin-top: 48px;
  padding: 32px;
  background: linear-gradient(135deg, #1c1c1c 0%, #141414 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.article__cta-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.article__cta-text {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 4px;
}

.article__cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Ссылка «Все статьи» ---------- */
.article__back {
  max-width: 780px;
  margin: 32px auto 0;
  font-size: 14px;
  font-weight: 600;
}

.article__back a {
  color: var(--accent);
  transition: opacity 0.2s;
}

.article__back a:hover {
  opacity: 0.8;
}

@media (max-width: 720px) {
  .article {
    font-size: 15px;
  }
  .article__toc {
    padding: 18px 20px;
  }
  .article__cta {
    padding: 24px;
  }
  .article__cta-title {
    font-size: 20px;
  }
}

/* =========================================================
   РАЗДЕЛ «ПОЛЕЗНЫЕ СТАТЬИ» (/articles/)
   ========================================================= */

.articles-head {
  margin-bottom: 36px;
}

.posts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s;
}

.post-card:hover {
  border-color: rgba(249, 115, 22, 0.45);
  transform: translateY(-3px);
}

.post-card__date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-card__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}

.post-card__title a {
  color: var(--text);
  transition: color 0.2s;
}

.post-card__title a:hover {
  color: var(--accent);
}

.post-card__excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 6px;
  flex-grow: 1;
}

.post-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.post-card__link:hover {
  border-color: var(--accent);
}

.articles-empty {
  color: var(--text-muted);
  font-size: 15px;
}

.articles-empty a {
  color: var(--accent);
  text-decoration: underline;
}

.articles-cta {
  margin-top: 56px;
}

@media (max-width: 720px) {
  .posts {
    grid-template-columns: 1fr;
  }
  .post-card {
    padding: 20px;
  }
  .post-card__title {
    font-size: 17px;
  }
}