/*
Theme Name: EpicWins
Author: iO Media Ltd
Description: Block theme for EpicWins, a B2B news site covering iGaming, prediction markets and crypto.
Version: 1.0.1
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: epicwins
*/

/*
 * Every value below comes from a theme.json preset or custom property (DESIGN.md 12).
 * Media queries use the breakpoints in DESIGN.md 6.1: custom properties do not work there.
 */

/*
 * Dark mode (DESIGN.md 11). The page follows the device, unless the visitor picked
 * a mode with the header switch: then <html data-theme> holds the choice.
 * The two dark blocks must stay identical.
 */

:root {
	color-scheme: light dark;
}

:root[data-theme="light"] {
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--wp--preset--color--black: #0E0E0D;
		--wp--preset--color--black-edge: #34342F;
		--wp--preset--color--base: #1A1A18;
		--wp--preset--color--surface: #232320;
		--wp--preset--color--surface-strong: #2C2C28;
		--wp--preset--color--ink: #F1F1EC;
		--wp--preset--color--ink-muted: #BDBDB4;
		--wp--preset--color--ink-subtle: #9A9A91;
		--wp--preset--color--line: #34342F;
		--wp--preset--color--crown-strong: #FFE08A;
		--wp--preset--color--danger: #F97066;
		--wp--preset--shadow--overlay: 0 8px 24px rgb(0 0 0 / 0.5), 0 2px 6px rgb(0 0 0 / 0.4);
	}
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--wp--preset--color--black: #0E0E0D;
	--wp--preset--color--black-edge: #34342F;
	--wp--preset--color--base: #1A1A18;
	--wp--preset--color--surface: #232320;
	--wp--preset--color--surface-strong: #2C2C28;
	--wp--preset--color--ink: #F1F1EC;
	--wp--preset--color--ink-muted: #BDBDB4;
	--wp--preset--color--ink-subtle: #9A9A91;
	--wp--preset--color--line: #34342F;
	--wp--preset--color--crown-strong: #FFE08A;
	--wp--preset--color--danger: #F97066;
	--wp--preset--shadow--overlay: 0 8px 24px rgb(0 0 0 / 0.5), 0 2px 6px rgb(0 0 0 / 0.4);
}

/* Base */

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks > main {
	flex: 1;
	margin-block-start: 0;
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--80);
}

.wp-site-blocks > footer {
	margin-block-start: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	text-wrap: balance;
}

p,
li {
	text-wrap: pretty;
}

time,
table,
.page-numbers {
	font-variant-numeric: tabular-nums;
}

a,
button,
.wp-element-button {
	transition-property: color, background-color, text-decoration-color, opacity;
	transition-duration: var(--wp--custom--duration--fast);
	transition-timing-function: var(--wp--custom--easing--standard);
}

a {
	text-decoration-thickness: var(--wp--custom--border--hairline);
	text-underline-offset: var(--wp--custom--underline--offset);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--ink);
	outline-offset: var(--wp--custom--focus--offset);
}

.wp-element-button:active {
	translate: 0 var(--wp--custom--border--hairline);
}

/* Article and page text links (DESIGN.md 4.5). Hover is the same on the whole site (owner decision, step 10):
   the underline turns to the crown colour and grows to 2 px, as on headlines. No filled background. */

.wp-block-post-content a:where(:not(.wp-element-button)) {
	text-decoration-skip-ink: auto;
}

.wp-block-post-content a:where(:not(.wp-element-button)):hover,
.wp-block-post-content a:where(:not(.wp-element-button)):focus-visible {
	text-decoration-color: var(--wp--preset--color--crown);
	text-decoration-thickness: var(--wp--custom--border--rule);
}

/* Header and footer: black in both modes (DESIGN.md 9.1, 9.3) */

.ew-site-header,
.ew-site-footer {
	background-color: var(--wp--preset--color--black);
	color: var(--wp--preset--color--on-black);
}

.ew-site-header :focus-visible,
.ew-site-footer :focus-visible {
	outline-color: var(--wp--preset--color--on-black);
}

.ew-site-header > .ew-header,
.ew-site-footer > .ew-footer {
	width: 100%;
	max-width: var(--wp--style--global--wide-size);
}

.ew-logo {
	display: block;
	flex: none;
}

.ew-logo img {
	display: block;
	width: auto;
	height: var(--wp--custom--logo--height);
}

/* Buttons (DESIGN.md 9.9) */

.ew-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--wp--custom--touch-target);
	border: 0;
	font-family: inherit;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.ew-button--crown,
.ew-button--crown:hover {
	color: var(--wp--preset--color--on-crown);
}

.ew-button--crown {
	background-color: var(--wp--preset--color--crown);
}

.ew-button--crown:hover {
	background-color: var(--wp--preset--color--crown-strong);
}

.ew-icon-button {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--wp--custom--control--size);
	height: var(--wp--custom--control--size);
	padding: 0;
	border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--sm);
	background-color: transparent;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	transition-property: color, background-color, border-color;
}

/* The mode switch keeps its place while hidden, so nothing moves when the script shows it. */
.ew-theme-toggle[hidden] {
	visibility: hidden;
}

.ew-icon-button:hover {
	background-color: var(--wp--preset--color--surface);
}

/* Mode switch: the moon in light mode, the sun in dark mode. */
.ew-theme-toggle[data-ew-mode="light"] .ew-theme-toggle__sun,
.ew-theme-toggle[data-ew-mode="dark"] .ew-theme-toggle__moon {
	display: none;
}

.ew-icon-button:active {
	translate: 0 var(--wp--custom--border--hairline);
}

/* On black: 44 px and 24 px icons in the compact header, 40 px and 20 px from 1024 px. */
.ew-site-header .ew-icon-button {
	width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
	border-color: var(--wp--preset--color--black-edge);
	color: var(--wp--preset--color--on-black);
}

.ew-site-header .ew-icon-button:hover {
	border-color: var(--wp--preset--color--on-black-muted);
	background-color: transparent;
}

.ew-site-header .ew-icon-button .ew-icon {
	width: var(--wp--custom--icon--size-compact);
	height: var(--wp--custom--icon--size-compact);
}

/* Header (DESIGN.md 9.1) */

.wp-site-blocks > header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0);
	z-index: var(--wp--custom--layer--header);
}

/* Logged in, on a phone: the WordPress toolbar scrolls away with the page, so the header sticks to the very top. */
@media (max-width: 600px) {
	.wp-site-blocks > header {
		top: 0;
	}
}

.ew-site-header {
	border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--black-edge);
}

.ew-header {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--50);
	min-height: var(--wp--custom--header--height);
}

.ew-header__actions {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin-inline-start: auto;
}

.ew-header__advertise {
	display: none;
}

/* Main menu. Below 1024 px it is the full-screen panel (DESIGN.md 9.2). */

.ew-nav {
	position: fixed;
	inset: 0 0 0 auto;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wp--custom--dropdown--drawer);
	height: auto;
	max-height: none;
	margin: 0;
	padding: 0 var(--wp--custom--gutter) var(--wp--preset--spacing--60);
	border: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	background-color: var(--wp--preset--color--black);
	color: var(--wp--preset--color--on-black);
	transform: translateX(100%);
	transition-property: transform, display, overlay;
	transition-duration: var(--wp--custom--duration--base);
	transition-timing-function: var(--wp--custom--easing--standard);
	transition-behavior: allow-discrete;
}

.ew-nav:popover-open {
	display: block;
	transform: none;
}

@starting-style {
	.ew-nav:popover-open {
		transform: translateX(100%);
	}
}

.ew-nav::backdrop {
	background-color: color-mix(in srgb, var(--wp--preset--color--black) var(--wp--custom--dropdown--scrim), transparent);
}

/* The rows of the panel come in one after the other. */
.ew-nav:popover-open .ew-nav__item {
	animation: ew-rise var(--wp--custom--duration--slow) var(--wp--custom--easing--standard) both;
	animation-delay: calc(var(--ew-i, 0) * var(--wp--custom--duration--step));
}

.ew-nav__item:nth-child(2) { --ew-i: 1; }
.ew-nav__item:nth-child(3) { --ew-i: 2; }
.ew-nav__item:nth-child(4) { --ew-i: 3; }
.ew-nav__item:nth-child(5) { --ew-i: 4; }
.ew-nav__item:nth-child(6) { --ew-i: 5; }
.ew-nav__item:nth-child(7) { --ew-i: 6; }
.ew-nav__item:nth-child(8) { --ew-i: 7; }

html:has(.ew-nav:popover-open) {
	overflow: hidden;
}

.ew-nav__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--wp--custom--header--height);
}

.ew-nav__list,
.ew-nav__sub,
.ew-social,
.ew-footer__column ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ew-nav__item {
	border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--black-line);
}

.ew-nav__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	min-height: var(--wp--custom--touch-target);
	padding-block: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--on-black);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--heading);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	text-decoration: none;
	list-style: none;
	cursor: pointer;
	transition-property: color, border-color;
	transition-duration: var(--wp--custom--duration--fast);
	transition-timing-function: var(--wp--custom--easing--standard);
}

.ew-nav__link::-webkit-details-marker {
	display: none;
}

.ew-nav .ew-nav__caret,
.ew-nav .ew-nav__minus,
.ew-nav .ew-nav__group[open] .ew-nav__plus {
	display: none;
}

.ew-nav .ew-nav__group[open] .ew-nav__minus {
	display: block;
}

.ew-nav__sub {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--wp--preset--spacing--40);
	padding-block-end: var(--wp--preset--spacing--30);
}

/* The first link ("All ... news") runs the full width. */
.ew-nav__item:not([data-ew-section="regions"]) .ew-nav__sub > :first-child {
	grid-column: 1 / -1;
}

.ew-nav__item:not([data-ew-section="regions"]) .ew-nav__sub > :first-child a {
	color: var(--wp--preset--color--on-black);
}

.ew-nav__sub a {
	display: flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	color: var(--wp--preset--color--on-black-muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.ew-nav__sub a:hover,
.ew-nav__sub a:focus-visible {
	color: var(--wp--preset--color--on-black);
}

.ew-nav__foot {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
	padding-block-start: var(--wp--preset--spacing--50);
	border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--black-line);
}

/* Social and email icon links (PAGES.md 5.2, 5.3) */

/* The first icon lines up with the text above it: the pull equals the space around a 20 px icon in its 44 px link. */
.ew-social {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin-inline-start: calc(-1 * var(--wp--preset--spacing--30));
}

.ew-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
	border-radius: var(--wp--custom--radius--sm);
	color: var(--wp--preset--color--on-black-muted);
}

.ew-social__link:hover,
.ew-social__link:focus-visible {
	color: var(--wp--preset--color--on-black);
}

/* Search panel (PAGES.md 5.1, DESIGN.md 9.18) */

.ew-search {
	position: fixed;
	inset: auto;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--header--height) + var(--wp--preset--spacing--20));
	right: max(var(--wp--custom--gutter), calc((100vw - var(--wp--style--global--wide-size)) / 2));
	left: var(--wp--custom--gutter);
	box-sizing: border-box;
	width: auto;
	max-width: var(--wp--custom--search--width);
	margin: 0;
	margin-inline-start: auto;
	padding: var(--wp--preset--spacing--50);
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--overlay);
}

.ew-site-header .ew-search :focus-visible {
	outline-color: var(--wp--preset--color--ink);
}

.ew-search__row {
	display: flex;
	gap: var(--wp--preset--spacing--20);
}

.ew-field__label {
	display: block;
	margin-block-end: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
}

.ew-field {
	flex: 1;
	box-sizing: border-box;
	min-width: 0;
	height: var(--wp--custom--touch-target);
	padding-inline: var(--wp--preset--spacing--30);
	border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--ink-subtle);
	border-radius: var(--wp--custom--radius--sm);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
}

