/*
Theme Name: El Vistazo
Theme URI: https://www.elvistazodelanoticia.com/
Author: El Vistazo de la Noticia
Description: Tema de bloques para El Vistazo de la Noticia: portada de noticias jerárquica, modo oscuro, tipografía Source Serif 4 + Inter autoalojada.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elvistazo
*/

/* ---------- Tokens ---------- */
:root {
	color-scheme: light;
	--ev-bg: #ffffff;
	--ev-surface: #eff3f9;
	--ev-ink: #0c1a2e;
	--ev-muted: #4a5a70;
	--ev-rule: #d6dee9;
	--ev-brand: #0b4db3;
	--ev-brand-deep: #08367f;
	--ev-on-brand: #ffffff;
	--ev-link: #0b4db3;
	--ev-focus: #0b4db3;
	--ev-iris: #1f6fe0;
	--ev-iris-ring: #0b4db3;
	--ev-lid: #1e8c55;
	--ev-pupil: #0a1a33;
	--ev-card-1: #0b4db3;
	--ev-card-2: #0a3e8f;
	--ev-card-3: #135a9e;
	--ev-card-4: #213f99;
	--ev-wrap: 77.5rem;
	--ev-gutter: clamp(1rem, 3vw, 2rem);
	--ev-serif: var(--wp--preset--font-family--serif, Georgia, serif);
	--ev-sans: var(--wp--preset--font-family--sans, Arial, sans-serif);
	--ev-display: var(--wp--preset--font-family--display, var(--ev-sans));
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--ev-bg: #0b1524;
		--ev-surface: #111f35;
		--ev-ink: #e7edf6;
		--ev-muted: #a2b1c6;
		--ev-rule: #24344e;
		--ev-brand: #7ab0ff;
		--ev-brand-deep: #0d2b5c;
		--ev-on-brand: #0b1524;
		--ev-link: #8dbbff;
		--ev-focus: #8dbbff;
		--ev-iris: #4a90f0;
		--ev-iris-ring: #7ab0ff;
		--ev-lid: #3db27a;
		--ev-pupil: #06101f;
		--ev-card-1: #143d80;
		--ev-card-2: #10326e;
		--ev-card-3: #174a8c;
		--ev-card-4: #1d3a84;
	}
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--ev-bg: #0b1524;
	--ev-surface: #111f35;
	--ev-ink: #e7edf6;
	--ev-muted: #a2b1c6;
	--ev-rule: #24344e;
	--ev-brand: #7ab0ff;
	--ev-brand-deep: #0d2b5c;
	--ev-on-brand: #0b1524;
	--ev-link: #8dbbff;
	--ev-focus: #8dbbff;
	--ev-iris: #4a90f0;
	--ev-iris-ring: #7ab0ff;
	--ev-lid: #3db27a;
	--ev-pupil: #06101f;
	--ev-card-1: #143d80;
	--ev-card-2: #10326e;
	--ev-card-3: #174a8c;
	--ev-card-4: #1d3a84;
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
	background: var(--ev-bg);
	color: var(--ev-ink);
	overflow-x: clip;
	font-feature-settings: "ss01" 0, "cv11" 1;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe, embed, object, svg { max-width: 100%; }
img { height: auto; }
a { text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
:where(h1, h2, h3, h4) a { color: inherit; text-decoration: none; }
:where(h1, h2, h3, h4) a:hover { color: var(--ev-link); text-decoration: underline; text-decoration-thickness: 2px; }
::selection { background: var(--ev-brand); color: var(--ev-on-brand); }

:focus-visible {
	outline: 3px solid var(--ev-focus);
	outline-offset: 2px;
	border-radius: 2px;
}
.screen-reader-text:focus, .skip-link:focus {
	background: var(--ev-bg);
	color: var(--ev-ink);
	outline: 3px solid var(--ev-focus);
}

.ev-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--ev-wrap) + 2 * var(--ev-gutter));
	margin-inline: auto !important;
	padding-inline: var(--ev-gutter);
}

/* Block layouts add margin-block-start between siblings; we manage spacing ourselves in these containers. */
.ev-header *, .ev-footer * { box-sizing: border-box; }
.ev-main { padding-block-end: clamp(2.5rem, 6vw, 4rem); }
.wp-site-blocks > * + * { margin-block-start: 0; }
.ev-main > * + * { margin-block-start: 0; }

/* ---------- Header ---------- */
.ev-theme-toggle, .ev-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding: 0 0.5rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ev-ink);
	font: 500 0.8125rem/1 var(--ev-sans);
	cursor: pointer;
	text-decoration: none;
}
.ev-theme-toggle:hover, .ev-icon-btn:hover { background: var(--ev-surface); }
.ev-theme-toggle svg, .ev-icon-btn svg { width: 1.25rem; height: 1.25rem; flex: none; }
.ev-theme-toggle .ev-sun { display: none; }
:root[data-theme="dark"] .ev-theme-toggle .ev-sun { display: block; }
:root[data-theme="dark"] .ev-theme-toggle .ev-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .ev-theme-toggle .ev-sun { display: block; }
	:root:not([data-theme="light"]) .ev-theme-toggle .ev-moon { display: none; }
}

.ev-masthead__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: clamp(0.875rem, 2.4vw, 1.5rem);
}

