/*
 * Страницы контента: юридические, Support, всё, что WordPress рисует из редактора.
 *
 * До этого они шли по шкале Blocksy, и она спорит с сайтом: H2 там 35px против H1 в 30px, то есть
 * подзаголовок крупнее заголовка. На странице товара и в каталоге работала наша шкала. Отсюда и
 * ощущение, что страницы собраны разными людьми.
 *
 * Здесь одна шкала на все такие страницы: заголовок крупнее подзаголовка, подзаголовок крупнее
 * следующего уровня, отступы и ширина колонки из тех же токенов, что и весь остальной сайт.
 */

.entry-title,
.page-title,
.entry-content h1 {
	font-size: var(--akem-size-display);
	line-height: var(--akem-leading-tight);
	letter-spacing: -0.01em;
	color: var(--akem-ink);
}

/* The heading and the prose under it share one column, and the auto margins keep that column
   centred; without them the text hugged the container edge while the heading ran full width.
   THE SHOP IS EXCLUDED. Cart, checkout and the account pages are not prose: squeezing them into a
   reading measure left the checkout as a 736px strip in the middle of a 1440px screen, with the
   billing form and the order summary fighting over half a page each. */
body:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) .entry-title,
body:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) .page-title,
body:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) .entry-content {
	max-width: var(--akem-measure);
	margin-inline: auto;
}

.entry-content {
	font-size: var(--akem-size-body);
	line-height: var(--akem-leading-body);
	color: var(--akem-ink);
}

.entry-content h2 {
	margin-block: var(--akem-space-5) var(--akem-space-2);
	font-size: var(--akem-size-title);
	line-height: var(--akem-leading-tight);
	color: var(--akem-ink);
}

.entry-content h3 {
	margin-block: var(--akem-space-4) var(--akem-space-2);
	font-size: 1.125rem;
	line-height: var(--akem-leading-tight);
	color: var(--akem-ink);
}

.entry-content h4,
.entry-content h5,
.entry-content h6 {
	margin-block: var(--akem-space-3) var(--akem-space-1);
	font-size: var(--akem-size-body);
	font-weight: 500;
	color: var(--akem-ink);
}

/* Text rhythm, weighed down with :where() like the links below. WooCommerce prints its notices as
   lists inside the page content; at full weight these rules squeezed a notice's inner padding to
   24px and its icon sat on top of the first letter. A component that styles its own list has to win
   over running text. */
:where(.entry-content) p,
:where(.entry-content) ul,
:where(.entry-content) ol {
	margin-block: 0 var(--akem-space-3);
}

:where(.entry-content) ul,
:where(.entry-content) ol {
	padding-inline-start: var(--akem-space-4);
}

:where(.entry-content) li {
	margin-block-end: var(--akem-space-1);
}

/* No underlines on the site. A link in running text is marked by the navy instead, which is also
   what keeps it findable in a page of black legal copy.

   Weighed down to a bare element with :where(). A button that is a link - a pill placed on a page
   by a shortcode - is still a link inside .entry-content, and at full weight this rule beat the pill
   role in controls.css and printed navy text on a black pill. A control's role has to win over
   running text, always, so this rule steps aside for anything that has one. */
:where(.entry-content) a {
	color: var(--akem-navy);
	text-decoration: none;
}

:where(.entry-content) a:hover {
	color: var(--akem-navy-deep);
}

/* Первый заголовок в тексте не отбивается сверху: над ним уже стоит заголовок страницы. */
.entry-content > :first-child {
	margin-block-start: 0;
}

@media (max-width: 782px) {
	.entry-title,
	.page-title,
	.entry-content h1 {
		font-size: var(--akem-size-title);
	}

	/* The compound name is the exception: it is the subject of its page, not a page heading over
	   prose, and the reference sets it at 30 on a phone. One step down from the desktop 32, and it
	   stays clearly above the 24 the text pages take. */
	.woocommerce div.product .product_title {
		font-size: 1.75rem;
	}

	.entry-content h2 {
		margin-block-start: var(--akem-space-4);
		font-size: 1.25rem;
	}
}