@media (min-width: 1024px) {
	.ew-header {
		min-height: var(--wp--custom--header--height-lg);
	}

	.ew-site-header .ew-logo img {
		height: var(--wp--custom--logo--height-lg);
	}

	.ew-site-header .ew-icon-button {
		width: var(--wp--custom--control--size);
		height: var(--wp--custom--control--size);
	}

	.ew-site-header .ew-icon-button .ew-icon {
		width: var(--wp--custom--icon--size);
		height: var(--wp--custom--icon--size);
	}

	.ew-header__advertise {
		display: inline-flex;
	}

	.ew-search {
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--header--height-lg) + var(--wp--preset--spacing--20));
	}

	/* The same menu as one row in the header. */
	.ew-nav {
		position: static;
		display: block;
		padding: 0;
		overflow: visible;
		max-width: none;
		background-color: transparent;
		transform: none;
		transition: none;
	}

	.ew-nav .ew-nav__item {
		animation: none;
	}

	.ew-nav__top,
	.ew-nav__foot,
	.ew-header__menu-button,
	.ew-nav .ew-nav__plus,
	.ew-nav .ew-nav__group[open] .ew-nav__minus {
		display: none;
	}

	.ew-nav .ew-nav__caret {
		display: block;
		width: var(--wp--preset--font-size--small);
		height: var(--wp--preset--font-size--small);
		transition: transform var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
	}

	.ew-nav .ew-nav__group[open] .ew-nav__caret {
		transform: rotate(180deg);
	}

	.ew-nav__list {
		display: flex;
		gap: var(--wp--preset--spacing--10);
	}

	.ew-nav__item {
		position: relative;
		border-top: 0;
	}

	.ew-nav__link {
		--ew-nav-drop: calc((var(--wp--custom--header--height-lg) - var(--wp--custom--control--size)) / 2);
		position: relative;
		box-sizing: border-box;
		gap: var(--wp--preset--spacing--10);
		min-height: var(--wp--custom--control--size);
		padding: 0 var(--wp--preset--spacing--30);
		border-radius: var(--wp--custom--radius--sm);
		color: var(--wp--preset--color--on-black-muted);
		font-size: var(--wp--preset--font-size--small);
		font-weight: 600;
		line-height: var(--wp--custom--line-height--normal);
		letter-spacing: 0;
		white-space: nowrap;
		transition-property: color, background-color;
	}

	.ew-nav__link:hover,
	.ew-nav__link:focus-visible,
	.ew-nav__group[open] > .ew-nav__link,
	.ew-nav__item.is-active .ew-nav__link {
		color: var(--wp--preset--color--on-black);
	}

	.ew-nav__link:hover,
	.ew-nav__group[open] > .ew-nav__link {
		background-color: var(--wp--preset--color--black-edge);
	}

	/* Active item: a crown bar flush with the header's bottom edge. */
	.ew-nav__item.is-active .ew-nav__link::after {
		content: "";
		position: absolute;
		right: var(--wp--preset--spacing--30);
		bottom: calc(-1 * var(--ew-nav-drop));
		left: var(--wp--preset--spacing--30);
		height: var(--wp--custom--border--marker);
		background-color: var(--wp--preset--color--crown);
	}

	/* The panel hangs a little under the header, two columns wide, and drops in. */
	.ew-nav__sub {
		position: absolute;
		top: calc(100% + (var(--wp--custom--header--height-lg) - var(--wp--custom--control--size)) / 2 + var(--wp--preset--spacing--20));
		left: 0;
		box-sizing: border-box;
		width: var(--wp--custom--dropdown--width-wide);
		padding: var(--wp--preset--spacing--30);
		border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--black-edge);
		border-radius: var(--wp--custom--radius--md);
		background-color: var(--wp--preset--color--black);
		box-shadow: var(--wp--preset--shadow--overlay);
		animation: ew-rise var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
	}

	.ew-nav__sub a {
		min-height: var(--wp--custom--control--size);
		padding-inline: var(--wp--preset--spacing--30);
		border-radius: var(--wp--custom--radius--sm);
		font-size: var(--wp--preset--font-size--small);
		transition-property: color, background-color;
	}

	.ew-nav__sub a:hover,
	.ew-nav__sub a:focus-visible {
		background-color: var(--wp--preset--color--black-edge);
	}
}

/* Footer (DESIGN.md 9.3) */

.ew-site-footer {
	padding-block: var(--wp--preset--spacing--80) var(--wp--preset--spacing--60);
	border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--black-edge);
}

.ew-site-footer .ew-logo img {
	height: var(--wp--custom--logo--height-footer);
}

.ew-footer__top,
.ew-footer__nav {
	display: grid;
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
}

.ew-footer__intro p {
	max-width: var(--wp--custom--footer--intro-width);
	margin-block: var(--wp--preset--spacing--40) 0;
	color: var(--wp--preset--color--on-black-muted);
}

.ew-footer__title {
	margin-block: 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--on-black);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--normal);
	letter-spacing: 0;
}

.ew-footer__column a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	color: var(--wp--preset--color--on-black-muted);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.ew-footer__column a:hover,
.ew-footer__column a:focus-visible {
	text-decoration: underline;
}

.ew-footer__bottom {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
	margin-block-start: var(--wp--preset--spacing--60);
	padding-block-start: var(--wp--preset--spacing--50);
	border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--black-line);
	color: var(--wp--preset--color--on-black-muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.ew-footer__legal {
	margin: 0;
}

@media (min-width: 600px) {
	.ew-footer__nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ew-footer__bottom {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

@media (min-width: 782px) {
	.ew-footer__nav {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ew-footer__top {
		grid-template-columns: var(--wp--custom--footer--intro-width) minmax(0, 1fr);
		column-gap: var(--wp--preset--spacing--70);
	}

	.ew-footer__column a {
		min-height: 0;
		padding-block: var(--wp--preset--spacing--10);
	}
}

/* Breadcrumbs (Yoast block, SEO.md 4.7) */

.yoast-breadcrumbs {
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

.yoast-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.yoast-breadcrumbs a:hover,
.yoast-breadcrumbs a:focus-visible {
	text-decoration: underline;
}

/* Feed row (DESIGN.md 9.6) */

.ew-feed-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: var(--wp--preset--spacing--40);
	row-gap: var(--wp--preset--spacing--10);
	align-items: start;
	padding-block: var(--wp--preset--spacing--40);
	border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-feed-row > * {
	margin-block: 0;
}

.ew-feed-row__time {
	grid-column: 1;
	grid-row: 1;
	line-height: var(--wp--custom--line-height--normal);
}

.ew-feed-row__text {
	grid-column: 1;
	grid-row: 2;
}

.ew-feed-row__text > * {
	margin-block: 0;
}

.ew-feed-row__text > * + * {
	margin-block-start: var(--wp--preset--spacing--20);
}

.ew-feed-row__thumb {
	grid-column: 2;
	grid-row: 1 / span 2;
	width: var(--wp--custom--thumb--size-sm);
}

.ew-feed-row__thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--wp--custom--ratio--wide);
	object-fit: cover;
	border-radius: var(--wp--custom--radius--sm);
}

.ew-feed-row__label {
	position: relative;
	z-index: 1;
	color: var(--wp--preset--color--ink);
}

.ew-feed-row__headline {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--wp--custom--clamp--headline);
	line-clamp: var(--wp--custom--clamp--headline);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--normal);
	letter-spacing: 0;
}

.ew-feed-row__headline a {
	text-decoration-thickness: var(--wp--custom--border--rule);
	text-underline-offset: var(--wp--custom--underline--offset-headline);
}

/* The headline link covers the whole row (DESIGN.md 9.5). */
.ew-feed-row__headline a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ew-feed-row__headline a:focus-visible {
	outline: none;
}

.ew-feed-row__headline a:focus-visible::after {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--ink);
	outline-offset: var(--wp--custom--focus--offset);
}

@media (min-width: 600px) {
	.ew-feed-row {
		grid-template-columns: var(--wp--custom--feed--time-width) minmax(0, 1fr) auto;
	}

	.ew-feed-row__text {
		grid-column: 2;
		grid-row: 1;
	}

	.ew-feed-row__thumb {
		grid-column: 3;
		grid-row: 1;
		width: var(--wp--custom--thumb--size);
	}
}

/* Pagination (DESIGN.md 9.17) */

.wp-block-query-pagination,
.ew-pagination {
	justify-content: center;
	gap: var(--wp--preset--spacing--20);
	margin-block-start: var(--wp--preset--spacing--70);
}

.wp-block-query-pagination > * {
	margin: 0;
}

.wp-block-query-pagination-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--wp--preset--spacing--20);
}

.wp-block-query-pagination .page-numbers,
.ew-pagination .page-numbers,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
	padding-inline: var(--wp--preset--spacing--10);
	border-radius: var(--wp--custom--radius--sm);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.wp-block-query-pagination a.page-numbers:hover,
.ew-pagination a.page-numbers:hover,
.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover {
	background-color: var(--wp--preset--color--surface);
}

.wp-block-query-pagination .page-numbers.current,
.ew-pagination .page-numbers.current {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
}

.wp-block-query-pagination-previous,
.wp-block-query-pagination-next,
.ew-pagination :is(.prev, .next) {
	border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-icon {
	display: block;
	width: var(--wp--custom--icon--size);
	height: var(--wp--custom--icon--size);
	fill: currentColor;
}

/* Secondary button (DESIGN.md 9.9) */

.ew-button--secondary {
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border: var(--wp--custom--button--border) solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--sm);
	background-color: transparent;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--button);
}

.ew-button--secondary:hover {
	background-color: var(--wp--preset--color--surface-strong);
}

.ew-button--secondary:active {
	translate: 0 var(--wp--custom--border--hairline);
}

/* Labels (DESIGN.md 9.7) */

.ew-label {
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--normal);
}

/* Missing image (DESIGN.md 8.1) */

.ew-placeholder {
	aspect-ratio: var(--wp--custom--ratio--wide);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface-strong) url(assets/images/crown.png) center / var(--wp--custom--placeholder--crown) auto no-repeat;
}

/* Avatars (DESIGN.md 9.8, 9.16) */

.ew-avatar {
	display: block;
	flex: none;
	width: var(--wp--custom--avatar--sm);
	height: var(--wp--custom--avatar--sm);
	border-radius: var(--wp--custom--radius--circle);
	object-fit: cover;
}

.ew-avatar--md {
	width: var(--wp--custom--avatar--md);
	height: var(--wp--custom--avatar--md);
}

.ew-avatar--lg {
	width: var(--wp--custom--avatar--lg);
	height: var(--wp--custom--avatar--lg);
}

/* Article layout (PAGES.md 7.2, DESIGN.md 6.3) */

.ew-article-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--70);
}

.ew-article-layout > *,
.ew-article > *,
.ew-rail > * {
	margin-block: 0;
}

.ew-article > * + * {
	margin-block-start: var(--wp--preset--spacing--70);
}

.ew-article > .ew-event {
	margin-block-start: var(--wp--preset--spacing--50);
}

.ew-rail {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--60);
}

.ew-rail .ew-toc {
	display: none;
}

@media (min-width: 1024px) {
	.ew-article-layout {
		grid-template-columns: minmax(0, 1fr) var(--wp--custom--rail--width);
	}

	.ew-rail .ew-toc {
		display: block;
	}

	/* Only the last box of the rail sticks, at header height + 50 (DESIGN.md 9.14), so nothing ever covers anything. */
	.ew-rail .ew-ad {
		position: sticky;
		top: calc(var(--wp--custom--header--height-lg) + var(--wp--preset--spacing--50));
	}
}