/* Logo */
.ev-logo {
	display: inline-flex;
	align-items: center;
	gap: clamp(0.5rem, 1.2vw, 0.875rem);
	color: var(--ev-ink);
	text-decoration: none;
	min-width: 0;
}
.ev-logo:hover { color: var(--ev-ink); }
.ev-logo__eye { width: clamp(3.25rem, 7vw, 5rem); height: auto; flex: none; }
.ev-logo__word {
	display: flex;
	flex-direction: column;
	font-family: var(--ev-serif);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 0.95;
}
.ev-logo__small {
	font-size: clamp(0.9375rem, 1.9vw, 1.3125rem);
	font-weight: 500;
	color: var(--ev-muted);
	letter-spacing: 0.005em;
	margin-top: 0.12em;
}
.ev-logo__big { font-size: clamp(1.5rem, 3.6vw, 2.375rem); letter-spacing: -0.02em; }
.ev-eye__brow { fill: var(--ev-ink); }
.ev-eye__lid { fill: var(--ev-lid); }
.ev-eye__iris { fill: var(--ev-iris); }
.ev-eye__ring { fill: none; stroke: var(--ev-iris-ring); stroke-width: 2.5; }
.ev-eye__pupil { fill: var(--ev-pupil); }
.ev-eye__glint { fill: #fff; }

/* Search in masthead */
.ev-masthead .wp-block-search { width: min(20rem, 100%); }
.ev-masthead .wp-block-search__inside-wrapper {
	border: 1px solid var(--ev-rule);
	border-radius: 999px;
	padding: 0.1875rem;
	background: var(--ev-bg);
}
.ev-masthead .wp-block-search__inside-wrapper:focus-within { border-color: var(--ev-brand); }
.ev-masthead .wp-block-search__input {
	border: 0;
	background: transparent;
	color: var(--ev-ink);
	padding: 0.5rem 0.875rem;
	font-size: 0.9375rem;
	min-width: 0;
}
.ev-masthead .wp-block-search__input:focus { outline: none; }
.ev-masthead .wp-block-search__input::placeholder { color: var(--ev-muted); opacity: 1; }
.ev-masthead .wp-block-search__button {
	border-radius: 999px;
	margin: 0;
	padding: 0.5rem;
	min-width: 2.375rem;
	background: var(--ev-brand);
	color: var(--ev-on-brand);
	border: 0;
}
.ev-masthead .wp-block-search__button svg { fill: currentColor; }
.ev-search-link { display: none; }

/* Navigation band */
.ev-navband {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--ev-brand-deep);
	color: #fff;
}
.admin-bar .ev-navband { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .ev-navband { top: 0; } }
.ev-navband .wp-block-navigation {
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.005em;
}
.ev-navband .wp-block-navigation__container {
	gap: clamp(1.25rem, 2vw, 1.75rem);
	flex-wrap: nowrap;
	width: 100%;
	justify-content: flex-start;
}
.ev-navband .wp-block-navigation-item__content {
	display: block;
	padding: 0.875rem 0.25rem;
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 3px solid transparent;
	margin-bottom: -0px;
}
.ev-navband .wp-block-navigation-item__content:hover { border-bottom-color: rgba(255, 255, 255, 0.55); }
.ev-navband .current-menu-item > .wp-block-navigation-item__content,
.ev-navband [aria-current="page"] { border-bottom-color: #fff; }
.ev-navband :focus-visible { outline-color: #fff; outline-offset: -3px; }
.ev-navband .ev-wrap { overflow: hidden; }
.ev-navband__inner { display: flex; align-items: stretch; gap: 0.75rem; }
.ev-navband__inner > * { margin-block: 0 !important; }
.ev-navband__inner > .wp-block-navigation { flex: 1 1 auto; min-width: 0; margin: 0; }
.ev-navband__tools {
	flex: none;
	display: flex;
	align-items: center;
	padding-left: 0.125rem;
	border-left: 1px solid rgba(255, 255, 255, 0.22);
}
.ev-navband .ev-theme-toggle { color: #fff; width: 2.5rem; height: 2.5rem; min-width: 0; min-height: 0; padding: 0; margin-right: -0.5rem; }
.ev-navband .ev-theme-toggle:hover { background: rgba(255, 255, 255, 0.14); }
.ev-navband .ev-theme-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 1080px) {
	.ev-navband .ev-wrap { padding-inline: 0; overflow: visible; }
	.ev-navband__inner { gap: 0; }
	.ev-navband__tools { padding-inline: 0.125rem calc(var(--ev-gutter) + 0.5rem); }
	.ev-navband .wp-block-navigation {
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		-webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
		mask-image: linear-gradient(90deg, #000 85%, transparent);
	}
	.ev-navband .wp-block-navigation::-webkit-scrollbar { display: none; }
	.ev-navband .wp-block-navigation__container {
		justify-content: flex-start;
		gap: 1.25rem;
		padding-inline: var(--ev-gutter) 3rem;
		width: max-content;
	}
}

@media (max-width: 720px) {
	.ev-masthead .wp-block-search { display: none; }
	.ev-search-link { display: inline-flex; }
}

/* ---------- Shared card pieces ---------- */
.ev-kicker {
	font-family: var(--ev-sans);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
	letter-spacing: 0.01em;
}
.ev-kicker a { color: var(--ev-link); text-decoration: none; }
.ev-kicker a:hover { text-decoration: underline; }

.ev-meta, .ev-meta time {
	font-size: 0.8125rem;
	color: var(--ev-muted);
	font-variant-numeric: tabular-nums;
	margin: 0;
}

.wp-block-post-title { overflow-wrap: break-word; hyphens: manual; }
.ev-card { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.ev-card > * { margin: 0 !important; }
.ev-card .wp-block-post-featured-image { margin-bottom: 0.375rem !important; }
.ev-card .wp-block-post-title { font-size: 1.1875rem; line-height: 1.22; font-weight: 650; letter-spacing: -0.005em; }
.ev-card .wp-block-post-excerpt { color: var(--ev-muted); font-size: 0.9375rem; line-height: 1.5; }
.ev-card .wp-block-post-excerpt__excerpt { margin: 0; }
.ev-card .wp-block-post-excerpt__more-text { display: none; }

.wp-block-post-featured-image { margin: 0; overflow: hidden; background: var(--ev-surface); }
.wp-block-post-featured-image a { display: block; height: 100%; }
.wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.wp-block-post-featured-image a:hover img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .wp-block-post-featured-image img { transition: none; } .wp-block-post-featured-image a:hover img { transform: none; } }

/* Typographic fallback card */
.ev-typecard {
	container-type: inline-size;
	position: relative;
	background: var(--ev-card, var(--ev-card-1)) !important;
	color: #fff;
}
.ev-typecard.is-tone-2 { --ev-card: var(--ev-card-2); }
.ev-typecard.is-tone-3 { --ev-card: var(--ev-card-3); }
.ev-typecard.is-tone-4 { --ev-card: var(--ev-card-4); }
.ev-typecard a {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	min-height: 100%;
	padding: clamp(0.75rem, 6cqi, 1.75rem);
	box-sizing: border-box;
	color: #fff;
	text-decoration: none;
	overflow: hidden;
}
.ev-typecard__eye {
	position: absolute;
	right: -14cqi;
	top: -22cqi;
	width: 78cqi;
	height: auto;
	opacity: 0.22;
	pointer-events: none;
}
.ev-typecard__eye circle { fill: none; stroke: #fff; }
.ev-typecard__section {
	position: relative;
	font-family: var(--ev-serif);
	font-weight: 700;
	font-size: clamp(0.625rem, 12cqi, 3.5rem);
	line-height: 1;
	letter-spacing: -0.015em;
}
.ev-typecard__rule {
	position: relative;
	display: block;
	width: 2.5rem;
	height: 3px;
	background: #fff;
	margin-bottom: clamp(0.5rem, 3cqi, 1rem);
}
.ev-typecard__brand {
	position: relative;
	margin-top: clamp(0.25rem, 2cqi, 0.625rem);
	font-size: clamp(0.6875rem, 3.6cqi, 0.9375rem);
	font-weight: 500;
	opacity: 0.88;
}
@container (max-width: 220px) {
	.ev-typecard__brand { display: none; }
	.ev-typecard__rule { width: 1.5rem; height: 2px; }
}

/* Section heading */
.ev-sechead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	border-top: 4px solid var(--ev-brand);
	padding-top: 0.625rem;
	margin: 0 0 1.25rem !important;
}
.ev-sechead > * { margin: 0 !important; }
.ev-sechead h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); letter-spacing: -0.01em; }
.ev-sechead h2 a:hover { text-decoration: none; color: var(--ev-link); }
.ev-sechead__more {
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
}
.ev-sechead__more a { color: var(--ev-link); text-decoration: none; }
.ev-sechead__more a:hover { text-decoration: underline; }
.ev-sechead.is-quiet { border-top-width: 2px; border-top-color: var(--ev-ink); }

/* Post template resets */
.wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.wp-block-post-template > li { margin: 0; }

/* ---------- Homepage: top ---------- */
.ev-home-top {
	display: grid;
	gap: 1.75rem;
	padding-block: clamp(1.25rem, 3vw, 2rem) clamp(2rem, 4vw, 3rem);
}
.ev-home-top > * { margin: 0 !important; min-width: 0; }

.ev-lead .wp-block-post-featured-image { aspect-ratio: 16 / 10; }
.ev-lead .ev-card { gap: 0.625rem; }
.ev-lead .ev-card .wp-block-post-title {
	font-size: clamp(1.75rem, 1.1rem + 2.3vw, 2.75rem);
	line-height: 1.08;
	font-weight: 700;
	letter-spacing: -0.018em;
	text-wrap: balance;
}
.ev-lead .ev-card .wp-block-post-excerpt { font-size: 1.0625rem; color: var(--ev-ink); opacity: 0.86; max-width: 60ch; }
.ev-lead .ev-kicker { font-size: 0.875rem; }

.ev-secondary .wp-block-post-template { display: grid; gap: 1.25rem; }
.ev-secondary .wp-block-post-template > li + li { border-top: 1px solid var(--ev-rule); padding-top: 1.25rem; }
.ev-secondary .wp-block-post-featured-image { aspect-ratio: 3 / 2; }
.ev-secondary .ev-card .wp-block-post-title { font-size: 1.1875rem; }

.ev-latest {
	border-top: 4px solid var(--ev-brand);
	padding-top: 0.625rem;
}
.ev-latest__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.375rem !important;
	margin: 0 0 0.5rem !important;
}
.ev-live-dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--ev-brand);
	box-shadow: 0 0 0 0 var(--ev-brand);
	animation: ev-pulse 2.4s ease-out infinite;
}
@keyframes ev-pulse {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ev-brand) 55%, transparent); }
	70%, 100% { box-shadow: 0 0 0 0.5rem transparent; }
}
@media (prefers-reduced-motion: reduce) { .ev-live-dot { animation: none; } }

