/*
 * Embedonix type scale and listing cards (UI audit 2026-11-26).
 *
 * One heading scale for every template, so a page title, a section heading and
 * a card title are always three clearly different sizes:
 *
 *              desktop  tablet  phone
 *   page H1      40      34      30
 *   section H2   30      26      24
 *   H3           22      20      19
 *   card title   21      20      19
 *
 *   end-of-article section headings (comments, Read next): 24 / 22 / 21
 *
 * Older stylesheets set heading sizes with long, high-specificity selectors and
 * per-breakpoint overrides, so the heading sizes here use !important: this file
 * is the single owner of heading sizes.
 *
 * Small UI text uses 13, 14 and 15px only. Loaded after design-system.css and
 * built from its tokens, so the dark scheme needs no extra rules.
 */

:root {
	--emx-fs-h1: 40px;
	--emx-fs-h2: 30px;
	--emx-fs-h3: 22px;
	--emx-fs-h2s: 24px;
	--emx-fs-h4: 18px;
	--emx-fs-card: 21px;
	--emx-fs-meta: 13px;
	--emx-fs-small: 14px;
	--emx-fs-ui: 15px;
	--emx-listing-width: 1040px;
	/* Home lists and their section headings share one left edge with the hero text. */
	--emx-home-inset: 24px;
}

@media (max-width: 999px) {
	:root {
		--emx-fs-h1: 34px;
		--emx-fs-h2: 26px;
		--emx-fs-h2s: 22px;
		--emx-fs-h3: 20px;
		--emx-fs-card: 20px;
	}
}

@media (max-width: 689px) {
	:root {
		--emx-fs-h1: 30px;
		--emx-fs-h2: 24px;
		--emx-fs-h2s: 21px;
		--emx-fs-h3: 19px;
		--emx-fs-h4: 17px;
		--emx-fs-card: 19px;
		--emx-home-inset: 14px;
	}
}

/* ------------------------------------------------------------------ */
/* 1. Headings                                                          */
/* ------------------------------------------------------------------ */

/* Page titles: posts, pages, archives, the home hero, archive and 404 pages. */
html body h1.page-title,
html body .entry-content h1.wp-block-heading,
html body .embedonix-home-hero h1#embedonix-home-hero-title,
html body .embedonix-compact-archive h1,
html body .embedonix-archive h1,
html body h1.embedonix-404__title {
	font-size: var(--emx-fs-h1) !important;
	line-height: 1.15;
	letter-spacing: -0.02em;
	font-weight: 750;
	color: var(--emx-heading);
}

/* Section headings inside content, including the home section headings. */
html body .entry-content h2.wp-block-heading,
html body .entry-content > h2,
html body .entry-content h2[id]:not(.article-index-item__title) {
	font-size: var(--emx-fs-h2) !important;
	line-height: 1.22;
	letter-spacing: -0.015em;
	font-weight: 700;
	color: var(--emx-heading);
}

html body .entry-content h3.wp-block-heading,
html body .entry-content > h3 {
	font-size: var(--emx-fs-h3) !important;
	line-height: 1.3;
	font-weight: 700;
	color: var(--emx-heading);
}

html body .entry-content h4.wp-block-heading,
html body .entry-content > h4 {
	font-size: var(--emx-fs-h4) !important;
	line-height: 1.35;
	font-weight: 700;
}

/* Comments and end-of-article blocks are sections too, one step below H2. */
html body .ct-comments h2.comment-reply-title,
html body .ct-comments h3.ct-comments-title,
html body h2.embedonix-continuation__heading {
	font-size: var(--emx-fs-h2s) !important;
	line-height: 1.25;
	font-weight: 700;
	color: var(--emx-heading);
}

/* Home sections get a short accent rule, which separates "section" from
   "card" at a glance even before the size difference registers. */
html body.embedonix-enhancement-front-page .entry-content h2.wp-block-heading {
	position: relative;
	margin-top: 56px;
	margin-bottom: 22px;
	padding-bottom: 14px;
	padding-left: var(--emx-home-inset) !important;
}

html body.embedonix-enhancement-front-page .entry-content h2.wp-block-heading::after {
	content: "";
	position: absolute;
	left: var(--emx-home-inset);
	bottom: 0;
	width: 44px;
	height: 3px;
	border-radius: 2px;
	background: var(--emx-accent);
}

/* Blocksy prints archive labels ("Category") inline in the H1. Show the label
   as a small eyebrow line above the title instead. */
html body h1.page-title .ct-title-label {
	display: block;
	margin-bottom: 8px;
	font-size: var(--emx-fs-meta);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--emx-accent-text);
}

/* ------------------------------------------------------------------ */
/* 2. Listing cards (home lists, Articles, categories, author)         */
/* ------------------------------------------------------------------ */

html body .article-index--home-featured,
html body .article-index--home-latest,
html body.embedonix-enhancement-article-listing .entries {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	max-width: var(--emx-listing-width);
	margin-right: auto;
	margin-left: auto;
}

@media (max-width: 899px) {
	html body .article-index--home-featured,
	html body .article-index--home-latest,
	html body.embedonix-enhancement-article-listing .entries {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}
}