/* Article header (PAGES.md 7.2, sections 3 to 8) */

.ew-article__header > * {
	margin-block: 0;
}

.ew-article__header > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

.ew-article__header > .ew-deck {
	margin-block-start: var(--wp--preset--spacing--30);
}

.ew-article__header > .ew-article-image {
	margin-block-start: var(--wp--preset--spacing--50);
}

.ew-deck {
	max-width: var(--wp--custom--measure--deck);
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--deck);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
}

.ew-deck p {
	margin: 0;
}

/* Byline row: byline on the left, copy link icon on the right */

.ew-article__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
}

.ew-article__meta > * {
	margin-block: 0;
}

.wp-block-epicwins-copy-link {
	display: flex;
	flex: none;
	flex-direction: row-reverse;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
}

.ew-copy-link__status {
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

/* Byline (DESIGN.md 9.8, 9.11) */

.ew-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--10) var(--wp--custom--meta--gap);
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

.ew-byline__who,
.ew-byline__meta {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
}

.ew-byline__meta {
	gap: var(--wp--custom--meta--gap);
}

.ew-byline__author {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
}

a.ew-byline__author:hover,
a.ew-byline__author:focus-visible {
	text-decoration: underline;
}

/* The copy link button keeps its place while hidden, so nothing moves when its script shows it. */
.ew-copy-link {
	width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
}

.ew-copy-link[hidden] {
	visibility: hidden;
}

/* Featured image and figures (DESIGN.md 8.1, 9.10) */

.ew-article-image {
	margin-inline: 0;
}

.ew-article-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--wp--custom--ratio--wide);
	object-fit: cover;
}

.wp-element-caption {
	margin-block: var(--wp--preset--spacing--20) 0;
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--normal);
	text-align: start;
}

/* Event details box and date block (PAGES.md 6.7, DESIGN.md 9.13) */

.ew-event {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-date-block {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--date-block--size);
	height: var(--wp--custom--date-block--size);
	border-radius: var(--wp--custom--radius--sm);
	background-color: var(--wp--preset--color--surface-strong);
	font-variant-numeric: tabular-nums;
}

.ew-date-block__day {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
	line-height: var(--wp--custom--line-height--tight);
}

.ew-date-block__month {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
}

.ew-event__text {
	flex: 1;
	min-width: min-content;
}

.ew-event__text p {
	margin: 0;
}

.ew-event__dates {
	font-weight: 700;
}

.ew-event__place {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.ew-event__place .ew-icon {
	flex: none;
}

/* Article text (DESIGN.md 9.10) */

.ew-article__body > * + * {
	margin-block-start: var(--wp--custom--paragraph--gap);
}

.ew-article__body > h2 {
	margin-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--30);
	scroll-margin-top: calc(var(--wp--custom--header--height-lg) + var(--wp--preset--spacing--50));
}

.ew-article__body > h3 {
	margin-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--20);
}

.ew-article__body > h2.ew-question {
	margin-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--snug);
}

.ew-article__body > :is(h2, h3) + * {
	margin-block-start: 0;
}

.ew-article__body > :is(h2, h3):first-child {
	margin-block-start: 0;
}

.ew-article__body :is(ul, ol) {
	padding-inline-start: var(--wp--preset--spacing--50);
}

.ew-article__body li + li {
	margin-block-start: var(--wp--preset--spacing--20);
}

.ew-article__body li::marker {
	color: var(--wp--preset--color--ink-subtle);
}

.ew-article__body img {
	max-width: 100%;
	height: auto;
}

.ew-article__body :is(blockquote, .wp-block-pullquote) {
	margin-inline: 0;
}

.ew-article__body blockquote p {
	margin-block: 0;
}

.ew-article__body blockquote p + p {
	margin-block-start: var(--wp--custom--paragraph--gap);
}

.ew-article__body blockquote:not([class]) {
	padding-inline-start: var(--wp--preset--spacing--50);
	border-inline-start: var(--wp--custom--border--marker) solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--ink-muted);
	font-style: italic;
}

.ew-article__body cite {
	display: block;
	margin-block-start: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
	font-style: normal;
	font-weight: 500;
	line-height: var(--wp--custom--line-height--normal);
}

.ew-article__body .wp-block-pullquote {
	padding-block: 0;
	color: var(--wp--preset--color--ink);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	text-align: start;
}

.ew-article__body .wp-block-pullquote blockquote {
	margin: 0;
}

.ew-article__body .wp-block-separator,
.ew-article__body > hr {
	margin-block: var(--wp--preset--spacing--70);
	border: 0;
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-article__body .wp-block-separator + *,
.ew-article__body > hr + * {
	margin-block-start: 0;
}

/* Tables scroll sideways inside themselves, never the page (SEO.md 4.5). */
.ew-article__body .wp-block-table {
	overflow-x: auto;
	margin-inline: 0;
}

.ew-article__body > table {
	display: block;
	overflow-x: auto;
}

.ew-article__body table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--normal);
}

.ew-article__body :is(th, td) {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border: 0;
	text-align: start;
	vertical-align: top;
}

.ew-article__body thead th {
	border-block-end: var(--wp--custom--border--hairline) solid var(--wp--preset--color--ink-subtle);
	font-weight: 600;
}

.ew-article__body tbody tr:nth-child(even) {
	background-color: var(--wp--preset--color--surface);
}

/* Key points and sources boxes (DESIGN.md 9.10, SEO.md 4.1 and 4.4) */

.ew-box {
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-box > * {
	margin-block: 0;
}

.ew-box > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.ew-article__body .ew-box-title {
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--normal);
	letter-spacing: 0;
}

/* Interviewee block (DESIGN.md 9.10) */

.ew-interviewee {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--40);
}

.ew-interviewee > *,
.ew-interviewee__text > * {
	margin-block: 0;
}

.ew-interviewee__portrait {
	flex: none;
	width: var(--wp--custom--avatar--lg);
}

.ew-interviewee__portrait img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.ew-interviewee__name {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--normal);
}

.ew-interviewee__role {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--normal);
}

/* Yoast FAQ and How-to blocks (SEO.md 4.6): styled only */

.schema-faq-section + .schema-faq-section {
	margin-block-start: var(--wp--preset--spacing--50);
	padding-block-start: var(--wp--preset--spacing--50);
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.schema-faq-question,
.schema-how-to-step-name {
	display: block;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--snug);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
}

.schema-faq-answer,
.schema-how-to-step-text {
	margin-block: var(--wp--preset--spacing--20) 0;
}

.schema-how-to-total-time {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ew-article__body .schema-how-to-step + .schema-how-to-step {
	margin-block-start: var(--wp--preset--spacing--50);
}

/* Click-to-play video (PAGES.md 6.10) */

.wp-block-embed {
	margin-inline: 0;
}

/* The player keeps its own 16:9 space, so the spacer WordPress adds for embeds is not needed. */
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper:has(.ew-video)::before,
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper:has(.ew-embed)::before {
	content: none;
}

/* Embeds for social posts: this box holds the place until the post loads, shortly before it scrolls into view. */

.ew-embed {
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-embed.is-loaded {
	padding: 0;
	background-color: transparent;
}

.ew-article__body .ew-embed__preview blockquote {
	margin: 0 0 var(--wp--preset--spacing--40);
	padding: 0;
	border: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--medium);
	font-style: normal;
	overflow-wrap: anywhere;
}

.ew-article__body .ew-embed__preview blockquote > :first-child {
	margin-block-start: 0;
}

.ew-embed__action {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	margin: 0;
}

.ew-embed__frame {
	display: block;
	width: 100%;
	height: var(--wp--custom--embed--frame-height);
	border: 0;
}

.ew-embed.is-loaded iframe,
.ew-embed.is-loaded .twitter-tweet {
	max-width: 100%;
	margin-inline: auto;
}

.ew-video {
	position: relative;
	overflow: hidden;
	aspect-ratio: var(--wp--custom--ratio--video);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface-strong);
}

.ew-video__link,
.ew-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ew-video__link {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ew-article__body .ew-video__link:hover,
.ew-article__body .ew-video__link:focus-visible {
	background-color: transparent;
}

.ew-video__link:focus-visible {
	outline-offset: calc(-1 * var(--wp--custom--focus--width) - var(--wp--custom--focus--offset));
}

.ew-video__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ew-video__play {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--play--size);
	height: var(--wp--custom--play--size);
	border-radius: var(--wp--custom--radius--sm);
	background-color: var(--wp--preset--color--black);
	color: var(--wp--preset--color--on-black);
}

.ew-video__play .ew-icon {
	width: var(--wp--custom--icon--size-compact);
	height: var(--wp--custom--icon--size-compact);
}

/* Ad frame (DESIGN.md 9.15). The image's width and height attributes keep its space reserved. */

.ew-ad {
	box-sizing: border-box;
	width: fit-content;
	max-width: 100%;
	margin-inline: auto;
	padding: var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-article__body > .ew-ad {
	margin-block: var(--wp--preset--spacing--60);
}

.ew-ad__label {
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--normal);
	text-align: center;
}

.ew-ad__link {
	display: block;
}

.ew-article__body .ew-ad__link:hover,
.ew-article__body .ew-ad__link:focus-visible {
	background-color: transparent;
}

.ew-ad__image {
	display: block;
	width: var(--wp--custom--ad--width);
	max-width: 100%;
	height: auto;
}

.ew-ad--has-small .ew-ad__image--large,
.ew-rail .ew-ad:not(.ew-ad--has-small) {
	display: none;
}

/* The rail is 320 px wide: the frame keeps its padding above and below and a slim edge at the sides, so a 300 px ad fits. */
.ew-rail .ew-ad,
.ew-home-top__rail .ew-ad {
	padding-inline: var(--wp--preset--spacing--10);
}

@media (min-width: 1024px) {
	.ew-ad--has-small .ew-ad__image--large,
	.ew-rail .ew-ad:not(.ew-ad--has-small) {
		display: block;
	}

	.ew-ad--has-small .ew-ad__image--small {
		display: none;
	}
}

/* Article footer: tags, contact the editors, author box (PAGES.md 7.2, DESIGN.md 9.16) */

.ew-article__footer > * {
	margin-block: 0;
}

.ew-article__footer > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

.ew-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--small);
}

.ew-tags__title {
	color: var(--wp--preset--color--ink-subtle);
	font-weight: 500;
}

.ew-tags ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--40);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ew-tags a {
	font-weight: 600;
	text-decoration: none;
}

.ew-tags a:hover,
.ew-tags a:focus-visible,
.ew-author-box__name a:hover,
.ew-author-box__name a:focus-visible {
	text-decoration: underline;
}