.ev-latest .wp-block-post-template > li { border-bottom: 1px solid var(--ev-rule); }
.ev-latest .wp-block-post-template > li:last-child { border-bottom: 0; }
.ev-tick {
	display: grid;
	grid-template-columns: 4.25rem 1fr;
	gap: 0.75rem;
	padding-block: 0.75rem;
	align-items: start;
}
.ev-tick > * { margin: 0 !important; }
.ev-tick .wp-block-post-date { padding-top: 0.125rem; }
.ev-tick .wp-block-post-date, .ev-tick .wp-block-post-date time {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--ev-link);
	line-height: 1.35;
	font-variant-numeric: tabular-nums;
}
.ev-tick .wp-block-post-title {
	font-family: var(--ev-display);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0;
}

@media (min-width: 700px) {
	.ev-home-top { grid-template-columns: 1fr 1fr; }
	.ev-home-top .ev-lead { grid-column: 1 / -1; }
}
@media (min-width: 1080px) {
	.ev-home-top { grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: 2rem; }
	.ev-home-top .ev-lead { grid-column: auto; }
	.ev-home-top > * + * { border-left: 1px solid var(--ev-rule); padding-left: 2rem; }
	.ev-latest { border-top: 0; padding-top: 0; }
	.ev-home-top > .ev-latest { border-left: 0; padding-left: 0; }
	.ev-lead .wp-block-post-featured-image { aspect-ratio: 4 / 3; }
	.ev-latest-box { border-top: 4px solid var(--ev-brand); padding-top: 0.625rem; }
}
@media (max-width: 699px) {
	.ev-secondary .ev-card {
		display: grid;
		grid-template-columns: 1fr 7.5rem;
		grid-template-areas: "kicker img" "title img" "date img";
		grid-template-rows: auto auto 1fr;
		column-gap: 1rem;
		row-gap: 0.375rem;
	}
	.ev-secondary .ev-card .wp-block-post-featured-image { grid-area: img; aspect-ratio: 1; margin: 0 !important; align-self: start; }
	.ev-secondary .ev-card .ev-kicker { grid-area: kicker; }
	.ev-secondary .ev-card .wp-block-post-title { grid-area: title; font-size: 1.0625rem; }
	.ev-secondary .ev-card .ev-meta { grid-area: date; }
}

