/* ===== Blog typography tune: softer headings + visible links ===== */
/* Вставь в КОНЕЦ custom.css */

main article.prose h2,
main article.prose h3,
main article.prose h4,
main article.prose h5 {
  color: #111827 !important;
  font-family: inherit !important;
  letter-spacing: -0.005em !important;
  line-height: 1.35 !important;
  font-weight: 650 !important;
  /* было слишком жирно */
}

/* H2 — заметный, но не огромный */
main article.prose h2 {
  font-size: clamp(1.35rem, 1.15rem + 0.55vw, 1.65rem) !important;
  margin-top: 1.7rem !important;
  margin-bottom: 0.75rem !important;
  padding-bottom: 0.28rem !important;
  border-bottom: 1px solid #e5e7eb !important;
  scroll-margin-top: 96px;
}

/* H3 */
main article.prose h3 {
  font-size: clamp(1.2rem, 1.08rem + 0.3vw, 1.35rem) !important;
  margin-top: 1.4rem !important;
  margin-bottom: 0.65rem !important;
  font-weight: 620 !important;
}

/* H4 */
main article.prose h4 {
  font-size: clamp(1.08rem, 1rem + 0.2vw, 1.2rem) !important;
  margin-top: 1.2rem !important;
  margin-bottom: 0.55rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
}

/* H5 */
main article.prose h5 {
  font-size: 1rem !important;
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
}

/* Отступ после заголовков */
main article.prose :is(h2, h3, h4, h5)+p,
main article.prose :is(h2, h3, h4, h5)+ul,
main article.prose :is(h2, h3, h4, h5)+ol {
  margin-top: 0.3rem !important;
}

/* ===== Ссылки в тексте статьи ===== */
main article.prose p a,
main article.prose li a,
main article.prose blockquote a {
  color: #1d4ed8 !important;
  /* blue-700 */
  text-decoration: underline !important;
  text-decoration-thickness: 1.5px !important;
  text-underline-offset: 2px !important;
  font-weight: 500 !important;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

main article.prose p a:hover,
main article.prose li a:hover,
main article.prose blockquote a:hover {
  color: #1e40af !important;
  /* blue-800 */
  text-decoration-color: #1e40af !important;
}

main article.prose p a:visited,
main article.prose li a:visited,
main article.prose blockquote a:visited {
  color: #3730a3 !important;
  /* indigo-800 */
}

main article.prose a:focus-visible {
  outline: 2px solid #93c5fd !important;
  /* blue-300 */
  outline-offset: 2px !important;
  border-radius: 2px;
}

/* Мобилка — еще чуть компактнее */
@media (max-width: 640px) {
  main article.prose h2 {
    font-size: 1.3rem !important;
    margin-top: 1.45rem !important;
  }

  main article.prose h3 {
    font-size: 1.17rem !important;
    margin-top: 1.2rem !important;
  }
}