.ew-contact-editors {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.ew-article__footer > .ew-author-box {
	margin-block-start: var(--wp--preset--spacing--50);
}

.ew-author-box {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--40);
	padding-block-start: var(--wp--preset--spacing--50);
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-author-box__text > * {
	margin-block: 0;
}

.ew-author-box__name {
	font-weight: 700;
}

.ew-author-box__name a {
	text-decoration: none;
}

.ew-author-box__role,
.ew-author-box__bio {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.ew-author-box__text > .ew-author-box__bio {
	margin-block-start: var(--wp--preset--spacing--20);
}

.ew-author-box .ew-social__link {
	color: var(--wp--preset--color--ink-muted);
}

.ew-author-box .ew-social__link:hover,
.ew-author-box .ew-social__link:focus-visible {
	color: var(--wp--preset--color--ink);
}

/* Section header and rail box title (DESIGN.md 9.4) */

.ew-section-header,
.ew-rail-title {
	position: relative;
	margin: 0;
	padding-block-start: var(--wp--preset--spacing--30);
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-section-header::before,
.ew-rail-title::before {
	content: "";
	position: absolute;
	top: calc(-1 * var(--wp--custom--border--hairline));
	left: 0;
	width: var(--wp--custom--crown-tab--width);
	height: var(--wp--custom--crown-tab--height);
	border-end-end-radius: var(--wp--custom--crown-tab--radius);
	background-color: var(--wp--preset--color--crown);
}

.ew-section-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
	margin-block-end: var(--wp--preset--spacing--50);
}

.ew-section-header__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
}

.ew-section-header__link {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.ew-rail-title {
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--snug);
}

/* Rail boxes (DESIGN.md 9.14) */

.ew-most-read ol,
.ew-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ew-most-read ol {
	counter-reset: ew-rank;
	margin-block-start: var(--wp--preset--spacing--20);
}

.ew-most-read li {
	display: grid;
	grid-template-columns: var(--wp--custom--rank--width) minmax(0, 1fr);
	align-items: start;
	padding-block: var(--wp--preset--spacing--40);
	counter-increment: ew-rank;
}

.ew-most-read li + li {
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

/* The first item shows its featured image above the rank and headline. The headline link covers the whole item. */
.ew-most-read li {
	position: relative;
}

.ew-most-read__media {
	grid-column: 1 / -1;
	grid-row: 1;
	overflow: hidden;
	aspect-ratio: var(--wp--custom--ratio--wide);
	margin-block-end: var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--md);
}

.ew-most-read__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ew-most-read__media + a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ew-most-read li::before {
	content: counter(ew-rank);
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: var(--wp--custom--line-height--heading);
}

.ew-most-read a {
	font-weight: 700;
	text-decoration: none;
	text-decoration-thickness: var(--wp--custom--border--rule);
	text-underline-offset: var(--wp--custom--underline--offset-headline);
}

.ew-toc ol {
	margin-block-start: var(--wp--preset--spacing--40);
}

.ew-toc a {
	display: block;
	padding: var(--wp--preset--spacing--10) 0 var(--wp--preset--spacing--10) var(--wp--preset--spacing--40);
	border-inline-start: var(--wp--custom--border--marker) solid transparent;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.ew-toc a:hover,
.ew-toc a:focus-visible {
	color: var(--wp--preset--color--ink);
}

.ew-toc a[aria-current] {
	border-inline-start-color: var(--wp--preset--color--crown);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.ew-rail-list {
	margin: var(--wp--preset--spacing--20) 0 0;
	padding: 0;
	list-style: none;
}

.ew-rail-list > li {
	padding-block: var(--wp--preset--spacing--40);
}

.ew-rail-list > li + li {
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-rail-list > li > * {
	margin-block: 0;
}

.ew-rail-list__headline {
	display: block;
	font-weight: 700;
	text-decoration: none;
	text-decoration-thickness: var(--wp--custom--border--rule);
	text-underline-offset: var(--wp--custom--underline--offset-headline);
}

.ew-rail-list__meta,
.ew-event-row__meta {
	margin: var(--wp--preset--spacing--10) 0 0;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Event row in the rail: small date block (DESIGN.md 9.13) */

.ew-event-row {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--40);
}

.ew-event-row .ew-date-block {
	width: var(--wp--custom--date-block--size-sm);
	height: var(--wp--custom--date-block--size-sm);
	background-color: var(--wp--preset--color--surface);
}

.ew-event-row .ew-date-block__day {
	font-size: var(--wp--preset--font-size--large);
}

.ew-event-row__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--wp--custom--meta--gap);
}

/* Related articles and the Standard card (DESIGN.md 9.5) */

main > .ew-related {
	margin-block-start: var(--wp--preset--spacing--80);
}

.ew-card-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
}

.ew-card {
	position: relative;
}

.ew-card > * {
	margin-block: 0;
}

.ew-card__media {
	overflow: hidden;
	aspect-ratio: var(--wp--custom--ratio--wide);
	border-radius: var(--wp--custom--radius--md);
}

.ew-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ew-card .ew-label {
	margin-block-start: var(--wp--preset--spacing--40);
}

.ew-card__headline {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--wp--custom--clamp--headline);
	line-clamp: var(--wp--custom--clamp--headline);
	margin-block-start: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--snug);
}

.ew-card__headline a {
	text-decoration: none;
	text-decoration-thickness: var(--wp--custom--border--rule);
	text-underline-offset: var(--wp--custom--underline--offset-headline);
}

/* The headline link covers the whole card. */
.ew-card__headline a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ew-card__headline a:focus-visible {
	outline: none;
}

.ew-card__headline a:focus-visible::after {
	border-radius: var(--wp--custom--radius--md);
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--ink);
	outline-offset: var(--wp--custom--focus--offset);
}

.ew-card__meta {
	margin-block-start: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

@media (min-width: 600px) {
	.ew-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ew-card-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Archive pages (PAGES.md 7.7 to 7.13) */

.ew-archive-header > * {
	margin-block: 0;
}

.ew-archive-header__title {
	font-size: var(--wp--preset--font-size--xx-large);
}

.ew-archive-header__intro {
	max-width: var(--wp--custom--measure--deck);
	margin-block-start: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--deck);
}

.ew-archive-header__intro p {
	margin-block: 0;
}

.ew-archive-header__intro p + p {
	margin-block-start: var(--wp--preset--spacing--20);
}

/* Tabs (DESIGN.md 9.12): plain links that scroll sideways when they do not fit */

.ew-tabs {
	overflow-x: auto;
	border-block-end: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
	scrollbar-width: none;
}

.ew-tabs__list {
	display: flex;
	gap: var(--wp--preset--spacing--50);
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
}

.ew-tabs__list > li {
	flex: none;
}

.ew-tabs__tab {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: var(--wp--custom--touch-target);
	border-block-end: var(--wp--custom--border--marker) solid transparent;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.ew-tabs__tab:hover,
.ew-tabs__tab[aria-current],
.ew-tabs__tab[aria-selected="true"] {
	color: var(--wp--preset--color--ink);
}

.ew-tabs__tab[aria-current],
.ew-tabs__tab[aria-selected="true"] {
	border-block-end-color: var(--wp--preset--color--crown);
}

/* The row clips what sticks out, so the focus outline is drawn inside the tab. */
.ew-tabs__tab:focus-visible {
	outline-offset: calc(-1 * var(--wp--custom--focus--width));
}

/* Just above 1024 px the six menu links and the header buttons only fit with tighter spacing. */
@media (min-width: 1024px) and (max-width: 1139px) {
	.ew-header {
		gap: var(--wp--preset--spacing--30);
	}

	.ew-nav__list {
		gap: 0;
	}

	.ew-nav__link {
		padding-inline: var(--wp--preset--spacing--20);
	}
}

/* Main column and rail, as on the article (DESIGN.md 6.3) */

.ew-archive-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--70);
}

.ew-archive-layout > *,
.ew-archive-list > * {
	margin-block: 0;
}

.ew-lead-module + .ew-archive-layout {
	margin-block-start: var(--wp--preset--spacing--70);
}

.ew-archive-list > * + * {
	margin-block-start: var(--wp--preset--spacing--60);
}

/* Below 1024 px the ad sits inside the list; from 1024 px it is in the rail (PAGES.md section 8). */
.ew-archive-layout .ew-rail .ew-ad {
	display: none;
}

.ew-card-grid > .ew-ad {
	grid-column: 1 / -1;
}

.ew-row-list > .ew-ad {
	margin-block: var(--wp--preset--spacing--50);
}

@media (min-width: 1024px) {
	.ew-archive-layout {
		grid-template-columns: minmax(0, 1fr) var(--wp--custom--rail--width);
	}

	.ew-archive-layout .ew-rail .ew-ad {
		display: block;
	}

	.ew-archive-list .ew-ad {
		display: none;
	}

	.ew-archive-list--grid .ew-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ew-archive-list--author .ew-card-grid,
	.ew-archive-list--products .ew-card-grid,
	.ew-home-section--products .ew-card-grid,
	.ew-related--products .ew-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Vertical filter on the product listing (PAGES.md 7.4): a second, quieter row of links under the tabs. */

.ew-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
}

.ew-filter__label {
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

.ew-filter__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ew-filter__chip {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: var(--wp--custom--touch-target);
	padding-inline: var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--sm);
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.ew-filter__chip:hover {
	background-color: var(--wp--preset--color--surface-strong);
	color: var(--wp--preset--color--ink);
}

.ew-filter__chip[aria-current] {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
}

/* Events calendar (PAGES.md 7.18) */

/* Two rows of chips, Vertical and Region. The labels share one column, so both rows start at the same place. */
.ew-filters {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
}

.ew-filters .ew-filter {
	display: grid;
	grid-template-columns: subgrid;
	grid-column: 1 / -1;
	align-items: start;
}

/* The label stays level with the first row of chips when they wrap. */
.ew-filters .ew-filter__label {
	display: flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
}

/* On narrow screens a row of chips scrolls sideways instead of wrapping. */
.ew-filters .ew-filter__list {
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
}

.ew-filters .ew-filter__list > li {
	flex: none;
}

/* The row clips what sticks out, so the focus outline is drawn inside the chip. */
.ew-filters .ew-filter__chip:focus-visible {
	outline-offset: calc(-1 * var(--wp--custom--focus--width));
}

@media (min-width: 782px) {
	.ew-filters .ew-filter__list {
		flex-wrap: wrap;
		overflow-x: visible;
	}
}

.ew-filters + .ew-archive-layout {
	margin-block-start: var(--wp--preset--spacing--60);
}

.ew-events > *,
.ew-events__month > * {
	margin-block: 0;
}

.ew-events__month + .ew-events__month {
	margin-block-start: var(--wp--preset--spacing--70);
}

.ew-events__month-title {
	padding-block-end: var(--wp--preset--spacing--30);
	border-block-end: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
}

.ew-events__list,
.ew-event-tiles {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Event row (DESIGN.md 9.13): date block, name with dates and place, and the website button. */
.ew-event-item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	padding-block: var(--wp--preset--spacing--50);
}

.ew-event-item + .ew-event-item {
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-events .ew-date-block {
	background-color: var(--wp--preset--color--surface);
}

.ew-event-item__text > * {
	margin-block: 0;
}

.ew-event-item__name {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--heading);
}

.ew-event-item__name a {
	text-decoration: none;
}

.ew-event-item__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 var(--wp--custom--meta--gap);
	margin-block-start: var(--wp--preset--spacing--10);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.ew-event-item__meta time {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.ew-event-item__place {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
}

.ew-event-item__place .ew-icon {
	flex: none;
}

/* On phones the button sits under the text, in line with it. */
.ew-event-item__link {
	grid-column: 2;
	justify-self: start;
}

@media (min-width: 600px) {
	.ew-event-item {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}

	.ew-event-item__link {
		grid-column: 3;
	}
}

.ew-pagination {
	display: flex;
	flex-wrap: wrap;
	margin-block-start: var(--wp--preset--spacing--70);
}

/* Homepage events (PAGES.md 7.1): the next four events as tiles. */
.ew-event-tiles {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--40);
}

.ew-event-item--tile {
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-event-item--tile + .ew-event-item--tile {
	border-block-start: 0;
}

.ew-home-events__empty {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--40);
	margin: 0;
	color: var(--wp--preset--color--ink-muted);
}

.ew-home-events__empty a {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

@media (min-width: 600px) {
	.ew-event-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ew-event-tiles {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Product page (PAGES.md 7.3) */

/* Summary strip (PAGES.md 6.5): Company, Product type, Release date. */
.ew-product-summary {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	margin-block: var(--wp--preset--spacing--50);
	padding-block: var(--wp--preset--spacing--40);
	border-block: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-product-summary__item {
	min-width: 0;
}

.ew-product-summary dt {
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

.ew-product-summary dd {
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	overflow-wrap: anywhere;
}

/* Facts box (PAGES.md 6.4): the "Facts" style of the Table block. Label left, value right, thin lines between rows. */
.ew-article__body .wp-block-table.is-style-facts {
	margin-block: 0;
}

.ew-article__body .is-style-facts tbody tr:nth-child(even) {
	background-color: transparent;
}

.ew-article__body .is-style-facts tr + tr {
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-article__body .is-style-facts td {
	padding-inline: 0;
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.ew-article__body .is-style-facts td:first-child {
	width: 40%;
	padding-inline-end: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--ink-muted);
	font-weight: 500;
}

/* On phones the label sits above its value. */
@media (max-width: 599px) {
	.ew-article__body .is-style-facts :is(tr, td) {
		display: block;
	}

	.ew-article__body .is-style-facts td:first-child {
		width: auto;
		padding-block-end: 0;
	}

	.ew-article__body .is-style-facts td + td {
		padding-block-start: 0;
	}

	.ew-product-summary {
		flex-direction: column;
		gap: var(--wp--preset--spacing--30);
	}

	.ew-product-summary__item {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: var(--wp--preset--spacing--40);
	}
}

/* Lead card and lead module (DESIGN.md 9.5, PAGES.md 7.7 section 5) */

.ew-card--lead .ew-card__headline {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--heading);
}

.ew-card__deck {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--wp--custom--clamp--deck);
	line-clamp: var(--wp--custom--clamp--deck);
	margin-block-start: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--medium);
}

.ew-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--wp--custom--meta--gap);
}

.ew-lead-module {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
}

.ew-lead-module__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-content: start;
	column-gap: var(--wp--preset--spacing--50);
}

@media (min-width: 600px) {
	.ew-lead-module__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ew-lead-module {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ew-lead-module__list .ew-list-item:nth-child(-n + 2) {
		padding-block-start: 0;
	}
}

/* List item (DESIGN.md 9.5): text on the left, small picture on the right when there is one */

.ew-list-item {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
	padding-block: var(--wp--preset--spacing--40);
	border-block-end: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-list-item__text {
	flex: 1;
	min-width: 0;
}

.ew-list-item__text > * {
	margin-block: 0;
}

.ew-list-item__headline {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--wp--custom--clamp--headline);
	line-clamp: var(--wp--custom--clamp--headline);
	margin-block-start: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--normal);
	letter-spacing: 0;
}

/* The headline link covers the whole item. */
.ew-list-item__headline a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ew-list-item__headline a:focus-visible {
	outline: none;
}

.ew-list-item__headline a:focus-visible::after {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--ink);
	outline-offset: var(--wp--custom--focus--offset);
}