/* ---------- Homepage: sections ---------- */
.ev-section { padding-block: clamp(1.75rem, 4vw, 2.75rem); }
.ev-band { background: var(--ev-surface); }

.ev-feature .wp-block-post-template { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.ev-feature .wp-block-post-featured-image { aspect-ratio: 3 / 2; }
.ev-feature .wp-block-post-template > li:first-child .wp-block-post-title {
	font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
	line-height: 1.1;
	font-weight: 700;
	text-wrap: balance;
}
.ev-feature .wp-block-post-template > li:not(:first-child) .wp-block-post-excerpt { display: none; }
@media (min-width: 600px) {
	.ev-feature .wp-block-post-template { grid-template-columns: 1fr 1fr; }
	.ev-feature .wp-block-post-template > li:first-child { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
	.ev-feature .wp-block-post-template { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 1.75rem; row-gap: 1.75rem; }
	.ev-feature .wp-block-post-template > li:first-child { grid-column: 1 / span 2; grid-row: 1 / span 2; }
	.ev-feature.is-mirrored .wp-block-post-template > li:first-child { grid-column: 3 / span 2; }
	.ev-feature .wp-block-post-template > li:not(:first-child) .wp-block-post-title { font-size: 1.0625rem; }
	.ev-feature .wp-block-post-template > li:first-child .wp-block-post-featured-image { aspect-ratio: 4 / 3; }
}

.ev-trio { display: grid; gap: clamp(2rem, 4vw, 2.5rem); }
.ev-trio > * { margin: 0 !important; min-width: 0; }
@media (min-width: 800px) { .ev-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ev-compact .wp-block-post-template > li + li { border-top: 1px solid var(--ev-rule); padding-top: 0.875rem; margin-top: 0.875rem; }
.ev-compact .wp-block-post-template > li:not(:first-child) .wp-block-post-featured-image,
.ev-compact .wp-block-post-template > li:not(:first-child) .ev-kicker { display: none; }
.ev-compact .wp-block-post-featured-image { aspect-ratio: 16 / 9; }
.ev-compact .ev-card .wp-block-post-title { font-size: 1.0625rem; }
.ev-compact .wp-block-post-template > li:first-child .wp-block-post-title { font-size: 1.25rem; }

.ev-grid .wp-block-post-template { display: grid; gap: 1.75rem 1.5rem; grid-template-columns: 1fr; }
.ev-grid .wp-block-post-featured-image { aspect-ratio: 3 / 2; }
.ev-grid .ev-card .wp-block-post-title { font-size: 1.0625rem; }
@media (min-width: 560px) { .ev-grid .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .ev-grid .wp-block-post-template { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Pagination ---------- */
.wp-block-query-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	margin-top: 2.5rem !important;
	font-size: 0.9375rem;
	font-weight: 600;
}
.wp-block-query-pagination > * { margin: 0 !important; }
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--ev-rule);
	color: var(--ev-ink);
	text-decoration: none;
	box-sizing: border-box;
}
.wp-block-query-pagination-numbers { display: flex; flex-wrap: wrap; gap: 0.375rem; justify-content: center; }
.wp-block-query-pagination a:hover { border-color: var(--ev-brand); color: var(--ev-link); }
.wp-block-query-pagination .page-numbers.current { background: var(--ev-brand); border-color: var(--ev-brand); color: var(--ev-on-brand); }
.wp-block-query-pagination .page-numbers.dots { border: 0; min-width: 1rem; padding: 0; }

/* ---------- Archive / search list ---------- */
.ev-archive-head { padding-block: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2rem); }
.ev-archive-head > * { margin: 0 !important; }
.ev-archive-head .ev-archive-label { font-size: 0.875rem; font-weight: 600; color: var(--ev-muted); margin-bottom: 0.25rem !important; }
.ev-archive-head .wp-block-query-title {
	font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);
	letter-spacing: -0.02em;
	line-height: 1;
	border-bottom: 4px solid var(--ev-brand);
	padding-bottom: 1rem;
}
.ev-archive-head .wp-block-term-description { margin-top: 0.75rem !important; color: var(--ev-muted); max-width: 60ch; }
.ev-archive-head .wp-block-term-description p { margin: 0; }
.ev-archive-head .wp-block-search { margin-top: 1.25rem !important; max-width: 36rem; }

