/**
 * Читаемая типографика статьи на страницах/записях с калькуляторами.
 *
 * Проблема: плагин калькуляторов подключает Tailwind (cdn.tailwindcss.com),
 * чей preflight глобально сбрасывает у «голых» тегов:
 *     h1..h6 { font-size: inherit; font-weight: inherit; }
 *     ul, ol { list-style: none; margin: 0; padding: 0; }
 * Поэтому заголовки статьи (h2/h3) сливаются с обычным текстом, а списки
 * теряют маркеры. Заголовки внутри карточки калькулятора не страдают —
 * у них есть свои Tailwind-классы (text-base, font-semibold и т.п.).
 *
 * Решение: возвращаем ясную иерархию ТОЛЬКО элементам статьи — «голым»
 * (:not([class])) и стандартным блокам ядра (.wp-block-heading / .wp-block-list),
 * причём только прямым потомкам .entry-content. Карточку калькулятора,
 * где у всех тегов утилитарные Tailwind-классы, это не затрагивает.
 */

/* --- Заголовок страницы (H1, post-title) --------------------------------- */
.wp-block-post-title {
	font-size: clamp(1.9rem, 1.35rem + 2.3vw, 2.6rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #0f172a;
	margin-bottom: 0.65em;
}

/* --- Основной текст статьи ------------------------------------------------ */
.entry-content > p:not([class]),
.entry-content > ul:not([class]),
.entry-content > ol:not([class]),
.entry-content > .wp-block-list {
	font-size: 1.0625rem;   /* ~17px, крупнее для комфортного чтения */
	line-height: 1.75;
	font-weight: 400;       /* вместо тонкого 300 из темы */
	color: #374151;         /* графитово-серый: мягче чистого чёрного заголовков */
	margin: 0 0 1.1em;
}

.entry-content > p:not([class]) {
	max-width: 78ch;        /* комфортная длина строки */
	/* Ограничение ширины 78ch + правило constrained-layout WP
	   (margin-left/right: auto !important) центрировали абзац в контейнере
	   1200px, из-за чего появлялся огромный отступ слева. Прижимаем текст
	   к левому краю — в одну линию с заголовками и списками. */
	margin-inline: 0 auto !important;
}

/* --- H2: раздел статьи ---------------------------------------------------- */
.entry-content > h2:not([class]),
.entry-content > h2.wp-block-heading {
	font-size: clamp(1.55rem, 1.15rem + 1.7vw, 2rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: #0f172a;
	margin: 2em 0 0.7em;
	padding-bottom: 0.35em;
	border-bottom: 2px solid #e5e7eb;
}

.entry-content > h2:not([class]):first-of-type,
.entry-content > h2.wp-block-heading:first-of-type {
	margin-top: 1.2em;      /* без чрезмерного отступа у первого раздела */
}

/* --- H3: подраздел -------------------------------------------------------- */
.entry-content > h3:not([class]),
.entry-content > h3.wp-block-heading {
	font-size: clamp(1.25rem, 1.05rem + 0.85vw, 1.5rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: #1f2937;
	margin: 1.7em 0 0.5em;
}

/* --- H4 ------------------------------------------------------------------- */
.entry-content > h4:not([class]),
.entry-content > h4.wp-block-heading {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.35;
	color: #1f2937;
	margin: 1.4em 0 0.4em;
}

/* --- Списки: вернуть маркеры/нумерацию (preflight их снял) ---------------- */
.entry-content > ul:not([class]),
.entry-content > ol:not([class]),
.entry-content > .wp-block-list {
	padding-left: 1.6em;
}
.entry-content > ul:not([class]),
.entry-content > ul.wp-block-list {
	list-style: disc;
}
.entry-content > ol:not([class]),
.entry-content > ol.wp-block-list {
	list-style: decimal;
}
.entry-content > ul:not([class]) li,
.entry-content > ol:not([class]) li,
.entry-content > .wp-block-list li {
	margin-bottom: 0.4em;
}

/* --- Ссылки в тексте статьи — заметный акцент ----------------------------- */
.entry-content > p:not([class]) a,
.entry-content > ul:not([class]) a,
.entry-content > ol:not([class]) a,
.entry-content > .wp-block-list a {
	color: #503aa8;                 /* accent-3 темы */
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}
.entry-content > p:not([class]) a:hover,
.entry-content > ul:not([class]) a:hover,
.entry-content > ol:not([class]) a:hover,
.entry-content > .wp-block-list a:hover {
	text-decoration: none;
}