.ew-list-item__thumb {
	flex: none;
	width: var(--wp--custom--thumb--size-sm);
}

/* The small picture has the 2:1 shape of the featured image and keeps its place whatever the image file is like. */
.ew-list-item__thumb,
article.ew-feed-row .ew-feed-row__thumb {
	overflow: hidden;
	aspect-ratio: var(--wp--custom--ratio--wide);
	border-radius: var(--wp--custom--radius--sm);
}

.ew-list-item__thumb img,
article.ew-feed-row .ew-feed-row__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ew-row-list > :first-child {
	padding-block-start: 0;
}

article.ew-feed-row .ew-feed-row__time {
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
}

@media (min-width: 600px) {
	.ew-list-item__thumb {
		width: var(--wp--custom--thumb--size);
	}

	/* Narrow columns keep the small picture. */
	.ew-lead-module__list .ew-list-item__thumb,
	.ew-featured__list .ew-list-item__thumb,
	.ew-rail .ew-list-item__thumb {
		width: var(--wp--custom--thumb--size-sm);
	}
}

/* Latest in the rail: three newest articles with picture and date */

.ew-rail-latest .ew-row-list > :first-child {
	padding-block-start: var(--wp--preset--spacing--40);
}

.ew-rail-latest .ew-row-list > :last-child {
	padding-block-end: 0;
	border-block-end: 0;
}

.ew-rail-latest .ew-list-item__headline {
	margin-block-start: 0;
}

.ew-rail-latest .ew-card__meta {
	margin-block-start: var(--wp--preset--spacing--20);
}

/* Author profile (PAGES.md 7.11): a box with the photo, who the author is, a few facts and the links */

.ew-author-profile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--40);
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--60);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-author-profile__text {
	min-width: 0;
}

.ew-author-profile__text > * {
	margin-block: 0;
}

.ew-author-profile__name {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
}

.ew-author-profile__role {
	margin-block-start: var(--wp--preset--spacing--10);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
}

.ew-author-profile__text > .ew-author-profile__bio {
	max-width: var(--wp--custom--measure--deck);
	margin-block-start: var(--wp--preset--spacing--30);
}

.ew-author-profile__facts,
.ew-author-profile__links {
	display: flex;
	flex-wrap: wrap;
	padding: 0;
	list-style: none;
}

.ew-author-profile__text > .ew-author-profile__facts {
	gap: var(--wp--preset--spacing--10) var(--wp--preset--spacing--50);
	margin-block-start: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.ew-author-profile__facts li {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
}

.ew-author-profile__facts a {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.ew-author-profile__text > .ew-author-profile__links {
	gap: var(--wp--preset--spacing--20);
	margin-block-start: var(--wp--preset--spacing--50);
}

.ew-author-profile__links .ew-button {
	gap: var(--wp--preset--spacing--20);
}

main > .ew-author-profile__articles,
main > .ew-latest {
	margin-block-start: var(--wp--preset--spacing--80);
}

.ew-author-profile__articles .ew-section-header {
	margin-block-end: 0;
}

@media (min-width: 600px) {
	.ew-author-profile {
		flex-direction: row;
		gap: var(--wp--preset--spacing--50);
	}
}

/* Company pages: About us, Advertise and Contact (PAGES.md 7.15, 7.16) */

.ew-page-wide > * {
	margin-block: 0;
}

.ew-page-wide > * + * {
	margin-block-start: var(--wp--preset--spacing--80);
}

.ew-page-wide > .ew-deck {
	color: var(--wp--preset--color--ink-muted);
}

.ew-page-wide > .ew-deck + * {
	margin-block-start: var(--wp--preset--spacing--60);
}

/* Numbers row: the number is the big line, its label sits under it. */
.ew-stats {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	margin-inline: 0;
}

.ew-stats__item {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	gap: var(--wp--preset--spacing--10);
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-stats dt {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.ew-stats dd {
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	line-height: var(--wp--custom--line-height--title);
	letter-spacing: var(--wp--custom--letter-spacing--tighter);
}

/* About: who we are beside how we work. */
.ew-about {
	display: grid;
	gap: var(--wp--preset--spacing--80);
}

.ew-about__who p {
	max-width: var(--wp--custom--measure--deck);
	margin-block: 0;
}

.ew-about__who p + p {
	margin-block-start: var(--wp--custom--paragraph--gap);
}

.ew-about__how .ew-section-header {
	margin-block-end: var(--wp--preset--spacing--20);
}

/* A list that opens one point at a time. Works without JavaScript: these are plain details elements. */
.ew-accordion__item + .ew-accordion__item {
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-accordion__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
	min-height: var(--wp--custom--touch-target);
	padding-block: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	list-style: none;
	cursor: pointer;
}

.ew-accordion__title::-webkit-details-marker {
	display: none;
}

.ew-accordion__title .ew-icon {
	flex: none;
	color: var(--wp--preset--color--ink-muted);
}

.ew-accordion__item:not([open]) .ew-accordion__minus,
.ew-accordion__item[open] .ew-accordion__plus {
	display: none;
}

.ew-accordion__title:hover .ew-icon {
	color: var(--wp--preset--color--ink);
}

.ew-accordion__text {
	max-width: var(--wp--custom--measure--deck);
	padding-block-end: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--ink-muted);
}

.ew-accordion__text p {
	margin-block: 0;
}

.ew-accordion__text p + p {
	margin-block-start: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* What we cover: the three verticals as cards, then topics and regions as chips, each group in its own box. */
.ew-coverage__verticals,
.ew-coverage__groups {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ew-coverage__groups {
	margin-block-start: var(--wp--preset--spacing--40);
}

.ew-coverage .ew-topic__title {
	font-size: var(--wp--preset--font-size--x-large);
}

.ew-coverage__group {
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-coverage__label {
	margin: 0 0 var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
}

/* In a box the chips sit on the page colour and are a size larger. */
.ew-coverage__chip {
	padding-inline: var(--wp--preset--spacing--50);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--medium);
}

.ew-coverage__chip:hover {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
}

.ew-coverage__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Team: photo, name and role. The name link covers the whole card. */
.ew-team__list {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ew-team__member {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--50);
	min-width: 0;
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
	transition: background-color var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
}

.ew-team__member:hover {
	background-color: var(--wp--preset--color--surface-strong);
}

.ew-team__text {
	min-width: 0;
}

.ew-team__text > * {
	margin-block: 0;
}

.ew-team__name {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
	overflow-wrap: anywhere;
}

.ew-team__name a::after,
.ew-topic__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ew-team__name a:focus-visible,
.ew-topic__title a:focus-visible {
	outline: 0;
}

.ew-team__name a:focus-visible::after,
.ew-topic__title a:focus-visible::after {
	border-radius: var(--wp--custom--radius--md);
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--ink);
	outline-offset: var(--wp--custom--focus--offset);
}

.ew-team__role {
	margin-block-start: var(--wp--preset--spacing--10);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ew-team__text > .ew-team__bio {
	margin-block-start: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--line-height--relaxed);
}

/* Contact options. As a panel: a box with the title and the buttons on one side and the profiles on the other. */
.ew-contact > * {
	margin-block: 0;
}

.ew-contact--panel {
	display: grid;
	gap: var(--wp--preset--spacing--60);
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-contact__lead > * {
	margin-block: 0;
}

.ew-contact__title {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 900;
	line-height: var(--wp--custom--line-height--title);
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
}

.ew-contact__line {
	max-width: var(--wp--custom--measure--deck);
	margin-block-start: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--medium);
}

.ew-contact__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30);
	margin-block-start: var(--wp--preset--spacing--50);
}

.ew-contact__actions .ew-button {
	gap: var(--wp--preset--spacing--20);
	max-width: 100%;
}

.ew-contact__button {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--sm);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--button);
}

/* On the Contact page the address itself is the headline. */
.ew-contact__hint {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ew-contact__address {
	margin-block-start: var(--wp--preset--spacing--10);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	line-height: var(--wp--custom--line-height--title);
	letter-spacing: var(--wp--custom--letter-spacing--tighter);
	overflow-wrap: anywhere;
}

.ew-contact--page > * + * {
	margin-block-start: var(--wp--preset--spacing--60);
}

.ew-contact--page > .ew-section-header {
	margin-block: var(--wp--preset--spacing--80) var(--wp--preset--spacing--50);
}

.ew-contact--page > .ew-section-header + * {
	margin-block-start: 0;
}

/* One card per reason to write. The title link covers the whole card and opens an email with its subject. */
.ew-contact__topics,
.ew-contact__channels {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	padding: 0;
	list-style: none;
}

.ew-topic {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
	transition: background-color var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
}

.ew-topic:hover,
.ew-contact--page .ew-channel:hover {
	background-color: var(--wp--preset--color--surface-strong);
}

.ew-topic > * {
	margin-block: 0;
}

.ew-topic__title {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
}

.ew-topic__text {
	flex: 1;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.ew-topic > .ew-icon {
	margin-block-start: var(--wp--preset--spacing--30);
}

/* A social profile: icon, name and account, and an arrow that moves on hover. */
.ew-channel {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--40);
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--base);
	text-decoration: none;
	transition-property: background-color;
	transition-duration: var(--wp--custom--duration--base);
}