.ev-archive-layout { display: grid; gap: 2.5rem; }
.ev-archive-layout > * { margin: 0 !important; min-width: 0; }
@media (min-width: 1080px) {
	.ev-archive-layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; }
	.ev-aside { border-left: 1px solid var(--ev-rule); padding-left: 2rem; }
	.ev-aside__sticky { position: sticky; top: 4.5rem; }
}

.ev-list .wp-block-post-template > li { border-bottom: 1px solid var(--ev-rule); padding-block: 1.25rem; }
.ev-list .wp-block-post-template > li:first-child { padding-top: 0; }
.ev-list .ev-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 7rem;
	grid-template-areas: "kicker img" "title img" "excerpt img" "date img";
	grid-template-rows: auto auto auto 1fr;
	column-gap: 1rem;
	row-gap: 0.375rem;
}
.ev-list .ev-card .wp-block-post-featured-image { grid-area: img; aspect-ratio: 1; margin: 0 !important; align-self: start; }
.ev-list .ev-card .ev-kicker { grid-area: kicker; }
.ev-list .ev-card .wp-block-post-title { grid-area: title; font-size: 1.125rem; }
.ev-list .ev-card .wp-block-post-excerpt { grid-area: excerpt; display: none; }
.ev-list .ev-card .ev-meta { grid-area: date; }
@media (min-width: 640px) {
	.ev-list .ev-card {
		grid-template-columns: 15rem minmax(0, 1fr);
		grid-template-areas: "img kicker" "img title" "img excerpt" "img date";
		column-gap: 1.5rem;
	}
	.ev-list .ev-card .wp-block-post-featured-image { aspect-ratio: 3 / 2; }
	.ev-list .ev-card .wp-block-post-title { font-size: 1.375rem; }
	.ev-list .ev-card .wp-block-post-excerpt { display: block; }
}

.ev-empty { padding-block: 1rem 2rem; }
.ev-empty > * { margin: 0 0 1rem !important; }

/* ---------- Single ---------- */
.ev-article { padding-top: clamp(1.5rem, 4vw, 3rem); }
.ev-article-head { max-width: 50rem; margin-inline: auto !important; }
.ev-article-head > * { margin: 0 !important; }
.ev-article-head .ev-kicker { font-size: 0.9375rem; margin-bottom: 0.875rem !important; }
.ev-article-head .wp-block-post-title {
	font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
	line-height: 1.07;
	letter-spacing: -0.02em;
	text-wrap: balance;
}
.ev-dek {
	margin-top: 1rem !important;
	font-family: var(--ev-serif);
	font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.4375rem);
	line-height: 1.4;
	color: var(--ev-muted);
}
.ev-dek p { margin: 0; }
.ev-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 0.75rem;
	row-gap: 0.25rem;
	margin-top: 1.25rem !important;
	padding-block: 0.875rem;
	border-top: 1px solid var(--ev-rule);
	border-bottom: 1px solid var(--ev-rule);
	font-size: 0.875rem;
}
.ev-byline > * { margin: 0 !important; }
.ev-byline .wp-block-post-author-name { font-weight: 700; }
.ev-byline .wp-block-post-author-name::before { content: "Por "; font-weight: 400; color: var(--ev-muted); }
.ev-byline .wp-block-post-author-name a { color: var(--ev-ink); text-decoration: none; }
.ev-byline .wp-block-post-author-name a:hover { color: var(--ev-link); text-decoration: underline; }