html body .article-index--home-featured > .article-index__entry,
html body .article-index--home-latest > .article-index__entry {
	display: flex;
	margin: 0;
}

html body .article-index--home-featured .article-index-item,
html body .article-index--home-latest .article-index-item,
html body.embedonix-enhancement-article-listing .entries > .article-index-item {
	display: flex;
	width: 100%;
	border: 1px solid var(--emx-border);
	border-radius: 12px;
	background: var(--emx-surface);
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html body .article-index > .article-index__entry:last-child > .article-index-item,
html body.embedonix-enhancement-article-listing .entries > .article-index-item:last-child {
	border-bottom: 1px solid var(--emx-border);
}

html body .article-index--home-featured .article-index-item:hover,
html body .article-index--home-latest .article-index-item:hover,
html body.embedonix-enhancement-article-listing .entries > .article-index-item:hover {
	border-color: var(--emx-accent-line);
	box-shadow: var(--emx-shadow);
}

html body .article-index--home-featured .article-index-item__inner,
html body .article-index--home-latest .article-index-item__inner,
html body.embedonix-enhancement-article-listing .entries .article-index-item__inner {
	display: flex;
	width: 100%;
	padding: 20px 22px;
}

html body .article-index--home-featured .article-index-item__content,
html body .article-index--home-latest .article-index-item__content,
html body.embedonix-enhancement-article-listing .entries .article-index-item__content {
	display: flex;
	flex-direction: column;
	width: 100%;
}

/* Card title: clearly smaller than the section heading above it. */
html body .article-index--home-featured .article-index-item__title,
html body .article-index--home-latest .article-index-item__title,
html body.embedonix-enhancement-article-listing .entries .article-index-item__title {
	font-size: var(--emx-fs-card);
	font-weight: 680;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

html body .article-index--home-featured .article-index-item__excerpt,
html body .article-index--home-latest .article-index-item__excerpt,
html body.embedonix-enhancement-article-listing .entries .article-index-item__excerpt {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	max-width: none;
	margin-top: 10px;
	font-size: var(--emx-fs-ui);
	line-height: 1.55;
	color: var(--emx-text);
}

html body .article-index--home-featured .article-index-item__meta,
html body .article-index--home-latest .article-index-item__meta,
html body.embedonix-enhancement-article-listing .entries .article-index-item__meta {
	margin-top: auto;
	padding-top: 14px;
	font-size: var(--emx-fs-meta);
	color: var(--emx-text-muted);
}

/* Small listing text on the shared scale. */
html body .article-index-item__context {
	font-size: var(--emx-fs-small);
}

html body .article-index-item__type,
html body .article-index-item__supplemental-meta {
	font-size: var(--emx-fs-meta);
}

html body.embedonix-enhancement-front-page .entry-content .article-index--home-featured,
html body.embedonix-enhancement-front-page .entry-content .article-index--home-latest {
	max-width: none;
	margin-right: var(--emx-home-inset);
	margin-left: var(--emx-home-inset);
}

/* Pagination and anything else Blocksy appends inside .entries spans both columns. */
html body.embedonix-enhancement-article-listing .entries > :not(.article-index-item) {
	grid-column: 1 / -1;
}

/* ------------------------------------------------------------------ */
/* 3. Smaller fixes                                                     */
/* ------------------------------------------------------------------ */


/* Blocksy leaves an empty related-posts strip when there are no related posts. */
html body .ct-related-posts-container:not(:has(article)) {
	display: none;
}

/* Part navigation: status and button on one row. */
html body .embedonix-part-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

html body .embedonix-part-nav__status {
	margin: 0;
	font-size: var(--emx-fs-meta);
}

/* Author page: the website link was a 12px glyph in a dot. */
html body .author-box-socials a {
	width: 34px;
	height: 34px;
}

html body .author-box-socials a svg {
	width: 16px;
	height: 16px;
}

/* Home hero author card on phones: name and role on two clean lines. */
@media (max-width: 689px) {
	html body .embedonix-home-hero .embedonix-home-hero__author h2 {
		font-size: 17px;
		line-height: 1.3;
	}

	html body .embedonix-home-hero .embedonix-home-hero__author-title {
		font-size: var(--emx-fs-small);
		line-height: 1.35;
	}
}

/* Cookie banner: reject and accept get equal weight in the site's button style,
   settings is the quiet outline action. */
html body #cookie-law-info-bar .cli-plugin-button {
	border-radius: var(--emx-radius-sm) !important;
	font-weight: 600;
	white-space: normal;
	text-align: center;
}

@media (max-width: 689px) {
	html body #cookie-law-info-bar .cli-bar-btn_container > * {
		flex: 1 1 0;
		padding: 9px 8px !important;
	}
}

html body #cookie-law-info-bar .cookie_action_close_header_reject,
html body #cookie-law-info-bar #wt-cli-accept-all-btn,
html body #cookie-law-info-bar .wt-cli-accept-all-btn {
	border: 1px solid var(--emx-accent) !important;
	background: var(--emx-accent) !important;
	color: #fff !important;
}

html body #cookie-law-info-bar .cli_settings_button {
	border: 1px solid var(--emx-border-strong) !important;
	background: transparent !important;
	color: var(--emx-heading) !important;
}