.ew-contact--page .ew-channel {
	background-color: var(--wp--preset--color--surface);
}

.ew-channel__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
	border-radius: var(--wp--custom--radius--circle);
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
}

.ew-channel__text {
	display: grid;
	flex: 1;
	min-width: 0;
}

.ew-channel__name {
	font-weight: 700;
}

.ew-channel__handle {
	overflow: hidden;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ew-channel > .ew-icon,
.ew-topic > .ew-icon {
	flex: none;
	color: var(--wp--preset--color--ink-muted);
	transition: transform var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
}

.ew-channel:hover > .ew-icon,
.ew-topic:hover > .ew-icon {
	color: var(--wp--preset--color--ink);
	transform: translateX(var(--wp--preset--spacing--10));
}

/* Advertise: the media pack. One format: what it is and its facts, then a live example from the site. */
.ew-pack {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
}

.ew-pack > *,
.ew-pack__text > *,
.ew-pack__text--cols > div > *,
.ew-pack__example > * {
	margin-block: 0;
}

.ew-pack__text .ew-section-header {
	margin-block-end: var(--wp--preset--spacing--40);
}

.ew-pack__text p {
	max-width: var(--wp--custom--measure--deck);
	color: var(--wp--preset--color--ink-muted);
}

.ew-pack__text p + p {
	margin-block-start: var(--wp--preset--spacing--30);
}

.ew-pack__text p.ew-pack__lead {
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--snug);
	letter-spacing: var(--wp--custom--letter-spacing--tight);
}

.ew-pack__text--cols {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

.ew-pack__specs {
	display: grid;
	align-content: start;
	margin: var(--wp--preset--spacing--50) 0 0;
	font-size: var(--wp--preset--font-size--small);
}

.ew-pack__text--cols > .ew-pack__specs {
	margin-block-start: 0;
}

.ew-pack__specs > div {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: var(--wp--preset--spacing--30);
	padding-block: var(--wp--preset--spacing--20);
}

.ew-pack__specs > div + div {
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-pack__specs dt {
	color: var(--wp--preset--color--ink-muted);
	font-weight: 600;
}

.ew-pack__specs dd {
	margin: 0;
}

/* An example with nothing to show (no live story, no article yet) takes no room. */
.ew-pack__example:not(:has(*)) {
	display: none;
}

.ew-pack__example--box {
	align-self: start;
	min-width: 0;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

/* The story rounds are small here: the box is narrow, and the round is the thing being shown. */
.ew-pack__example .ew-stories {
	--ew-stories-gaps: 3;
	--ew-stories-per-view: var(--wp--custom--story--per-view);
	padding-block: var(--wp--preset--spacing--20);
}

.ew-pack__example .ew-story__ring {
	background-color: var(--wp--preset--color--surface);
}

/* The same stories as tall pictures: they fill the box, with no title above and no band behind. */
.ew-pack__example .ew-story-cards {
	--ew-cards-gaps: 2;
	--ew-cards-per-view: var(--wp--custom--story--cards-per-view);
	box-sizing: border-box;
	max-width: none;
	padding-inline: 0;
}

.ew-formats table {
	min-width: max-content;
}

.ew-formats tbody th {
	font-weight: 600;
}

/* Cells that hold words keep normal figures: fixed-width ones push commas and colons apart. */
.ew-formats td:last-child {
	font-variant-numeric: normal;
}

/* One card per vertical with its newest headlines. */
.ew-showcase {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

.ew-showcase__card {
	display: flex;
	flex-direction: column;
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-showcase__card > *,
.ew-showcase__list li > * {
	margin-block: 0;
}

.ew-showcase__name {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
}

.ew-showcase__hint {
	margin-block-start: var(--wp--preset--spacing--10);
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

.ew-showcase__list {
	flex: 1;
	margin-block-start: var(--wp--preset--spacing--30);
	padding: 0;
	list-style: none;
}

.ew-showcase__list li {
	position: relative;
	padding-block: var(--wp--preset--spacing--30);
}

.ew-showcase__list li + li {
	border-block-start: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}

.ew-showcase__list .ew-card__meta {
	margin-block-start: var(--wp--preset--spacing--10);
}

.ew-showcase__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--50);
	margin-block-start: var(--wp--preset--spacing--40);
}

@media (min-width: 600px) {
	.ew-pack__example .ew-stories {
		--ew-stories-gaps: 5;
		--ew-stories-per-view: var(--wp--custom--story--per-view-md);
	}

	.ew-pack__example .ew-story-cards {
		--ew-cards-gaps: 3;
		--ew-cards-per-view: var(--wp--custom--story--cards-per-view-md);
	}

	.ew-stats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ew-contact__topics,
	.ew-showcase {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ew-coverage__verticals {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ew-contact--page .ew-contact__channels {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ew-contact--panel {
		padding: var(--wp--preset--spacing--60);
	}
}

@media (min-width: 1024px) {
	.ew-about,
	.ew-contact--panel,
	.ew-pack--split,
	.ew-pack__text--cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--wp--preset--spacing--80);
	}

	.ew-contact--panel {
		align-items: center;
	}

	/* The facts end on the same line as the text beside them. */
	.ew-pack__text--cols {
		align-items: end;
	}

	.ew-contact__topics {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.ew-team__list,
	.ew-coverage__groups {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Stories: the text on the left, the rounds and under them the tall pictures on the right.
	   On narrower screens the order is rounds, text, tall pictures (owner decision, step 10). */
	.ew-pack--split {
		grid-template-areas: "text rounds" "text cards";
		grid-template-rows: auto 1fr;
		align-items: start;
		row-gap: var(--wp--preset--spacing--40);
	}

	.ew-pack--split > .ew-pack__text {
		grid-area: text;
	}

	.ew-pack--split > .ew-pack__rounds {
		grid-area: rounds;
	}

	.ew-pack--split > .ew-pack__cards {
		grid-area: cards;
	}

}

/* Policy pages (PAGES.md 7.17): text in the reading column, table of contents beside it from 1024 px. */

.ew-legal .ew-article {
	max-width: var(--wp--style--global--content-size);
}

.ew-updated {
	color: var(--wp--preset--color--ink-subtle);
	font-size: var(--wp--preset--font-size--x-small);
}

.ew-legal .ew-rail {
	display: none;
}

@media (min-width: 1024px) {
	.ew-legal .ew-rail {
		display: flex;
	}

	.ew-legal .ew-toc {
		position: sticky;
		top: calc(var(--wp--custom--header--height-lg) + var(--wp--preset--spacing--50));
	}
}

/* Search page and empty states (PAGES.md 7.12 and 7.13, DESIGN.md 9.18 and 9.19) */

.ew-search-form {
	max-width: var(--wp--custom--search--width);
}

.ew-search-main > *,
.ew-search-header > * {
	margin-block: 0;
}

.ew-search-main > * + * {
	margin-block-start: var(--wp--preset--spacing--50);
}

.ew-search-header__count {
	margin-block-start: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
}

.ew-empty-state {
	text-align: center;
}

.ew-empty-state > * {
	margin-block: 0;
}

.ew-empty-state__title {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
}

.ew-empty-state__line,
.ew-archive-empty {
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--medium);
}

.ew-empty-state__line {
	margin-block-start: var(--wp--preset--spacing--20);
}

.ew-empty-state .ew-search-form {
	margin: var(--wp--preset--spacing--50) auto 0;
	text-align: start;
}

.ew-empty-state > .ew-button {
	margin-block-start: var(--wp--preset--spacing--40);
}

.ew-empty-state__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--50);
	margin-block-start: var(--wp--preset--spacing--40);
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ew-empty-state__links a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
}

/* Latest on the 404 page: five cards in one row from 1024 px */

@media (min-width: 1024px) {
	.ew-latest .ew-card-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.ew-latest .ew-card__headline {
		font-size: var(--wp--preset--font-size--medium);
		line-height: var(--wp--custom--line-height--normal);
	}
}

/* Consent banner (PAGES.md 6.11): overlays the page, so nothing shifts */

.wp-site-blocks > header > * {
	margin-block: 0;
}

.ew-consent {
	position: fixed;
	inset: auto var(--wp--custom--gutter) var(--wp--custom--gutter);
	z-index: var(--wp--custom--layer--consent);
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--overlay);
	color: var(--wp--preset--color--ink);
}

.ew-consent[hidden] {
	display: none;
}

.ew-consent__text {
	margin: 0 0 var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--small);
}

.ew-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30);
}

@media (min-width: 1024px) {
	.ew-consent {
		right: auto;
		width: 100%;
		max-width: var(--wp--style--global--content-size);
	}
}

/* Stories (PAGES.md 6.1): the row of rounds */

.ew-stories {
	--ew-stories-inset: calc(var(--wp--custom--focus--width) + var(--wp--custom--focus--offset));
	--ew-stories-gaps: 3;
	--ew-stories-per-view: var(--wp--custom--story--per-view);
	--ew-story-size: calc((100cqw - var(--ew-stories-gaps) * var(--wp--preset--spacing--40)) / var(--ew-stories-per-view));
	position: relative;
	container-type: inline-size;
	padding-block: var(--wp--preset--spacing--50);
}

/* The inset keeps the focus outline of a round from being cut by the scrolling list. */
.ew-stories__list {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	margin: calc(-1 * var(--ew-stories-inset));
	padding: var(--ew-stories-inset);
	overflow-x: auto;
	list-style: none;
	scrollbar-width: none;
}

/* The last round is always cut, so it is clear the row scrolls: phones show three rounds and part
   of the fourth, tablets five and a half, desktop eight and a half. */
.ew-stories__item {
	flex: none;
	width: var(--ew-story-size);
}

/* Narrower than 360 px: two rounds and part of the third. */
@media (max-width: 359px) {
	.ew-stories {
		--ew-stories-gaps: 2;
		--ew-stories-per-view: var(--wp--custom--story--per-view-sm);
	}
}