.ev-article-figure {
	max-width: 60rem;
	margin: clamp(1.5rem, 3vw, 2.25rem) auto 0 !important;
}
.ev-article-figure .wp-block-post-featured-image { background: transparent; }
.ev-article-figure .wp-block-post-featured-image img { height: auto; max-height: 80vh; object-fit: contain; background: var(--ev-surface); }
.ev-article-figure figcaption {
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	color: var(--ev-muted);
	padding-inline: var(--ev-gutter);
}
@media (min-width: 60rem) { .ev-article-figure figcaption { padding-inline: 0; } }

.ev-article-body {
	margin-top: clamp(1.5rem, 3vw, 2.25rem) !important;
	font-size: 1.125rem;
	line-height: 1.68;
	overflow-wrap: break-word;
}
.ev-article-body > * { max-width: min(42rem, 100%); margin-inline: auto !important; }
.ev-article-body :where(p, ul, ol, blockquote) { margin-block: 0 1.15em; }
.ev-article-body :where(h2, h3, h4) { margin-block: 1.6em 0.5em; }
.ev-article-body h2 { font-size: 1.625rem; }
.ev-article-body h3 { font-size: 1.3125rem; }
.ev-article-body a { color: var(--ev-link); }
.ev-article-body img { height: auto !important; max-width: 100% !important; }
.ev-article-body figure { margin-block: 1.75em; }
.ev-article-body .wp-caption, .ev-article-body figure { width: auto !important; max-width: 100%; }
.ev-article-body .wp-caption-text, .ev-article-body figcaption { font-size: 0.8125rem; color: var(--ev-muted); margin-top: 0.5rem; }
.ev-article-body .alignleft, .ev-article-body .alignright { float: none; margin-inline: auto !important; display: block; }
.ev-article-body .alignwide { max-width: 60rem; }
.ev-article-body .alignfull { max-width: 100%; }
.ev-article-body table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.ev-article-body td, .ev-article-body th { border: 1px solid var(--ev-rule); padding: 0.5rem 0.75rem; }
.ev-article-body pre { overflow-x: auto; }
.ev-article-body iframe, .ev-article-body embed, .ev-article-body video { max-width: 100%; }
.ev-article-body .wp-block-embed__wrapper iframe { width: 100%; }
.ev-article-body blockquote, .ev-article-body .wp-block-pullquote {
	border-left: 4px solid var(--ev-brand);
	padding: 0.25rem 0 0.25rem 1.25rem;
	font-family: var(--ev-serif);
	font-size: 1.3125rem;
	line-height: 1.45;
}
.ev-article-body blockquote cite { display: block; font-family: var(--ev-sans); font-size: 0.875rem; font-style: normal; color: var(--ev-muted); margin-top: 0.5rem; }
.ev-article-body .wp-block-pullquote { border-top: 0; border-bottom: 0; text-align: left; }
.ev-article-body .ev-context {
	background: var(--ev-surface);
	border-top: 3px solid var(--ev-brand);
	padding: 1.25rem 1.5rem;
	font-size: 1rem;
}
.ev-article-body .ev-context > :last-child { margin-bottom: 0; }
@media (min-width: 640px) {
	.ev-article-body > p:first-of-type { font-size: 1.1875rem; }
}

.ev-article-foot { max-width: min(42rem, 100%); margin: 2rem auto 0 !important; }
.ev-article-foot > * { margin: 0 0 1.5rem !important; }
.ev-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8125rem; }
.ev-tags a {
	display: inline-block;
	padding: 0.375rem 0.75rem;
	border: 1px solid var(--ev-rule);
	border-radius: 999px;
	color: var(--ev-ink);
	text-decoration: none;
}
.ev-tags a:hover { border-color: var(--ev-brand); color: var(--ev-link); }
.ev-tags .wp-block-post-terms__separator { display: none; }
.ev-tags .wp-block-post-terms__prefix { font-weight: 600; align-self: center; margin-right: 0.25rem; color: var(--ev-muted); }

/* Share */
.ev-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	padding-block: 1rem;
	border-top: 1px solid var(--ev-rule);
	border-bottom: 1px solid var(--ev-rule);
}
.ev-share__label { font-size: 0.875rem; font-weight: 600; margin-right: 0.25rem; }
.ev-share__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 2.5rem;
	padding: 0 0.875rem;
	border: 1px solid var(--ev-rule);
	border-radius: 999px;
	background: var(--ev-bg);
	color: var(--ev-ink);
	font: 600 0.8125rem/1 var(--ev-sans);
	text-decoration: none;
	cursor: pointer;
}
.ev-share__btn:hover { border-color: var(--ev-brand); color: var(--ev-link); }
.ev-share__btn svg { width: 1.0625rem; height: 1.0625rem; fill: currentColor; flex: none; }
.ev-share__status { font-size: 0.8125rem; color: var(--ev-link); font-weight: 600; min-height: 1em; }
@media (max-width: 420px) {
	.ev-share__btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.ev-share__btn { padding: 0; width: 2.75rem; height: 2.75rem; justify-content: center; }
}

/* Related */
.ev-related { margin-top: clamp(2.5rem, 5vw, 4rem) !important; }

