/* =========================================================
   Contradata: estilos del tema.

   Las vistas de DataMaps (.rjdm) tienen su propio CSS y sus colores salen de
   DataMaps → Estilo. Este archivo no toca nada dentro de .rjdm: los estilos
   de contenido van con :where() (especificidad 0) para que cualquier regla
   del plugin gane, y las vistas solo heredan la tipografía.
   ========================================================= */

:root {
	--yellow: #ffcc00;
	--yellow-dark: #e6b800;
	--ink: #111214;
	--ink-2: #2b2c30;
	--muted: #5c5e63;
	--line: #e3e3e3;
	--bg: #ffffff;
	--bg-soft: #f4f4f3;
	--hero: #17181b;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: Oswald, "Arial Narrow", sans-serif;
	--radius: 8px;
	--container: 1240px;
	--gutter: 24px;
	--narrow: 760px;
	--header-h: 0px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--toc-h, 0px) + 16px); }
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
body {
	margin: 0;
	font-family: var(--sans);
	font-size: 17px;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:where(h1, h2, h3, h4) { font-family: var(--serif); line-height: 1.1; }
:where(:focus-visible) { outline: 3px solid var(--yellow-dark); outline-offset: 2px; }
:where(.site-header, .hero-monitor, .site-footer, .sections-bar) :where(:focus-visible) { outline-color: var(--yellow); box-shadow: 0 0 0 5px var(--ink); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { width: 100%; max-width: calc(var(--narrow) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	clip: auto; clip-path: none;
	width: auto; height: auto;
	margin: 0;
	top: 12px; left: 12px;
	z-index: 1000;
	padding: 12px 18px;
	background: var(--yellow);
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
	border-radius: 6px;
}
.site-main:focus { outline: 0; }

/* ---------- Botones ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px;
	padding: 10px 24px;
	border-radius: 6px;
	border: 2px solid transparent;
	font-weight: 700; font-size: 15px; line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s, color .2s, border-color .2s;
}
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: var(--yellow-dark); color: var(--ink); }
.btn-outline { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }

/* ---------- Cabecera ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: #fff;
	border-top: 5px solid var(--ink);
	box-shadow: 0 1px 0 var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.header-top { display: flex; align-items: center; gap: 24px; padding-block: 16px; }
.site-logo, .custom-logo-link {
	display: inline-flex; align-items: center; flex: none;
	font-family: var(--display); font-weight: 700; font-size: 44px;
	letter-spacing: -.5px; line-height: 1;
	color: var(--ink); text-decoration: none;
}
.custom-logo { display: block; width: auto; height: 64px; max-height: none; }
.footer-logo-img { display: inline-block; }
.footer-logo-img img { display: block; width: auto; height: 72px; }

/* Patrocinio en el pie: los logos institucionales suelen pensarse para fondo
   claro, así que van sobre una placa blanca. */
/* Amarillo decorativo: el nombre del sitio para lectores de pantalla va aparte. */
.logo-data { color: var(--yellow); }
.logo-lupa { width: 46px; height: 46px; color: var(--yellow); margin-left: 2px; }
.site-tagline {
	margin: 0; padding-left: 24px;
	border-left: 2px solid var(--ink);
	max-width: 240px;
	font-size: 14px; line-height: 1.3; color: var(--ink-2);
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.social-links { display: flex; gap: 6px; margin: 0; padding: 0 18px 0 0; list-style: none; border-right: 1px solid #bbb; }
.social-links a { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink); }
.social-links svg { width: 20px; height: 20px; fill: currentColor; transition: fill .2s; }
.social-links a:hover { color: #8a6a00; }
.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; min-height: 44px;
	padding: 6px; border: 0; border-radius: 6px;
	background: none; color: var(--ink);
}
.icon-btn svg { width: 24px; height: 24px; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; }
.menu-toggle span[aria-hidden] { display: block; width: 24px; height: 2.5px; background: var(--ink); transition: transform .25s, opacity .25s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.search-panel { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 14px 0; }
.search-form { display: flex; gap: 10px; }
.search-form input[type="search"], .search-form .search-field {
	flex: 1; min-width: 0;
	min-height: 48px;
	padding: 10px 16px;
	border: 2px solid var(--ink); border-radius: 6px;
	font-size: 16px; background: #fff; color: var(--ink);
}
.search-form .search-submit {
	min-height: 48px; padding: 10px 22px;
	border: 0; border-radius: 6px;
	background: var(--yellow); color: var(--ink); font-weight: 700;
}
.search-form label { flex: 1; display: flex; }

/* Menú principal */
.primary-nav { border-top: 1px solid var(--line); }
.primary-nav .menu { display: flex; justify-content: space-between; margin-block: 0; list-style: none; }
.menu li { list-style: none; }
.menu > .menu-item { position: relative; display: flex; align-items: center; }
.menu > .menu-item > a {
	display: block; padding: 14px 0;
	border-bottom: 3px solid transparent;
	font-weight: 700; font-size: 15px;
	color: var(--ink); text-decoration: none;
}
.menu > .current-menu-item > a,
.menu > .current-menu-ancestor > a,
.menu > .current_page_item > a { border-bottom-color: var(--yellow); }
.menu > .menu-item:first-child.current-menu-item > a { font-size: 18px; }
.menu > .menu-item > a:hover { border-bottom-color: var(--yellow); }
.sub-toggle {
	position: relative;
	width: 28px; height: 28px;
	padding: 0; border: 0; border-radius: 4px;
	background: none; color: var(--ink);
}
.sub-toggle::after {
	content: ""; position: absolute; inset: 0; margin: auto;
	width: 7px; height: 7px;
	border-right: 2px solid; border-bottom: 2px solid;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .2s;
}
.sub-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.sub-menu {
	position: absolute; top: 100%; left: -12px; z-index: 5;
	min-width: 230px;
	margin: 0; padding: 8px 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--line); border-top: 3px solid var(--yellow);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .18s, transform .18s, visibility .18s;
}
.menu > .menu-item:nth-last-child(-n+2) > .sub-menu { left: auto; right: -12px; }
.sub-menu a { display: block; padding: 10px 16px; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; }
.sub-menu a:hover, .sub-menu .current-menu-item > a { background: var(--bg-soft); }
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu,
.menu-item-has-children.open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
/* Con JS, el submenú abierto con el botón no se cierra al mover el mouse. */
.js .menu-item-has-children.is-closed > .sub-menu { opacity: 0; visibility: hidden; }

/* ---------- Monitor (vista Portada de DataMaps) ---------- */
.hero-monitor {
	background: var(--hero-bg, var(--hero));
	/* DataMaps 1.x: sin espacio debajo de la vista, la franja queda pareja. */
	--rjdm-margin: 0;
}
.hero-monitor-inner { max-width: calc(var(--container) + 2 * var(--gutter)); }
.notice-editor {
	margin-block: 24px;
}
.notice-editor p {
	margin: 0; padding: 16px 20px;
	border-left: 6px solid var(--yellow);
	background: var(--bg-soft);
}

/* ---------- Barra de secciones ---------- */
.sections-bar { background: var(--bg-soft); }
.sections-grid {
	display: grid; grid-template-columns: repeat(4, 1fr);
	margin-block: 0; padding-block: 20px;
	list-style: none;
}
.sections-grid > li { display: flex; }
.section-item {
	flex: 1;
	display: flex; gap: 18px; align-items: center;
	padding: 8px 28px;
	border-left: 1px solid #c9c9c9;
	color: var(--ink); text-decoration: none;
}
.sections-grid > li:first-child .section-item { border-left: 0; padding-left: 36px; }
.section-item svg { width: 40px; height: 40px; flex: none; transition: color .2s; }
.section-item-title { display: block; font-size: 16px; font-weight: 700; line-height: 1.25; }
.section-item-text { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.section-item:hover svg { color: #8a6a00; }
.section-item:hover .section-item-title { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- Destacados ---------- */
.featured { display: grid; grid-template-columns: 2.4fr 1fr; gap: 24px; margin-top: 24px; }
.featured.is-single { grid-template-columns: 1fr; }
.feature-main, .feature-data { background: var(--bg-soft); border-radius: var(--radius); overflow: hidden; }
.feature-main { display: grid; grid-template-columns: 1fr 1.35fr; min-height: 350px; }
.feature-main.no-image { grid-template-columns: 1fr; }
.feature-main-text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; padding: 28px 0 28px 28px; }
.feature-main.no-image .feature-main-text { padding-right: 28px; }
.kicker, .cat {
	display: inline-flex; align-items: center; gap: 12px;
	font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
	color: var(--ink); text-decoration: none;
}
.kicker::before { content: ""; width: 6px; height: 22px; background: var(--yellow); transform: skewX(-18deg); }
.kicker:hover, .cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.feature-main h2 {
	margin: 18px -80px 18px 0;
	font-weight: 800; font-size: clamp(32px, 3.4vw, 46px);
	line-height: 1; letter-spacing: -1px;
}
.feature-main.no-image h2 { margin-right: 0; }
.feature-main p { max-width: 330px; margin: 0 0 18px; font-size: 17px; }
.feature-main-img { position: relative; min-height: 280px; }
.feature-main-img img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; filter: grayscale(1); }
.feature-main-img .sun { position: absolute; top: 18%; right: 18%; z-index: 2; width: 200px; height: 200px; border-radius: 50%; background: var(--yellow); mix-blend-mode: multiply; }
.link-arrow {
	display: inline-flex; gap: 10px;
	margin-top: auto; padding-bottom: 4px;
	border-bottom: 3px solid var(--yellow);
	font-weight: 700; font-size: 16px;
	color: var(--ink); text-decoration: none;
}
.link-arrow span { transition: transform .2s; }
.link-arrow:hover span { transform: translateX(4px); }

.feature-data { display: flex; flex-direction: column; align-items: flex-start; padding: 28px 24px; }
.feature-data h2 { margin: 14px 0 20px; font-weight: 700; font-size: 28px; line-height: 1.05; letter-spacing: -.5px; }
.feature-data-img, .feature-data-view { width: 100%; margin-bottom: 24px; }
.feature-data-img img { display: block; width: 100%; border-radius: var(--radius); filter: grayscale(1); }
.mini-chart { width: 100%; height: auto; margin-bottom: 24px; overflow: visible; }
.mini-chart .area { fill: #e1e1e1; }
.mini-chart .bars line { stroke: #fff; stroke-width: 1.5; }
.mini-chart .line { fill: none; stroke: #444; stroke-width: 2.5; }
.mini-chart .pts circle { fill: #444; }
.mini-chart .pts .last { fill: var(--yellow); }
.js .mini-chart .line { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 1.6s ease; }
.js .mini-chart.in .line { stroke-dashoffset: 0; }

:where(.featured, .posts-grid) :where(h2, h3) a { color: inherit; text-decoration: none; }
:where(.featured, .posts-grid) :where(h2, h3) a:hover {
	text-decoration: underline; text-decoration-color: var(--yellow);
	text-decoration-thickness: 3px; text-underline-offset: 4px;
}

/* ---------- Últimas publicaciones ---------- */
.latest { margin-top: 48px; margin-bottom: 64px; }
.section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 24px; }
.slash-title {
	display: flex; align-items: center; gap: 18px;
	margin: 0;
	font-family: var(--serif); font-weight: 800; font-size: 36px; letter-spacing: -.5px;
}
.slash-title::before { content: ""; flex: none; width: 7px; height: 32px; background: var(--yellow); transform: skewX(-18deg); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
	display: inline-flex; align-items: center;
	min-height: 36px;
	padding: 5px 14px;
	border: 1px solid #c9c9c9; border-radius: 20px;
	background: none;
	font-size: 14px; font-weight: 600;
	color: var(--ink); text-decoration: none;
}
.filter[aria-pressed="true"], .filter:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.link-plain { margin-left: auto; border-bottom: 2px solid var(--ink); font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; }
.link-plain:hover { border-bottom-color: var(--yellow); }
/* Título que también es enlace (p. ej. "Últimas publicaciones"): se ve como título. */
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 20px; }
.posts-grid[aria-busy="true"] { opacity: .5; transition: opacity .2s; }
.post-card { min-width: 0; }
.post-card .thumb { display: block; aspect-ratio: 2.4 / 1; margin-bottom: 16px; overflow: hidden; border-radius: var(--radius); background: #d6d6d4; }
.post-card .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: transform .4s; }
.post-card .thumb-empty { background: linear-gradient(135deg, var(--bg-soft), #dcdcda); }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .cat { padding: 0 6px; }
.post-card-title { margin: 6px 0 14px; padding: 0 6px; font-weight: 700; font-size: 25px; line-height: 1.12; letter-spacing: -.3px; }
.post-card time { display: block; padding: 0 6px; font-size: 15px; color: var(--muted); }
.post-card.fade-in { animation: fadeIn .4s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.load-more-wrap { margin-top: 36px; text-align: center; }
.front-content { margin-bottom: 64px; }

/* ---------- Listados ---------- */
.archive-list { padding-block: 40px 64px; }
.archive-head { margin-bottom: 32px; }
.archive-head .search-form { max-width: 640px; margin-top: 20px; }
.archive-description { max-width: var(--narrow); margin-top: 12px; color: var(--ink-2); }
.archive-empty { font-size: 18px; }
.archive-list .posts-grid { row-gap: 40px; }
.archive-list .post-card-title { font-size: 23px; }
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination .page-numbers {
	display: inline-grid; place-items: center;
	min-width: 44px; min-height: 44px; padding: 0 12px;
	border: 1px solid #c9c9c9; border-radius: 6px;
	font-weight: 600; color: var(--ink); text-decoration: none;
}
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--ink); }
.not-found { padding-block: 64px; }
.not-found .search-form { margin-block: 20px 28px; }

/* ---------- Artículos y páginas ---------- */
.single-article, .single-page { padding-bottom: 48px; }
.entry-header { padding-block: 48px 24px; }
.entry-title {
	margin: 14px 0 0;
	font-weight: 800; font-size: clamp(34px, 5vw, 54px);
	line-height: 1.04; letter-spacing: -1px;
}
.single-page .entry-title { margin-top: 0; }
.entry-lead { margin: 18px 0 0; font-family: var(--serif); font-size: 22px; line-height: 1.35; color: var(--ink-2); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.entry-image { margin-block: 8px 32px; }
.entry-image img { display: block; width: 100%; border-radius: var(--radius); }
.entry-image figcaption, :where(.entry-content) :where(figcaption) { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* Contenido: columna legible; anchos "amplio" y "completo" del editor.
   Se mide con min() y márgenes (sin padding), así da igual el box-sizing
   que traiga cada bloque. */
:where(.entry-content) > * { max-width: min(var(--narrow), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
:where(.entry-content) > :where(.alignwide) { max-width: min(calc(var(--container) - 2 * var(--gutter)), calc(100% - 2 * var(--gutter))); }
:where(.entry-content) > :where(.alignfull) { max-width: none; }
/* Las vistas de DataMaps usan el ancho amplio aunque no tengan alineación. */
:where(.entry-content) > :where(.wp-block-redjaguar-datamaps) { max-width: min(calc(var(--container) - 2 * var(--gutter)), calc(100% - 2 * var(--gutter))); }
:where(.entry-content.is-wide) > :where(:not(p, h2, h3, h4, h5, h6, ul, ol, blockquote, .wp-block-quote, .wp-block-pullquote, .wp-block-list)) { max-width: min(calc(var(--container) - 2 * var(--gutter)), calc(100% - 2 * var(--gutter))); }
/* En las páginas de datos el texto se alinea al borde de las vistas, no al centro. */
:where(.entry-content.is-wide) > :where(p, h2, h3, h4, h5, h6, ul, ol, blockquote, .wp-block-quote, .wp-block-list) { max-width: min(var(--narrow), calc(100% - 2 * var(--gutter))); margin-left: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter))); margin-right: auto; }

:where(.entry-content) { font-size: 19px; line-height: 1.65; }
:where(.entry-content) :where(p, ul, ol, blockquote, figure, table, pre) { margin-block: 0 1.2em; }
:where(.entry-content) :where(h2) { margin-block: 1.8em .6em; font-weight: 800; font-size: clamp(26px, 3vw, 32px); letter-spacing: -.4px; }
:where(.entry-content) :where(h3) { margin-block: 1.6em .5em; font-weight: 700; font-size: 24px; }
:where(.entry-content) :where(h4) { margin-block: 1.4em .5em; font-family: var(--sans); font-size: 18px; }
:where(.entry-content) :where(p, li, dd, figcaption, td, th) > :where(a:not([class])) {
	color: var(--ink);
	text-decoration: underline; text-decoration-color: var(--yellow-dark);
	text-decoration-thickness: 2px; text-underline-offset: 3px;
}
:where(.entry-content) :where(p, li, dd, figcaption, td, th) > :where(a:not([class])):hover { background: #fff3c4; }
:where(.entry-content) :where(blockquote) { padding-left: 22px; border-left: 6px solid var(--yellow); font-family: var(--serif); font-size: 22px; }
:where(.entry-content) :where(img) { border-radius: 4px; }
:where(.entry-content) :where(table) { width: 100%; border-collapse: collapse; font-size: 16px; }
:where(.entry-content) :where(th, td) { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
:where(.entry-content) :where(hr) { border: 0; border-top: 2px solid var(--ink); }

.entry-footer { margin-top: 32px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags a { display: inline-block; padding: 4px 12px; border: 1px solid #c9c9c9; border-radius: 20px; font-size: 14px; color: var(--ink); text-decoration: none; }
.tags a:hover { background: var(--ink); color: #fff; }
.post-navigation { margin-block: 16px 64px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 24px; border-top: 2px solid var(--ink); }
.post-navigation a { display: block; font-family: var(--serif); font-weight: 700; font-size: 19px; line-height: 1.2; color: var(--ink); text-decoration: none; }
.post-navigation a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.post-navigation .nav-next { text-align: right; }
.post-navigation .nav-label { display: block; margin-bottom: 4px; font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

/* Página de datos (La Data, monitor) */
.data-page-header { padding-block: 40px 28px; background: var(--bg-soft); margin-bottom: 32px; }
.data-page-header .entry-title { max-width: 900px; }
.data-page-header .entry-lead { max-width: var(--narrow); }
.data-page { padding-bottom: 48px; }

/* Índice "En esta página": se queda pegado bajo la cabecera. */
.page-toc {
	position: sticky; top: var(--header-h); z-index: 40;
	margin: -32px 0 32px;
	background: rgba(255, 255, 255, .96);
	border-bottom: 1px solid var(--line);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.page-toc-inner { display: flex; align-items: center; gap: 16px; }
.page-toc-label { flex: none; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.page-toc ul {
	display: flex; gap: 4px; margin: 0; padding: 8px 0; list-style: none;
	overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.page-toc ul::-webkit-scrollbar { display: none; }
.page-toc a {
	display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px;
	border-radius: 999px; white-space: nowrap;
	font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.page-toc a:hover { background: var(--bg-soft); }
.page-toc h2:focus, :where(.entry-content) h2[tabindex="-1"]:focus { outline: none; }
@media (max-width: 1100px) { .page-toc-label { display: none; } }
.page-toc a[aria-current="true"] { background: var(--ink); color: #fff; }
.admin-bar .page-toc { top: calc(var(--header-h) + 32px); }
@media (max-width: 782px) { .admin-bar .page-toc { top: calc(var(--header-h) + 46px); } }
@media (max-width: 600px) {
	.admin-bar .page-toc { top: var(--header-h); }
	.page-toc-label { display: none; }
	.page-toc-inner { padding-inline: 0; }
	.page-toc ul { padding-inline: var(--gutter); }
}

/* Incrustaciones que esperan permiso (privacidad) */
.embed-facade { padding: 24px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--bg-soft); font-family: var(--sans); font-size: 16px; }
.embed-facade-text { margin: 0 0 14px; }
.embed-facade-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0; }
.embed-facade-actions a { color: var(--ink); font-weight: 600; }
.embed-facade.is-loaded { padding: 0; border: 0; background: none; }
/* Incrustaciones con ancho fijo en el HTML (Canva trae 760 px): que no se salgan en celular. */
.entry-content iframe { max-width: 100%; }

/* Comentarios */
.comments { margin-bottom: 64px; }
.comment-list { padding-left: 0; list-style: none; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 6px; }
.comment-form .submit { min-height: 44px; padding: 10px 22px; border: 0; border-radius: 6px; background: var(--yellow); font-weight: 700; }

/* ---------- Pie ---------- */
.site-footer { padding: 56px 0 24px; background: #111214; color: #e9e9e9; }
/* Una sola fila: logo | Un proyecto de | Con el apoyo de | Contradata, con líneas verticales entre grupos. */
.footer-row { display: flex; justify-content: space-between; align-items: stretch; gap: 36px; padding-bottom: 48px; }
.footer-row > * { display: flex; flex-direction: column; justify-content: center; }
.footer-row > * + * { padding-left: 36px; border-left: 1px solid #2f3034; }
.footer-logo { font-size: 34px; color: #fff; }
.footer-label { margin: 0 0 16px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #9a9a9a; }
.site-footer .footer-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.site-footer .footer-logos li { margin: 0; }
.footer-logos img { display: block; width: auto; max-width: 100%; opacity: .85; transition: opacity .2s; }
.footer-logos img:hover { opacity: 1; }
.footer-title { margin: 0 0 12px; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 4px; }
.site-footer a:not(.btn) { display: inline-block; padding-block: 4px; color: #e9e9e9; text-decoration: none; }
.site-footer a:not(.btn):hover { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .footer-logo { padding: 0; color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; border-top: 1px solid #2a2b2e; font-size: 13px; color: #a8a8a8; }
.footer-bottom p { margin: 0; }
/* Crédito con enlace discreto: mismo color, sin subrayado. */
.site-footer .footer-credit a:not(.btn) { padding: 0; color: inherit; }
.site-footer .footer-credit a:not(.btn):hover { color: inherit; text-decoration: none; }


/* ---------- Formulario de contacto ---------- */
.contact-form-wrap { max-width: min(var(--narrow), calc(100% - 2 * var(--gutter))); }
.contact-form p { margin: 0 0 20px; }
.contact-form label { display: block; margin-bottom: 6px; font-family: var(--sans); font-weight: 700; font-size: 16px; }
.contact-form .optional { font-weight: 400; color: var(--muted); }
.contact-form .required { color: #b00020; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
	width: 100%; min-height: 44px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 6px;
	background: #fff; font: inherit; font-family: var(--sans); font-size: 16px;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 1px; }
.contact-form .field-help { display: block; margin-top: 6px; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.contact-form .btn { border: 0; cursor: pointer; font-size: 16px; }
.contact-privacy { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.contact-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-notice { margin: 0 0 24px; padding: 14px 18px; border-left: 6px solid var(--yellow); border-radius: 0 6px 6px 0; background: var(--bg-soft); font-family: var(--sans); font-weight: 600; }
.contact-notice.is-error { border-left-color: #b00020; }

/* ---------- Salida rápida ----------
   Flota abajo a la derecha en todas las pantallas. En el HTML va primero en
   las acciones de la cabecera, para llegar a él con pocas teclas Tab. */
.quick-exit {
	/* Siempre encima (la barra de filtros de DataMaps usa 9990). --exit-lift
	   lo sube cuando esa barra lo taparía (main.js). */
	position: fixed; right: 16px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--exit-lift, 0px)); z-index: 2147483000;
	transition: bottom .2s ease;
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 44px; padding: 8px 18px 8px 10px;
	border: 2px solid #fff; border-radius: 999px;
	background: var(--ink); color: #fff;
	font-weight: 700; font-size: 15px; white-space: nowrap; text-decoration: none;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.quick-exit:hover { background: #000; color: var(--yellow); }
.quick-exit:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.quick-exit-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 12px; line-height: 1; }
/* Que el botón no tape lo último de la página. */
.site-footer { padding-bottom: 84px; }

/* ---------- ¿Necesitas ayuda? ---------- */
.help-box { margin-block: 8px 40px; }
.help-box-inner { padding: 24px 26px; border-left: 6px solid var(--yellow); border-radius: 0 var(--radius) var(--radius) 0; background: var(--bg-soft); }
.help-box-title { margin: 0 0 8px; font-weight: 800; font-size: 26px; }
.help-box-lead { margin: 0 0 14px; font-size: 17px; }
.help-box-resources { font-size: 16px; }
.help-box-resources :where(ul) { margin: 0 0 14px; padding-left: 1.2em; }
.help-box-resources :where(li) { margin-bottom: 6px; }
.help-box-resources :where(a) { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--yellow-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.help-widget-title { margin: 0 0 6px; font-family: var(--sans); font-size: 15px; }
.help-box-admin { margin: 0 0 14px; padding: 10px 12px; border: 2px dashed #b08a00; font-size: 15px; background: #fff8dc; }
.help-box-safety { margin: 0; padding-top: 12px; border-top: 1px solid #d9d9d9; font-size: 14px; color: var(--ink-2); }
.data-page + .help-box { margin-top: 0; }

/* ---------- Compartir ---------- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 20px; }
.share-label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.share-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.share-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 40px; min-height: 40px; padding: 0 10px;
	border: 1px solid #c9c9c9; border-radius: 999px;
	background: #fff; color: var(--ink);
	font-size: 14px; font-weight: 600; text-decoration: none;
	transition: background-color .15s, color .15s, border-color .15s;
}
.share-btn svg { width: 18px; height: 18px; fill: currentColor; }
.share-btn svg[fill="none"] { fill: none; }
.share-btn:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.share-copy, .share-native { padding: 0 14px; }
.share-copy.is-done { border-color: #1a7f45; background: #1a7f45; color: #fff; }
.entry-footer .share { margin-top: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.entry-footer .tags + .share, .entry-footer .share + .tags { margin-top: 20px; }

/* ---------- Tarjetas sin imagen y búsqueda ---------- */
.post-card .thumb-empty { display: grid; place-items: center; color: #9a9ca1; background: linear-gradient(135deg, var(--bg-soft) 0%, #e4e4e1 100%); position: relative; }
.post-card .thumb-empty::before { content: ""; position: absolute; left: 22px; top: 18px; width: 7px; height: 30px; background: var(--yellow); transform: skewX(-18deg); }
.post-card .thumb-empty svg { width: 54px; height: 54px; transition: transform .3s; }
.post-card:hover .thumb-empty svg { transform: scale(1.08); }
.post-card-excerpt { margin: 0; padding: 0 6px; font-size: 15px; color: var(--ink-2); }
.search-count { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

@media (max-width: 600px) {
	.quick-exit { padding: 6px 14px 6px 8px; font-size: 14px; }
	.help-box-inner { padding: 20px 18px; }
	.help-box-title { font-size: 23px; }
	.share-copy .share-copy-label, .share-native span { font-size: 13px; }
}
@media print { .quick-exit, .share, .help-box-admin { display: none; } }

/* ---------- Veredicto, actualización, corrección, "Lee también" ----------
   Colores con contraste AA sobre texto blanco; el veredicto siempre va
   escrito, el color solo refuerza. */
.verdict { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 12px 4px 10px; border-radius: 999px; background: var(--verdict-bg, #4b5563); color: #fff; font-size: 14px; line-height: 1.3; }
.verdict .verdict-label { font-weight: 500; opacity: .9; }
.verdict strong { font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }
.verdict::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.verdict.is-false { --verdict-bg: #b3261e; }
.verdict.is-misleading { --verdict-bg: #9a4a00; }
.verdict.is-unproven { --verdict-bg: #4b5563; }
.verdict.is-mostly { --verdict-bg: #0f6b63; }
.verdict.is-true { --verdict-bg: #166534; }
.verdict-card { margin: 0 6px 8px; font-size: 12px; padding: 3px 10px 3px 8px; }
.verdict-card .verdict-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.verdict-large { margin-top: 18px; font-size: 16px; padding: 6px 16px 6px 12px; }
.entry-updated { color: var(--ink-2); font-weight: 600; }
.entry-updated::before { content: "· "; font-weight: 400; color: var(--muted); }

.correction { margin-block: 8px 32px; }
.correction > * { margin: 0; }
.correction { font-size: 16px; }
.correction-title { margin-bottom: 6px; font-family: var(--sans); font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.correction p { padding: 14px 18px; border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; }
.correction-title + p { margin-top: 8px; }

.related { margin-block: 16px 56px; }
.related-title { margin-bottom: 24px; font-size: 30px; }
.related .post-card-title { font-size: 22px; }

/* ---------- Responsive (breakpoints del mockup: 1100 / 900 / 600) ---------- */
@media (max-width: 1100px) {
	.menu > .menu-item > a { font-size: 14px; }
	.site-tagline { display: none; }
	.sections-grid { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
	.sections-grid > li:nth-child(3) .section-item { border-left: 0; padding-left: 36px; }
	.featured { grid-template-columns: 1fr; }
	.feature-main h2 { margin-right: 0; }
	.footer-row { flex-wrap: wrap; justify-content: flex-start; gap: 32px 64px; }
	.footer-row > * + * { padding-left: 0; border-left: 0; }
	.footer-brand, .footer-nav { flex-basis: 100%; }
}

@media (max-width: 900px) {
	.social-links { display: none; }
	.menu-toggle { display: inline-flex; }
	.site-logo { font-size: 34px; }
	.logo-lupa { width: 36px; height: 36px; }
	.js .primary-nav { display: none; }
	.js .primary-nav.open { display: block; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; overscroll-behavior: contain; }
	.primary-nav .menu { flex-direction: column; padding-bottom: 12px; }
	.menu > .menu-item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
	.menu > .menu-item > a { flex: 1; padding: 13px 0; border-bottom: 0; }
	.menu > .menu-item:first-child.current-menu-item > a { font-size: 15px; }
	.menu > .current-menu-item > a, .menu > .current-menu-ancestor > a { box-shadow: inset 4px 0 0 var(--yellow); padding-left: 12px; }
	.sub-toggle { width: 44px; height: 44px; }
	.sub-menu {
		position: static; display: none; right: auto;
		width: 100%; padding: 0 0 8px 12px;
		border: 0; box-shadow: none;
		opacity: 1; visibility: visible; transform: none;
	}
	.menu-item-has-children:hover > .sub-menu,
	.menu-item-has-children:focus-within > .sub-menu { display: none; }
	.menu-item-has-children.open > .sub-menu { display: block; }
	.feature-main { grid-template-columns: 1fr; }
	.feature-main-text { padding: 24px; }
	.feature-main h2 { margin-right: 0; }
	.feature-main-img { height: 280px; }
	.posts-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
	:root { --gutter: 16px; }
	body { font-size: 16px; }
	.header-top { gap: 12px; padding-block: 12px; }
	.header-actions { gap: 4px; }
	.header-actions .btn { min-height: 40px; padding: 8px 12px; font-size: 14px; }
	.site-logo { font-size: 28px; }
	.logo-lupa { width: 30px; height: 30px; }
	.custom-logo { height: 46px; }
	.footer-logo-img img { height: 60px; }
	.sections-grid { grid-template-columns: 1fr; row-gap: 0; padding-block: 8px; }
	.section-item, .sections-grid > li:first-child .section-item, .sections-grid > li:nth-child(3) .section-item { padding: 12px 0; border-left: 0; }
	.sections-grid > li + li .section-item { border-top: 1px solid #d9d9d9; }
	.section-item svg { width: 32px; height: 32px; }
	.featured { margin-top: 16px; }
	.feature-main-img { height: 220px; }
	.feature-main-img .sun { width: 130px; height: 130px; }
	.posts-grid { grid-template-columns: 1fr; }
	.slash-title { font-size: 30px; }
	.link-plain { margin-left: 0; }
	.post-card-title { font-size: 23px; }
	.footer-row { flex-direction: column; }
	:where(.entry-content) { font-size: 18px; }
	.entry-header { padding-top: 32px; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { text-align: left; }
	.search-form { flex-wrap: wrap; }
}

@media (max-width: 380px) {
	.site-logo { font-size: 24px; }
	.logo-lupa { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	/* Solo lo del tema: DataMaps maneja su propio movimiento. */
	:where(.site-header, .sections-bar, .featured, .latest, .archive-list, .site-footer) :where(*, *::before, *::after):not(.rjdm, .rjdm *) { animation: none !important; transition: none !important; }
	.js .mini-chart .line { stroke-dashoffset: 0; }
}

@media print {
	.site-header, .site-footer, .sections-bar, .load-more-wrap, .filters, .post-navigation { display: none; }
	body { font-size: 12pt; }
}