.ew-story {
	display: block;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.ew-story__ring {
	display: block;
	padding: var(--wp--custom--border--marker);
	border: var(--wp--custom--border--marker) solid var(--wp--preset--color--crown);
	border-radius: var(--wp--custom--radius--circle);
	background-color: var(--wp--preset--color--base);
}

.ew-story__round {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	border-radius: var(--wp--custom--radius--circle);
	object-fit: cover;
	background-color: var(--wp--preset--color--surface-strong);
}

.ew-story__title {
	display: block;
	margin-block-start: var(--wp--preset--spacing--20);
	overflow: hidden;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	line-height: var(--wp--custom--line-height--snug);
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ew-stories__arrow {
	display: none;
	position: absolute;
	top: calc(var(--wp--preset--spacing--50) + var(--ew-story-size) / 2);
	z-index: var(--wp--custom--layer--raised);
	margin-block-start: calc(var(--wp--custom--control--size) / -2);
	background-color: var(--wp--preset--color--base);
}

.ew-stories__arrow--prev {
	left: 0;
}

.ew-stories__arrow--next {
	right: 0;
}

.ew-stories__arrow:disabled {
	visibility: hidden;
}

@media (min-width: 600px) {
	.ew-stories {
		--ew-stories-gaps: 5;
		--ew-stories-per-view: var(--wp--custom--story--per-view-md);
	}
}

@media (min-width: 1024px) {
	.ew-stories {
		--ew-stories-gaps: 8;
		--ew-stories-per-view: var(--wp--custom--story--per-view-lg);
	}

	.ew-stories__arrow:not([hidden]) {
		display: inline-flex;
	}
}

/* Stories: the viewer. Full screen on phones, a 9:16 frame on a black screen from 600 px. */

html:has(.ew-story-viewer[open]) {
	overflow: hidden;
}

.ew-story-viewer {
	--ew-story-bar: calc(var(--wp--custom--touch-target) + 2 * var(--wp--preset--spacing--20));
	--ew-story-action: 0px;
	box-sizing: border-box;
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background-color: var(--wp--preset--color--black);
	color: var(--wp--preset--color--on-black);
}

.ew-story-viewer[open] {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--50);
}

.ew-story-viewer::backdrop {
	background-color: var(--wp--preset--color--black);
}

.ew-story-viewer.has-link {
	--ew-story-action: var(--ew-story-bar);
}

.ew-story-viewer :focus-visible {
	outline-color: var(--wp--preset--color--on-black);
}

.ew-story-viewer .ew-icon-button {
	border-color: var(--wp--preset--color--black-line);
	color: var(--wp--preset--color--on-black);
}

.ew-story-viewer .ew-icon-button:hover {
	background-color: var(--wp--preset--color--black-line);
}

.ew-story-viewer__frame {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.ew-story-viewer__bar,
.ew-story-viewer__action {
	display: flex;
	flex: none;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	box-sizing: border-box;
	height: var(--ew-story-bar);
	margin: 0;
	padding-inline: var(--wp--preset--spacing--40);
}

.ew-story-viewer__action[hidden] {
	display: none;
}

.ew-story-viewer__round {
	flex: none;
	width: var(--wp--custom--avatar--sm);
	height: var(--wp--custom--avatar--sm);
	border-radius: var(--wp--custom--radius--circle);
	object-fit: cover;
}

.ew-story-viewer__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	margin: 0;
}

.ew-story-viewer__title,
.ew-story-viewer__sponsor {
	overflow: hidden;
	line-height: var(--wp--custom--line-height--snug);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ew-story-viewer__title {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ew-story-viewer__sponsor {
	color: var(--wp--preset--color--on-black-muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.ew-story-viewer__close {
	width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
}

.ew-story-viewer__media {
	position: relative;
	flex: 1;
	min-height: 0;
	container-type: size;
}

.ew-story-viewer__slot {
	position: absolute;
	inset: 0;
}

.ew-story-viewer__slot > img,
.ew-story-viewer__slot > video,
.ew-story-viewer__slot > iframe,
.ew-story-viewer__play > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: contain;
	object-position: top;
}

/* A phone screen is rarely exactly 9:16. The media starts right under the title bar at the largest
   size that fits, so any spare room falls at the bottom, next to the button, never above the picture. */
.ew-story-viewer__slot > iframe {
	inset: 0 auto auto 50%;
	width: min(100cqw, 100cqh * (var(--wp--custom--ratio--story)));
	height: min(100cqh, 100cqw / (var(--wp--custom--ratio--story)));
	translate: -50% 0;
}

.ew-story-viewer__play {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background-color: transparent;
	cursor: pointer;
}

.ew-story-viewer__play:focus-visible {
	outline-offset: calc(-1 * var(--wp--custom--focus--width) - var(--wp--custom--focus--offset));
}

.ew-story-viewer__play .ew-video__play {
	border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--black-line);
}

/* Tap the left or right half to move. */
.ew-story-viewer__zone {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50%;
	padding: 0;
	border: 0;
	background-color: transparent;
	cursor: pointer;
}

.ew-story-viewer__zone--prev {
	left: 0;
}

.ew-story-viewer__zone--next {
	right: 0;
}

/* A video that waits for its play button keeps the middle free for it. */
.ew-story-viewer.is-waiting .ew-story-viewer__zone {
	width: calc(100% / 3);
}

/* Phones: the arrows sit on the left and right edges, over the media. */
.ew-story-viewer__nav {
	position: absolute;
	top: 50%;
	z-index: var(--wp--custom--layer--raised);
	width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
	margin-block-start: calc(var(--wp--custom--touch-target) / -2);
	background-color: var(--wp--preset--color--black);
}

.ew-story-viewer__nav:first-child {
	left: var(--wp--preset--spacing--20);
}

.ew-story-viewer__nav:last-child {
	right: var(--wp--preset--spacing--20);
}

.ew-story-viewer__nav:disabled {
	visibility: hidden;
}

.ew-story-viewer__link {
	width: 100%;
}

@media (min-width: 600px) {
	.ew-story-viewer {
		--ew-story-chrome: calc(var(--ew-story-bar) + var(--ew-story-action));
		--ew-story-side: calc(2 * (var(--wp--custom--control--size) + 2 * var(--wp--preset--spacing--50)));
		--ew-story-height: min(var(--wp--custom--story--frame-height), calc((100vw - var(--ew-story-side)) / (var(--wp--custom--ratio--story)) + var(--ew-story-chrome)));
	}

	.ew-story-viewer__frame {
		flex: none;
		width: calc((var(--ew-story-height) - var(--ew-story-chrome)) * (var(--wp--custom--ratio--story)));
		height: var(--ew-story-height);
	}

	.ew-story-viewer__bar,
	.ew-story-viewer__action {
		padding-inline: 0;
	}

	.ew-story-viewer__slot > img,
	.ew-story-viewer__slot > video,
	.ew-story-viewer__slot > iframe,
	.ew-story-viewer__play > img {
		border-radius: var(--wp--custom--radius--md);
	}

	.ew-story-viewer__slot > img,
	.ew-story-viewer__play > img {
		object-fit: cover;
	}

	.ew-story-viewer__slot > iframe {
		inset: 0;
		width: 100%;
		height: 100%;
		translate: none;
	}

	.ew-story-viewer__nav {
		position: static;
		width: var(--wp--custom--control--size);
		height: var(--wp--custom--control--size);
		margin-block-start: 0;
	}

	.ew-story-viewer__zone {
		display: none;
	}
}

/* Homepage (PAGES.md 7.1). Modules are 80 apart; the stories row brings its own space. */

.ew-home > * {
	margin-block: 0;
}

.ew-home > * + * {
	margin-block-start: var(--wp--preset--spacing--80);
}

.ew-home > .ew-stories + * {
	margin-block-start: var(--wp--preset--spacing--20);
}

/* Section names, rail titles and archive titles are in capitals, large and at the heaviest weight, on every
   page (owner feedback, step 7). */
.ew-section-header__title,
.ew-rail-title,
.ew-archive-header__title {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 900;
	line-height: var(--wp--custom--line-height--heading);
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
}

.ew-archive-header__title {
	font-size: var(--wp--preset--font-size--xx-large);
}

/* Headlines in cards and lists have one size on every page, homepage and archives alike (owner feedback,
   step 7): hierarchy comes from weight and position, not from size. */
main .ew-card__headline {
	font-size: var(--wp--preset--font-size--medium);
	line-height: var(--wp--custom--line-height--normal);
	letter-spacing: 0;
}

main .ew-card--lead .ew-card__headline {
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--snug);
}

main .ew-card__deck {
	font-size: var(--wp--preset--font-size--small);
}

main :is(.ew-list-item__headline, .ew-feed-row__headline) {
	font-size: var(--wp--preset--font-size--small);
}

/* Top story module: main column and, from 1024 px, the rail with Latest and the ad (DESIGN.md 6.3) */

.ew-home-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--70);
}

.ew-home-top__main > *,
.ew-home-top__rail > * {
	margin-block: 0;
}

/* The top story shows its whole headline: at this size four lines would cut most headlines on a phone. */
.ew-card--top .ew-card__headline {
	display: block;
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	line-height: var(--wp--custom--line-height--title);
	letter-spacing: var(--wp--custom--letter-spacing--tighter);
}

.ew-card--top .ew-card__deck {
	-webkit-line-clamp: var(--wp--custom--clamp--short);
	line-clamp: var(--wp--custom--clamp--short);
	margin-block-start: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--line-height--deck);
}

.ew-card__credit {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.ew-home-top__pair {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	margin-block-start: var(--wp--preset--spacing--60);
}

.ew-home-top__rail {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--60);
}

.ew-home-latest {
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-home-latest .ew-rail-title {
	border-block-start: 0;
}

.ew-home-latest .ew-rail-title::before {
	top: 0;
}

.ew-home-latest .ew-row-list > :first-child {
	padding-block-start: var(--wp--preset--spacing--40);
}

/* Time and label share a line and the headline runs the full width, so ten rows stay compact in the rail. */
.ew-home-latest .ew-feed-row {
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: var(--wp--custom--meta--gap);
	row-gap: var(--wp--preset--spacing--10);
	padding-block: var(--wp--preset--spacing--30);
}

.ew-home-latest .ew-feed-row__text {
	display: contents;
}

.ew-home-latest .ew-feed-row__headline {
	grid-column: 1 / -1;
	margin-block-start: 0;
}

/* Phones and tablets show five rows, the rail shows ten. */
.ew-home-latest .ew-feed-row:nth-child(n + 6) {
	display: none;
}

.ew-home-more {
	display: flex;
	margin: var(--wp--preset--spacing--40) 0 0;
}

@media (min-width: 600px) {
	.ew-home-top__pair {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ew-home-top {
		grid-template-columns: minmax(0, 1fr) var(--wp--custom--rail--width);
	}

	.ew-home-latest .ew-feed-row:nth-child(n + 6) {
		display: grid;
	}
}

/* Vertical tabs: the tabs sit on the title line as quiet chips. Every panel is in the page and the
   script shows one at a time. */

.ew-tabbed .ew-tabs {
	min-width: 0;
	max-width: 100%;
	border-block-end: 0;
}

.ew-tabbed .ew-tabs__list {
	gap: var(--wp--preset--spacing--10);
}

.ew-tabbed .ew-tabs__tab {
	min-height: var(--wp--custom--touch-target);
	padding-inline: var(--wp--preset--spacing--40);
	border-block-end: 0;
	border-radius: var(--wp--custom--radius--sm);
}

.ew-tabbed .ew-tabs__tab:hover {
	background-color: var(--wp--preset--color--surface-strong);
}

.ew-tabbed .ew-tabs__tab[aria-current],
.ew-tabbed .ew-tabs__tab[aria-selected="true"] {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
}

.ew-vtabs__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
}

/* The list is one column: picture on the left, text beside it. */
.ew-vtabs__list .ew-list-item {
	flex-direction: row-reverse;
	justify-content: flex-end;
}

.ew-vtabs__list > :last-child {
	padding-block-end: 0;
	border-block-end: 0;
}

.ew-tabbed__name {
	display: none;
	margin: 0 0 var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}

.ew-tabbed .ew-home-more {
	justify-content: flex-end;
}

@media (min-width: 1024px) {
	.ew-vtabs__grid {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		gap: var(--wp--preset--spacing--60);
	}
}

/* Without JavaScript the panels show one under the other, each under its name. */
@media (scripting: none) {
	.ew-tabbed .ew-tabs {
		display: none;
	}

	.ew-tabbed__name,
	.ew-tabbed__panel[hidden] {
		display: block;
	}

	.ew-tabbed__panel + .ew-tabbed__panel {
		margin-block-start: var(--wp--preset--spacing--70);
	}
}

/* Featured: a box with the lead and three articles beside it */

.ew-featured {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

@media (min-width: 1024px) {
	.ew-featured {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		gap: var(--wp--preset--spacing--60);
	}
}

/* "Don't miss": the stories as tall cards on a tinted band across the page. The row scrolls sideways
   and the last card is always cut, so it is clear there is more. */

.ew-dont-miss {
	padding-block: var(--wp--preset--spacing--70);
	background-color: var(--wp--preset--color--surface);
}

.ew-story-cards {
	--ew-stories-inset: calc(var(--wp--custom--focus--width) + var(--wp--custom--focus--offset));
	--ew-cards-gaps: 2;
	--ew-cards-per-view: var(--wp--custom--story--cards-per-view);
	--ew-card-size: calc((100cqw - var(--ew-cards-gaps) * var(--wp--preset--spacing--40)) / var(--ew-cards-per-view));
	container-type: inline-size;
	box-sizing: content-box;
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding-inline: var(--wp--custom--gutter);
}

.ew-story-cards__frame {
	position: relative;
}

.ew-story-cards__list {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	margin: calc(-1 * var(--ew-stories-inset));
	padding: var(--ew-stories-inset);
	overflow-x: auto;
	list-style: none;
	scrollbar-width: none;
}

.ew-story-cards__item {
	flex: none;
	width: var(--ew-card-size);
}

.ew-story-card {
	display: block;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.ew-story-card__picture {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--wp--custom--ratio--story);
	border-radius: var(--wp--custom--radius--md);
	outline: var(--wp--custom--border--marker) solid transparent;
	outline-offset: calc(-1 * var(--wp--custom--border--marker));
	object-fit: cover;
	background-color: var(--wp--preset--color--surface-strong);
	transition: outline-color var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
}

.ew-story-card__title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--wp--custom--clamp--short);
	line-clamp: var(--wp--custom--clamp--short);
	margin-block-start: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--snug);
	transition: color var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
}