/* ---------- Newsletter ---------- */
.ev-newsletter {
	background: var(--ev-surface);
	border-top: 3px solid var(--ev-brand);
	padding: clamp(1.25rem, 3vw, 1.75rem);
}
.ev-newsletter__title { font-family: var(--ev-display); font-size: 1.375rem; font-weight: 700; line-height: 1.2; margin: 0 0 0.375rem; }
.ev-newsletter__text { margin: 0 0 1rem; color: var(--ev-muted); font-size: 0.9375rem; }
.ev-newsletter__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ev-newsletter__row input[type="email"] {
	flex: 1 1 14rem;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0 0.875rem;
	border: 1px solid var(--ev-muted);
	background: var(--ev-bg);
	color: var(--ev-ink);
	font: 400 1rem var(--ev-sans);
	box-sizing: border-box;
}
.ev-newsletter__row button {
	min-height: 2.75rem;
	padding: 0 1.25rem;
	border: 0;
	background: var(--ev-brand);
	color: var(--ev-on-brand);
	font: 700 0.9375rem var(--ev-sans);
	cursor: pointer;
}
.ev-newsletter__row button:hover { filter: brightness(1.1); }
.ev-newsletter__consent { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 0.75rem; font-size: 0.8125rem; color: var(--ev-muted); line-height: 1.45; }
.ev-newsletter__consent input { margin-top: 0.15rem; width: 1.0625rem; height: 1.0625rem; accent-color: var(--ev-brand); flex: none; }
.ev-newsletter__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ev-notice { margin: 0 0 1rem; padding: 0.75rem 1rem; font-size: 0.9375rem; font-weight: 600; border-left: 4px solid; }
.ev-notice.is-ok { border-color: #1e8c55; background: color-mix(in srgb, #1e8c55 12%, var(--ev-bg)); }
.ev-notice.is-error { border-color: #c0392b; background: color-mix(in srgb, #c0392b 12%, var(--ev-bg)); }

/* ---------- Footer ---------- */
.ev-footer {
	background: var(--ev-brand-deep);
	color: #e6eefb;
	padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
	font-size: 0.9375rem;
}
:root[data-theme="dark"] .ev-footer { background: #07101d; border-top: 1px solid var(--ev-rule); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ev-footer { background: #07101d; border-top: 1px solid var(--ev-rule); } }
.ev-footer a { color: #fff; }
.ev-footer :focus-visible { outline-color: #fff; }
.ev-footer__grid { display: grid; gap: 2.25rem; }
@media (min-width: 760px) { .ev-footer__grid { grid-template-columns: 1.3fr 1fr 1.4fr; gap: 3rem; } }
.ev-footer .ev-logo, .ev-footer .ev-logo:hover { color: #fff; }
.ev-footer .ev-logo__small { color: #c9d8f0; }
.ev-footer .ev-eye__brow { fill: #fff; }
.ev-footer .ev-eye__ring { stroke: #9cc2ff; }
.ev-footer__about { margin: 1rem 0 1.25rem; color: #c9d8f0; max-width: 34ch; }
.ev-footer h2 { font-family: var(--ev-display); font-size: 0.875rem; font-weight: 700; color: #fff; margin: 0 0 0.875rem; letter-spacing: 0.01em; }
.ev-footer__sections { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.5rem; }
.ev-footer__sections li { margin: 0 0 0.5rem; break-inside: avoid; }
.ev-footer__sections a { text-decoration: none; }
.ev-footer__sections a:hover { text-decoration: underline; }
.ev-social { display: flex; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.ev-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	color: #fff;
}
.ev-social a:hover { background: rgba(255, 255, 255, 0.12); }
.ev-social svg { width: 1.125rem; height: 1.125rem; fill: currentColor; }
.ev-footer .ev-newsletter { background: rgba(255, 255, 255, 0.07); border-top-color: #9cc2ff; color: #fff; }
.ev-footer .ev-newsletter__title { color: #fff; font-family: var(--ev-display); font-size: 1.375rem; margin: 0 0 0.375rem; }
.ev-footer .ev-newsletter__text, .ev-footer .ev-newsletter__consent { color: #c9d8f0; }
.ev-footer .ev-newsletter__row input[type="email"] { border-color: rgba(255, 255, 255, 0.5); background: rgba(0, 0, 0, 0.18); color: #fff; }
.ev-footer .ev-newsletter__row input[type="email"]::placeholder { color: #b8c8e2; }
.ev-footer .ev-newsletter__row button { background: #fff; color: #08367f; }
.ev-footer .ev-newsletter__consent a { color: #fff; }
.ev-footer .ev-notice { color: #fff; background: rgba(255, 255, 255, 0.08); }
.ev-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 0.8125rem;
	color: #c9d8f0;
}
.ev-footer__bottom p { margin: 0; }

/* ---------- 404 / page ---------- */
.ev-page { padding-top: clamp(1.5rem, 4vw, 3rem); }
.ev-page .wp-block-post-title { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); max-width: 50rem; margin-inline: auto; }
.ev-404 { padding-block: clamp(2.5rem, 7vw, 5rem) 1rem; max-width: 44rem; }
.ev-404 > * { margin: 0 0 1rem !important; }
.ev-404 .ev-404__code { font-family: var(--ev-display); font-size: clamp(4rem, 12vw, 7rem); font-weight: 700; color: var(--ev-brand); line-height: 1; margin-bottom: 0.5rem !important; }
.ev-404 .wp-block-search, .ev-archive-head .wp-block-search { max-width: 36rem; }
.ev-bigsearch .wp-block-search__inside-wrapper { border: 2px solid var(--ev-ink); padding: 0.25rem; background: var(--ev-bg); }
.ev-bigsearch .wp-block-search__input { border: 0; background: transparent; color: var(--ev-ink); font-size: 1.0625rem; padding: 0.625rem 0.75rem; min-width: 0; }
.ev-bigsearch .wp-block-search__input:focus { outline: none; }
.ev-bigsearch .wp-block-search__inside-wrapper:focus-within { outline: 3px solid var(--ev-focus); outline-offset: 2px; }
.ev-bigsearch .wp-block-search__button { margin: 0; border: 0; background: var(--ev-brand); color: var(--ev-on-brand); padding: 0.625rem 1.25rem; font-weight: 700; }
:where(.wp-block-post-featured-image.ev-typecard, .wp-block-post-featured-image.is-from-content) { aspect-ratio: 3 / 2; }

/* Mobile: secondary cards become compact rows (headline + thumbnail) to keep the page scannable. */
@media (max-width: 599px) {
	.ev-feature .wp-block-post-template > li:not(:first-child) .ev-card,
	.ev-grid .ev-card {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 6.5rem;
		grid-template-areas: "kicker img" "title img" "date img";
		grid-template-rows: auto auto 1fr;
		column-gap: 1rem;
		row-gap: 0.375rem;
	}
	.ev-feature .wp-block-post-template > li:not(:first-child) .ev-card .wp-block-post-featured-image,
	.ev-grid .ev-card .wp-block-post-featured-image { grid-area: img; aspect-ratio: 1; margin: 0 !important; align-self: start; }
	.ev-feature .wp-block-post-template > li:not(:first-child) .ev-card .wp-block-post-title,
	.ev-grid .ev-card .wp-block-post-title { grid-area: title; font-size: 1.0625rem; }
	.ev-feature .wp-block-post-template > li:not(:first-child) .ev-card .ev-meta,
	.ev-grid .ev-card .ev-meta { grid-area: date; }
	.ev-grid .ev-card .ev-kicker { grid-area: kicker; }
	.ev-feature .wp-block-post-template, .ev-grid .wp-block-post-template { gap: 0; }
	.ev-feature .wp-block-post-template > li:first-child { padding-bottom: 1.25rem; }
	.ev-feature .wp-block-post-template > li + li, .ev-grid .wp-block-post-template > li + li { border-top: 1px solid var(--ev-rule); padding-top: 1rem; margin-top: 1rem; }
	.ev-home-top .ev-latest-list .wp-block-post-template > li:nth-child(n+7) { display: none; }
	.ev-trio .ev-compact .wp-block-post-template > li:nth-child(n+4) { display: none; }
}
@media (max-width: 1079px) { .ev-archive-layout .ev-aside { display: none; } }

/* Section blocks: when a story has no picture, a same-section label card adds nothing.
   Those slots turn typographic: the headline carries the card. */
.ev-feature .ev-card:has(> .ev-typecard) > .ev-typecard,
.ev-compact .ev-card:has(> .ev-typecard) > .ev-typecard { display: none; }
.ev-feature .wp-block-post-template > li:not(:first-child) .ev-card:has(> .ev-typecard),
.ev-compact .wp-block-post-template > li:first-child .ev-card:has(> .ev-typecard) {
	border-top: 3px solid var(--ev-brand);
	padding-top: 0.75rem;
}
.ev-feature .wp-block-post-template > li:first-child .ev-card:has(> .ev-typecard) {
	height: 100%;
	box-sizing: border-box;
	justify-content: flex-end;
	gap: 0.875rem;
	padding: clamp(1.25rem, 3vw, 2.5rem);
	background: var(--ev-surface);
	border-left: 6px solid var(--ev-brand);
}
.ev-band .ev-compact .ev-card:has(> .ev-typecard) { background: transparent; }
@media (min-width: 1000px) {
	.ev-feature .wp-block-post-template > li:first-child .ev-card:has(> .ev-typecard) .wp-block-post-title {
		font-size: clamp(2rem, 1.2rem + 1.8vw, 2.875rem);
		line-height: 1.06;
	}
	.ev-feature .wp-block-post-template > li:first-child .ev-card:has(> .ev-typecard) .wp-block-post-excerpt { font-size: 1.0625rem; color: var(--ev-ink); opacity: 0.85; }
	.ev-feature .wp-block-post-template > li:not(:first-child) .ev-card:has(> .ev-typecard) .wp-block-post-title { font-size: 1.25rem; }
}
@media (max-width: 599px) {
	.ev-feature .wp-block-post-template > li:not(:first-child) .ev-card:has(> .ev-typecard) { border-top: 0; padding-top: 0; grid-template-columns: 1fr; }
}

/* Lead story without a picture: a typographic front page instead of a big empty-feeling card. */
.ev-lead .ev-card:has(> .ev-typecard) > .ev-typecard { display: none; }
.ev-lead .ev-card:has(> .ev-typecard) {
	padding: clamp(1.25rem, 4vw, 2.75rem);
	background: var(--ev-surface);
	border-left: 6px solid var(--ev-brand);
	gap: 1rem;
}
.ev-lead .ev-card:has(> .ev-typecard) .wp-block-post-title { font-size: clamp(2rem, 1.1rem + 3vw, 3.5rem); line-height: 1.04; }
.ev-lead .ev-card:has(> .ev-typecard) .wp-block-post-excerpt { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