/* Hover: a crown ring on the picture, as on the rounds. */
.ew-story-card:hover .ew-story-card__picture {
	outline-color: var(--wp--preset--color--crown);
}

/* The arrows sit at half the height of the pictures. */
.ew-story-cards .ew-stories__arrow {
	top: calc(var(--ew-card-size) / (var(--wp--custom--ratio--story)) / 2);
}

@media (min-width: 600px) {
	.ew-story-cards {
		--ew-cards-gaps: 3;
		--ew-cards-per-view: var(--wp--custom--story--cards-per-view-md);
	}
}

@media (min-width: 1024px) {
	.ew-story-cards {
		--ew-cards-gaps: 5;
		--ew-cards-per-view: var(--wp--custom--story--cards-per-view-lg);
	}
}

/* Press releases: small tiles, no ruled rows */

.ew-pr-wire {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--40);
}

.ew-pr-tile {
	position: relative;
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
	transition: background-color var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
}

.ew-pr-tile:hover {
	background-color: var(--wp--preset--color--surface-strong);
}

.ew-pr-tile > * {
	margin-block: 0;
}

.ew-pr-tile .ew-label {
	color: var(--wp--preset--color--ink-muted);
}

.ew-pr-tile .ew-list-item__headline {
	margin-block-start: var(--wp--preset--spacing--20);
}

.ew-pr-tile .ew-card__meta {
	margin-block-start: var(--wp--preset--spacing--30);
}

@media (min-width: 600px) {
	.ew-pr-wire {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ew-pr-wire {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Desktop: the two columns of a module end on the same line. Pictures keep their 2:1 shape, nothing is
   cropped: the rows of the shorter list grow to share the height of the large card (owner feedback, step 7). */
@media (min-width: 1024px) {
	.ew-home-top__rail .ew-home-latest {
		display: flex;
		flex: 1;
		flex-direction: column;
	}

	.ew-home-latest .ew-row-list,
	.ew-vtabs__list,
	.ew-featured__list {
		display: flex;
		flex: 1;
		flex-direction: column;
	}

	.ew-home-latest .ew-row-list > *,
	.ew-vtabs__list > *,
	.ew-featured__list > * {
		flex: 1;
	}

	.ew-vtabs__list > .ew-list-item {
		align-items: center;
	}

	/* The list column is narrow up to 1280 px: no small pictures there, so its rows stay shorter than the lead. */
	.ew-vtabs__list .ew-list-item__thumb {
		display: none;
	}
}

@media (min-width: 1280px) {
	.ew-vtabs__list .ew-list-item__thumb {
		display: block;
	}
}

/* Featured is the one highlighted module of the page: a box in the crown colour (owner feedback, step 7). */

.ew-featured {
	background-color: var(--wp--preset--color--crown);
	color: var(--wp--preset--color--on-crown);
}

.ew-featured :is(.ew-label, .ew-card__meta, .ew-card__deck, a) {
	color: var(--wp--preset--color--on-crown);
}

/* On the crown colour the hover underline is thin and a darker crown tone, not black. */
.ew-featured :is(.ew-card__headline, .ew-list-item__headline) a {
	text-decoration-thickness: var(--wp--custom--border--hairline);
}

.ew-featured :is(.ew-card__headline, .ew-list-item__headline) a:hover {
	text-decoration-color: color-mix(in srgb, var(--wp--preset--color--on-crown) var(--wp--custom--dropdown--scrim), var(--wp--preset--color--crown));
}

/* The three articles beside the lead are tiles in a deeper crown tone, picture on the left, no lines. */
.ew-featured__list {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
}

.ew-featured__list > .ew-list-item,
.ew-featured__list > .ew-list-item:first-child {
	flex-direction: row-reverse;
	align-items: center;
	justify-content: flex-end;
	padding: var(--wp--preset--spacing--40);
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--crown-strong);
	transition: background-color var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
}

.ew-featured :focus-visible,
.ew-featured a:focus-visible::after {
	outline-color: var(--wp--preset--color--on-crown);
}

.ew-featured .ew-placeholder {
	background-color: var(--wp--preset--color--crown-strong);
}

/* Questions and answers: every answer is open, two tiles per row from 782 px */

.ew-home-faq .schema-faq {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--40);
}

.ew-home-faq .schema-faq-section,
.ew-home-faq .schema-faq-section + .schema-faq-section {
	margin: 0;
	padding: var(--wp--preset--spacing--50);
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--surface);
}

.ew-home-faq .schema-faq-question {
	font-size: var(--wp--preset--font-size--medium);
	line-height: var(--wp--custom--line-height--normal);
	letter-spacing: 0;
}

.ew-home-faq .schema-faq-answer {
	margin-block: var(--wp--preset--spacing--20) 0;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--small);
}

@media (min-width: 782px) {
	.ew-home-faq .schema-faq {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Regulatory: one large card and four small ones per region */

.ew-regulatory__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.ew-regulatory__grid > .ew-card--lead {
	grid-column: 1 / -1;
}

/* Eight region tabs need a line of their own under the title. */
.ew-regulatory .ew-tabs {
	flex-basis: 100%;
}

.ew-regulatory .ew-home-more {
	justify-content: flex-end;
	margin-block-start: var(--wp--preset--spacing--50);
}

@media (min-width: 1024px) {
	.ew-regulatory__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	}

	/* The large card is a row across the module: the picture at its full 2:1 shape on the left, the
	   text beside it, centred on the picture's height. */
	.ew-regulatory__grid > .ew-card--lead {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: 1fr auto auto auto auto 1fr;
		column-gap: var(--wp--preset--spacing--50);
	}

	.ew-regulatory__grid > .ew-card--lead > * {
		grid-column: 2;
	}

	.ew-regulatory__grid > .ew-card--lead > .ew-card__media {
		grid-column: 1;
		grid-row: 1 / -1;
	}

	.ew-regulatory__grid > .ew-card--lead > .ew-label {
		grid-row: 2;
		margin-block-start: 0;
	}

	.ew-regulatory__grid > .ew-card--lead > .ew-card__headline {
		grid-row: 3;
	}

	.ew-regulatory__grid > .ew-card--lead > .ew-card__deck {
		grid-row: 4;
	}

	.ew-regulatory__grid > .ew-card--lead > .ew-card__meta {
		grid-row: 5;
	}

	.ew-regulatory__grid > .ew-card--lead .ew-card__headline {
		font-size: var(--wp--preset--font-size--x-large);
		line-height: var(--wp--custom--line-height--heading);
	}

	.ew-regulatory__grid > .ew-card--lead .ew-card__deck {
		font-size: var(--wp--preset--font-size--medium);
	}
}

/* Homepage ads (DESIGN.md 9.15): the billboard frame spans the page width, the creative keeps its own size. */

.ew-home > .ew-ad {
	max-width: var(--wp--style--global--wide-size);
}

.ew-home > .ew-ad--home-billboard {
	width: 100%;
}

.ew-ad--home-billboard .ew-ad__image,
.ew-ad--home-leaderboard .ew-ad__image {
	width: auto;
	margin-inline: auto;
}

/* The leaderboard has room for its large creative from 782 px. */
@media (min-width: 782px) {
	.ew-ad--home-leaderboard.ew-ad--has-small .ew-ad__image--large {
		display: block;
	}

	.ew-ad--home-leaderboard.ew-ad--has-small .ew-ad__image--small {
		display: none;
	}
}

/* Hover on news headlines (owner feedback, step 7): an underline in the crown colour that breaks where a
   letter drops below the line. It stays inside the line, so a headline cut to a few lines never clips it. */

:is(.ew-card__headline, .ew-list-item__headline, .ew-feed-row__headline, .ew-event-item__name, .ew-team__name, .ew-topic__title) a,
.ew-most-read a,
.ew-rail-list__headline,
.ew-channel__name {
	text-decoration-line: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: var(--wp--custom--border--rule);
	text-decoration-skip-ink: auto;
	text-underline-offset: var(--wp--custom--underline--offset-headline);
	transition-property: text-decoration-color;
}

:is(.ew-card__headline, .ew-list-item__headline, .ew-feed-row__headline, .ew-event-item__name) a:hover,
.ew-most-read a:hover,
.ew-rail-list__headline:hover,
.ew-team__member:hover .ew-team__name a,
.ew-topic:hover .ew-topic__title a,
.ew-channel:hover .ew-channel__name {
	text-decoration-line: underline;
	text-decoration-color: var(--wp--preset--color--crown);
}

/* The small links follow the same rule: footer, breadcrumbs, byline, tags and the name in the author box. */
:is(.ew-footer__column, .yoast-breadcrumbs, .ew-tags, .ew-author-box__name) a:is(:hover, :focus-visible),
a.ew-byline__author:is(:hover, :focus-visible) {
	text-decoration-color: var(--wp--preset--color--crown);
	text-decoration-thickness: var(--wp--custom--border--rule);
	text-decoration-skip-ink: auto;
}

.ew-card__media img,
.ew-list-item__thumb img,
.ew-feed-row__thumb img,
.ew-most-read__media img {
	transition: transform var(--wp--custom--duration--slow) var(--wp--custom--easing--standard);
}

.ew-card:hover .ew-card__media img,
.ew-list-item:hover .ew-list-item__thumb img,
.ew-feed-row:hover .ew-feed-row__thumb img,
.ew-most-read li:hover .ew-most-read__media img {
	transform: scale(var(--wp--custom--hover--zoom));
}

/* Sections below the first screen rise into view while scrolling. Only in browsers that can tie an
   animation to the scroll position by themselves, and only when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.ew-home > :is(.ew-tabbed, .ew-home-section, .ew-dont-miss),
		.ew-page-wide > :is(.ew-pack:not(.ew-pack--split), .ew-team, .ew-contact--panel) {
			animation: ew-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 35%;
		}
	}
}

@keyframes ew-rise {
	from {
		opacity: 0;
		transform: translateY(var(--wp--custom--hover--rise));
	}
}

/* "View all" links: the arrow moves a step to the right. */
.ew-section-header__link svg {
	transition: transform var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
}

.ew-section-header__link:hover svg {
	transform: translateX(var(--wp--preset--spacing--10));
}

/* Reduced motion (DESIGN.md 8.3) */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}

	.ew-card:hover .ew-card__media img,
	.ew-list-item:hover .ew-list-item__thumb img,
	.ew-feed-row:hover .ew-feed-row__thumb img,
	.ew-most-read li:hover .ew-most-read__media img,
	.ew-section-header__link:hover svg {
		transform: none;
	}
}
