/*!
 * Afiliados Contenido: estilos de los bloques afc-* (ver plantillas/bloques.md).
 * Un solo archivo, sin JavaScript, sin fuentes, sin emojis ni peticiones externas.
 *
 * Colores con variables CSS. Para adaptarlo a cada web basta con esto en
 * Apariencia > Personalizar > CSS adicional (o en el CSS del tema):
 *     :root { --afc-accent: #2e7d32; }
 * Los textos heredan el color del tema; los fondos son tintes transparentes,
 * así que funcionan sobre fondos claros y oscuros. La excepción son las tablas
 * (fondo opaco --afc-fondo, blanco por defecto): en una web oscura o de color,
 *     :root { --afc-fondo: #1b1b1b; }
 */

/* ------------------------------------------------------------------
 * 1. Variables (especificidad 0: cualquier :root del tema las pisa)
 * ------------------------------------------------------------------ */
:where(:root) {
	--afc-accent: #1a6b8f;                   /* color principal: bordes, números, iconos */
	--afc-on-accent: #fff;                   /* texto sobre el color principal */
	--afc-ok: #1b7a3a;                       /* a favor, consejos */
	--afc-ko: #b42318;                       /* en contra */
	--afc-warn: #a15c00;                     /* avisos */
	--afc-info: #1d5fa8;                     /* información */
	--afc-border: rgba(127, 127, 127, 0.35); /* igual que las tarjetas afam */
	--afc-radius: 8px;                       /* igual que las tarjetas afam */
	--afc-fondo: #fff;                       /* fondo opaco de las tablas: el del contenido de la web */
	--afc-veredicto-boton: 14em;             /* hueco del botón en la elección rápida (pantallas anchas) */
	--afc-space: 1.75em;                     /* separación vertical entre componentes */
	--afc-indice-titulo: "En este artículo"; /* título del índice ("none" para quitarlo) */
	--afc-autor-titulo: "Sobre el autor";    /* rótulo de la caja del autor */
}

/* ------------------------------------------------------------------
 * 2. Base común
 * ------------------------------------------------------------------ */
:is(.afc-veredicto, .afc-indice, .afc-pros-contras, .afc-tabla, .is-style-afc-tabla, .afc-nota,
	.is-style-afc-nota-consejo, .is-style-afc-nota-aviso, .is-style-afc-nota-info, .afc-faq,
	.afc-autor, .afc-cta, .afc-pasos, .is-style-afc-pasos, .afc-resumen) {
	box-sizing: border-box;
	max-width: 100%;
	margin-top: var(--afc-space);
	margin-bottom: var(--afc-space);
	overflow-wrap: break-word;
}

/* Cajas */
:is(.afc-veredicto, .afc-indice, .afc-pros, .afc-contras, .afc-nota, .is-style-afc-nota-consejo,
	.is-style-afc-nota-aviso, .is-style-afc-nota-info, .afc-autor, .afc-cta, .afc-resumen) {
	box-sizing: border-box;
	border: 1px solid var(--afc-border);
	border-radius: var(--afc-radius);
}

/* Relleno: "body" sube la especificidad lo justo para ganar a .has-global-padding (temas de bloques) */
body :is(.afc-veredicto, .afc-indice, .afc-pros, .afc-contras, .afc-nota, .is-style-afc-nota-consejo,
	.is-style-afc-nota-aviso, .is-style-afc-nota-info, .afc-autor, .afc-cta, .afc-resumen) {
	padding: 1em 1.15em;
}

@media (min-width: 600px) {
	body :is(.afc-veredicto, .afc-indice, .afc-pros, .afc-contras, .afc-nota, .is-style-afc-nota-consejo,
		.is-style-afc-nota-aviso, .is-style-afc-nota-info, .afc-autor, .afc-cta, .afc-resumen) {
		padding: 1.25em 1.5em;
	}
}

:is(.afc-veredicto, .afc-pros, .afc-contras, .afc-nota, .is-style-afc-nota-consejo,
	.is-style-afc-nota-aviso, .is-style-afc-nota-info, .afc-autor, .afc-cta, .afc-resumen, :is(.afc-veredicto, .afc-pros, .afc-contras, .afc-nota, .is-style-afc-nota-consejo,
	.is-style-afc-nota-aviso, .is-style-afc-nota-info, .afc-autor, .afc-cta, .afc-resumen) > .wp-block-group__inner-container) > :first-child {
	margin-top: 0;
}

:is(.afc-veredicto, .afc-pros, .afc-contras, .afc-nota, .is-style-afc-nota-consejo,
	.is-style-afc-nota-aviso, .is-style-afc-nota-info, .afc-autor, .afc-cta, .afc-resumen, :is(.afc-veredicto, .afc-pros, .afc-contras, .afc-nota, .is-style-afc-nota-consejo,
	.is-style-afc-nota-aviso, .is-style-afc-nota-info, .afc-autor, .afc-cta, .afc-resumen) > .wp-block-group__inner-container) > :last-child {
	margin-bottom: 0;
}

/* Hijos directos de las cajas. En temas clásicos (Orbital, Twenty Twenty-One…) WordPress mete el
   contenido de los grupos en .wp-block-group__inner-container, por eso los selectores lo contemplan. */

/* Títulos dentro de las cajas: compactos, con el tamaño del texto */
:is(.afc-veredicto, .afc-resumen, .afc-cta, :is(.afc-veredicto, .afc-resumen, .afc-cta) > .wp-block-group__inner-container) > :is(h2, h3, h4) {
	margin: 0 0 0.6em;
	font-size: 1.25em;
	line-height: 1.3;
}

/* Negritas claras aunque el tema use una fuente fina */
:is(.afc-veredicto, .afc-nota, .is-style-afc-nota-consejo, .is-style-afc-nota-aviso, .is-style-afc-nota-info,
	.afc-autor, .afc-cta, .afc-pasos, .is-style-afc-pasos, .afc-resumen) strong {
	font-weight: 700;
}

/* Enlaces y foco visibles en todos los componentes */
:is(.afc-veredicto, .afc-indice, .afc-pros-contras, .afc-tabla, .is-style-afc-tabla, .afc-nota,
	.is-style-afc-nota-consejo, .is-style-afc-nota-aviso, .is-style-afc-nota-info, .afc-faq,
	.afc-autor, .afc-cta, .afc-pasos, .is-style-afc-pasos, .afc-resumen) a:focus-visible {
	outline: 2px solid var(--afc-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Listas sin viñetas del navegador (las pone el componente) */
:is(.afc-veredicto, .afc-resumen, .afc-pros, .afc-contras) :is(ul, ol),
.afc-indice {
	margin-left: 0;
	padding-left: 0;
	list-style: none;
}

/* ------------------------------------------------------------------
 * 3. Veredicto rápido
 * ------------------------------------------------------------------ */
.afc-veredicto {
	border: 2px solid var(--afc-accent);
	background: rgba(127, 127, 127, 0.06);
	background: color-mix(in srgb, var(--afc-accent) 6%, transparent);
}

:is(.afc-veredicto, :is(.afc-veredicto) > .wp-block-group__inner-container) > :is(h2, h3, h4)::before {
	content: "★";
	margin-right: 0.35em;
	color: var(--afc-accent);
}

.afc-veredicto li {
	display: flow-root;
	margin: 0;
	padding: 0.75em 0;
	border-top: 1px solid var(--afc-border);
}

.afc-veredicto li:first-child {
	border-top: 0;
	padding-top: 0.25em;
}

.afc-veredicto li:last-child {
	padding-bottom: 0;
}

/* Botón debajo del texto: el del plugin (.afam-field) o un enlace directo (a.afam-button, p.mg-amz) */
.afc-veredicto li .afam-field {
	display: block;
	margin-top: 0.5em;
}

:where(.afc-veredicto li) > :is(.mg-amz, a.afam-button) {
	display: block;
	margin: 0.5em 0 0;
}

:where(.afc-veredicto li) > a.afam-button {
	width: fit-content;
}

/* En pantallas anchas, el botón a la derecha de su línea, en el hueco --afc-veredicto-boton */
@media (min-width: 600px) {
	.afc-veredicto li,
	.afc-veredicto li:first-child,
	.afc-veredicto li:last-child {
		position: relative;
		padding: 0.85em var(--afc-veredicto-boton) 0.85em 0;
	}

	/* Sin botón no se reserva el hueco */
	.afc-veredicto li:not(:has(.afam-field, .afam-button, .mg-amz)) {
		padding-right: 0;
	}

	.afc-veredicto li .afam-field {
		position: absolute;
		top: 50%;
		right: 0;
		max-width: calc(var(--afc-veredicto-boton) - 0.5em);
		margin: 0;
		transform: translateY(-50%);
	}

	/* Enlaces directos: el margen izquierdo limita su ancho al hueco */
	:where(.afc-veredicto li) > :is(.mg-amz, a.afam-button) {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		height: fit-content;
		margin: auto 0 auto calc(100% - var(--afc-veredicto-boton) + 0.5em);
	}
}

/* ------------------------------------------------------------------
 * 4. Índice
 * ------------------------------------------------------------------ */
.afc-indice {
	background: rgba(127, 127, 127, 0.05);
	background: color-mix(in srgb, var(--afc-accent) 5%, transparent);
}

.afc-indice::before {
	content: var(--afc-indice-titulo);
	display: block;
	margin-bottom: 0.5em;
	font-weight: 700;
	column-span: all;
}

/* Relleno, no margen: así las dos columnas empiezan a la misma altura */
.afc-indice li {
	position: relative;
	margin: 0;
	padding: 0.15em 0 0.15em 1.3em;
	break-inside: avoid;
}

.afc-indice li::before {
	content: "›";
	position: absolute;
	left: 0.2em;
	color: var(--afc-accent);
	font-weight: 700;
}

.afc-indice li :is(ul, ol) {
	margin: 0.15em 0 -0.15em;
	padding-left: 0;
	list-style: none;
	font-size: 0.95em;
}

@media (min-width: 782px) {
	.afc-indice:has(> li:nth-child(6)) {
		column-count: 2;
		column-gap: 2em;
	}
}

/* ------------------------------------------------------------------
 * 5. Pros y contras
 * ------------------------------------------------------------------ */
.wp-block-columns.afc-pros-contras {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1em;
}

@media (min-width: 600px) {
	.wp-block-columns.afc-pros-contras {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.afc-pros-contras > .wp-block-column {
	margin: 0;
	min-width: 0;
}

.afc-pros {
	border-top: 4px solid var(--afc-ok);
	background: rgba(127, 127, 127, 0.05);
	background: color-mix(in srgb, var(--afc-ok) 6%, transparent);
}

.afc-contras {
	border-top: 4px solid var(--afc-ko);
	background: rgba(127, 127, 127, 0.05);
	background: color-mix(in srgb, var(--afc-ko) 6%, transparent);
}

:is(.afc-pros, .afc-contras) > :is(h3, h4, h5, p:first-child) {
	margin: 0 0 0.6em;
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1.3;
}

:is(.afc-pros, .afc-contras) > :is(h3, h4, h5)::before {
	display: inline-block;
	width: 1.45em;
	height: 1.45em;
	margin-right: 0.45em;
	border-radius: 50%;
	color: #fff;
	font-size: 0.85em;
	line-height: 1.45em;
	text-align: center;
	vertical-align: 0.1em;
}

.afc-pros > :is(h3, h4, h5)::before {
	content: "✓";
	background: var(--afc-ok);
}

.afc-contras > :is(h3, h4, h5)::before {
	content: "✕";
	background: var(--afc-ko);
}

:is(.afc-pros, .afc-contras) li {
	position: relative;
	margin: 0.4em 0;
	padding-left: 1.5em;
}

:is(.afc-pros, .afc-contras) li::before {
	position: absolute;
	left: 0.1em;
	font-weight: 700;
}

.afc-pros li::before {
	content: "✓";
	color: var(--afc-ok);
}

.afc-contras li::before {
	content: "✕";
	color: var(--afc-ko);
}

/* ------------------------------------------------------------------
 * 6. Tabla comparativa (se desplaza dentro de su caja, nunca la página)
 * ------------------------------------------------------------------ */
figure:is(.afc-tabla, .is-style-afc-tabla) {
	display: block;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	border: 1px solid var(--afc-border);
	border-radius: var(--afc-radius);
	scrollbar-width: thin;
	scrollbar-color: var(--afc-accent) transparent;
}

/* Anchos automáticos (gana a .wp-block-table .has-fixed-layout del núcleo). "display" y bordes
   separados: para la columna fija (hay temas que ponen las tablas en "block" en el móvil). */
:is(.afc-tabla, .is-style-afc-tabla) :is(table, table.has-fixed-layout) {
	display: table;
	width: 100%;
	min-width: 100%;
	margin: 0;
	border: 0;
	border-spacing: 0;
	border-collapse: separate;
	table-layout: auto;
	font-size: 0.9em;
	line-height: 1.45;
}

/* Con 4 o más columnas, en el móvil se desplaza en vez de aplastarse */
@media (max-width: 781px) {
	:is(.afc-tabla, .is-style-afc-tabla) table:has(tr > :nth-child(4)) {
		min-width: 34em;
	}

	:is(.afc-tabla, .is-style-afc-tabla) table:has(tr > :nth-child(5)) {
		min-width: 42em;
	}

	/* …y la primera columna se queda fija */
	:is(.afc-tabla, .is-style-afc-tabla) table:has(tr > :nth-child(4)) tr > :first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		max-width: 9em;
		box-shadow: 1px 0 var(--afc-border);
	}
}

figure:is(.afc-tabla, .is-style-afc-tabla) :is(thead, tbody, tfoot) {
	border: 0;
}

/* Fondos opacos (los pide la columna fija): el tinte va en una capa sobre --afc-fondo */
figure:is(.afc-tabla, .is-style-afc-tabla) :is(th, td) {
	padding: 0.65em 0.7em;
	border: 0;
	border-bottom: 1px solid var(--afc-border);
	background: var(--afc-fondo);
	text-align: left;
	vertical-align: middle;
}

/* Sin cortar palabras por la mitad (el núcleo pone word-break: break-word en .has-fixed-layout) */
figure:is(.afc-tabla, .is-style-afc-tabla) :is(table, .has-fixed-layout) :is(th, td) {
	overflow-wrap: normal;
	word-break: normal;
}

figure:is(.afc-tabla, .is-style-afc-tabla) thead :is(th, td) {
	border-bottom: 2px solid var(--afc-accent);
	background: linear-gradient(#7f7f7f1f, #7f7f7f1f) var(--afc-fondo);
	font-weight: 700;
}

/* Con color-mix(), cabecera con el tinte del acento (sin él, gris) */
@supports (color: color-mix(in srgb, red, red)) {
	figure:is(.afc-tabla, .is-style-afc-tabla) thead :is(th, td) {
		background: color-mix(in srgb, var(--afc-accent) 12%, var(--afc-fondo));
	}
}

figure:is(.afc-tabla, .is-style-afc-tabla) tbody tr:nth-child(even) > * {
	background: linear-gradient(#7f7f7f12, #7f7f7f12) var(--afc-fondo);
}

figure.wp-block-table.is-style-stripes:is(.afc-tabla) tbody tr:nth-child(odd) {
	background-color: transparent;
}

figure:is(.afc-tabla, .is-style-afc-tabla) tbody tr:last-child > * {
	border-bottom: 0;
}

figure:is(.afc-tabla, .is-style-afc-tabla) tbody > tr > :first-child {
	font-weight: 600;
}

figure:is(.afc-tabla, .is-style-afc-tabla) figcaption {
	position: sticky;
	left: 0;
	margin: 0;
	padding: 0.5em 0.8em;
	border-top: 1px solid var(--afc-border);
	font-size: 0.85em;
	text-align: left;
}

:is(.afc-tabla, .is-style-afc-tabla) .afam-button {
	padding: 0.5em 0.85em;
	font-size: 0.92em;
	white-space: nowrap;
}

/* ------------------------------------------------------------------
 * 7. Notas: consejo, aviso, información (icono: disco del color de la nota
 *    con el dibujo en blanco, SVG en línea)
 * ------------------------------------------------------------------ */
:is(.afc-nota, .is-style-afc-nota-consejo, .is-style-afc-nota-aviso, .is-style-afc-nota-info) {
	--afc-nota-color: var(--afc-accent);
	--afc-nota-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6M10 3v6l-3 5h10l-3-5V3M12 14v7'/%3E%3C/svg%3E");
	position: relative;
	border-left: 4px solid var(--afc-nota-color);
	background: rgba(127, 127, 127, 0.07);
	background: color-mix(in srgb, var(--afc-nota-color) 8%, transparent);
}

body :is(.afc-nota, .is-style-afc-nota-consejo, .is-style-afc-nota-aviso, .is-style-afc-nota-info) {
	padding-left: 3.1em;
}

@media (min-width: 600px) {
	body :is(.afc-nota, .is-style-afc-nota-consejo, .is-style-afc-nota-aviso, .is-style-afc-nota-info) {
		padding-left: 3.4em;
	}
}

:is(.afc-nota, .is-style-afc-nota-consejo, .is-style-afc-nota-aviso, .is-style-afc-nota-info)::before {
	content: "";
	position: absolute;
	top: 1.05em;
	left: 0.8em;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	background: var(--afc-nota-color) var(--afc-nota-img) center / 62% no-repeat;
}

@media (min-width: 600px) {
	:is(.afc-nota, .is-style-afc-nota-consejo, .is-style-afc-nota-aviso, .is-style-afc-nota-info)::before {
		top: 1.3em;
		left: 0.95em;
	}
}

:is(.afc-nota--consejo, .is-style-afc-nota-consejo) {
	--afc-nota-color: var(--afc-ok);
	--afc-nota-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M8 14a6 6 0 1 1 8 0c-.7.7-1 1.3-1 2H9c0-.7-.3-1.3-1-2z'/%3E%3C/svg%3E");
}

:is(.afc-nota--aviso, .is-style-afc-nota-aviso) {
	--afc-nota-color: var(--afc-warn);
	--afc-nota-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v9M12 18.5h.01'/%3E%3C/svg%3E");
}

:is(.afc-nota--info, .is-style-afc-nota-info) {
	--afc-nota-color: var(--afc-info);
	--afc-nota-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 10.5V19M12 5.5h.01'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------
 * 8. Preguntas frecuentes (details/summary, sin JavaScript)
 * ------------------------------------------------------------------ */
.afc-faq details {
	margin: 0.6em 0;
	padding: 0;
	border: 1px solid var(--afc-border);
	border-radius: var(--afc-radius);
}

.afc-faq details[open] {
	background: rgba(127, 127, 127, 0.04);
	background: color-mix(in srgb, var(--afc-accent) 4%, transparent);
}

.afc-faq summary {
	position: relative;
	display: block;
	padding: 0.85em 3em 0.85em 1.1em;
	border-radius: var(--afc-radius);
	font-weight: 600;
	line-height: 1.4;
	list-style: none;
	cursor: pointer;
}

.afc-faq summary::-webkit-details-marker {
	display: none;
}

/* Indicador: flecha que gira al abrir */
.afc-faq summary::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 1.2em;
	width: 0.55em;
	height: 0.55em;
	border-right: 2px solid var(--afc-accent);
	border-bottom: 2px solid var(--afc-accent);
	transform: translateY(-70%) rotate(45deg);
	transition: transform 0.2s ease;
}

.afc-faq details[open] > summary::after {
	transform: translateY(-25%) rotate(-135deg);
}

.afc-faq details[open] > summary {
	border-bottom: 1px solid var(--afc-border);
	border-radius: var(--afc-radius) var(--afc-radius) 0 0;
}

.afc-faq summary:hover {
	background: rgba(127, 127, 127, 0.06);
}

.afc-faq summary:focus-visible {
	outline: 2px solid var(--afc-accent);
	outline-offset: 2px;
}

.afc-faq details > :not(summary) {
	margin-left: 1.1em;
	margin-right: 1.1em;
}

.afc-faq details > :not(summary):last-child {
	margin-bottom: 1em;
}

.afc-faq details > summary + * {
	margin-top: 0.85em;
}

@media (prefers-reduced-motion: reduce) {
	.afc-faq summary::after {
		transition: none;
	}
}

/* ------------------------------------------------------------------
 * 9. Fecha de actualización
 * ------------------------------------------------------------------ */
.afc-actualizado {
	font-size: 0.875em;
	line-height: 1.5;
}

/* Calendario con el color del texto (máscara SVG en línea) */
@supports (mask: none) or (-webkit-mask: none) {
	.afc-actualizado::before {
		--afc-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
		content: "";
		display: inline-block;
		width: 1em;
		height: 1em;
		margin-right: 0.4em;
		background: currentColor;
		vertical-align: -0.125em;
		-webkit-mask: var(--afc-ico) center / contain no-repeat;
		mask: var(--afc-ico) center / contain no-repeat;
	}
}

/* ------------------------------------------------------------------
 * 10. Caja del autor (admite una imagen opcional, que se muestra redonda)
 * ------------------------------------------------------------------ */
.afc-autor {
	display: flow-root;
	background: rgba(127, 127, 127, 0.05);
}

.afc-autor::before {
	content: var(--afc-autor-titulo);
	display: block;
	margin-bottom: 0.4em;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

:is(.afc-autor, :is(.afc-autor) > .wp-block-group__inner-container) > :is(p, h2, h3, h4) {
	margin-top: 0.3em;
	margin-bottom: 0.3em;
}

:is(.afc-autor, :is(.afc-autor) > .wp-block-group__inner-container) > :is(.wp-block-image, figure) {
	float: left;
	width: 64px;
	max-width: 64px;
	margin: 0.2em 0 0.4em 0;
	padding-right: 1em;
	box-sizing: content-box;
}

:is(.afc-autor, :is(.afc-autor) > .wp-block-group__inner-container) > :is(.wp-block-image, figure) img {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
}

/* ------------------------------------------------------------------
 * 11. Llamada a la acción final
 * ------------------------------------------------------------------ */
.afc-cta {
	border: 2px solid var(--afc-accent);
	background: rgba(127, 127, 127, 0.07);
	background: color-mix(in srgb, var(--afc-accent) 8%, transparent);
	text-align: center;
}

.afc-cta .wp-block-buttons {
	justify-content: center;
}

.afc-cta :is(.afam-card, .afam-list, .afam-grid, .afam-table-wrap) {
	text-align: left;
}

/* ------------------------------------------------------------------
 * 12. Pasos numerados
 * ------------------------------------------------------------------ */
:is(.afc-pasos, .is-style-afc-pasos) {
	margin-left: 0;
	padding-left: 0;
	list-style: none;
	counter-reset: afc-paso;
}

:is(.afc-pasos, .is-style-afc-pasos) > li {
	position: relative;
	min-height: 2em;
	margin: 0;
	padding: 0.15em 0 1.1em 3em;
	counter-increment: afc-paso;
}

:is(.afc-pasos, .is-style-afc-pasos) > li::before {
	content: counter(afc-paso);
	position: absolute;
	top: 0;
	left: 0;
	width: 2em;
	height: 2em;
	border-radius: 50%;
	background: var(--afc-accent);
	color: var(--afc-on-accent);
	font-weight: 700;
	line-height: 2em;
	text-align: center;
}

/* Línea que une los pasos */
:is(.afc-pasos, .is-style-afc-pasos) > li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 2.25em;
	bottom: 0.25em;
	left: calc(1em - 1px);
	width: 2px;
	background: var(--afc-border);
}

:is(.afc-pasos, .is-style-afc-pasos) > li:last-child {
	padding-bottom: 0;
}

/* ------------------------------------------------------------------
 * 13. Puntos clave / resumen
 * ------------------------------------------------------------------ */
.afc-resumen {
	border-color: rgba(127, 127, 127, 0.35);
	border-color: color-mix(in srgb, var(--afc-accent) 35%, transparent);
	background: rgba(127, 127, 127, 0.07);
	background: color-mix(in srgb, var(--afc-accent) 7%, transparent);
}

:is(.afc-resumen, :is(.afc-resumen) > .wp-block-group__inner-container) > p:first-child {
	margin-bottom: 0.4em;
	font-size: 1.1em;
}

.afc-resumen li {
	position: relative;
	margin: 0.4em 0;
	padding-left: 1.4em;
}

.afc-resumen li::before {
	content: "";
	position: absolute;
	top: 0.55em;
	left: 0.15em;
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: var(--afc-accent);
}

/* ------------------------------------------------------------------
 * 14. Convivencia con las tarjetas del plugin Afiliados Amazon (afam-*)
 * ------------------------------------------------------------------ */
:is(.afc-veredicto, .afc-cta, .afc-resumen, .afc-nota) .afam {
	margin: 1em 0;
}

:is(.afc-veredicto, .afc-cta, .afc-resumen, .afc-nota, :is(.afc-veredicto, .afc-cta, .afc-resumen, .afc-nota) > .wp-block-group__inner-container) > .afam:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------
 * 15. Impresión
 * ------------------------------------------------------------------ */
@media print {
	figure:is(.afc-tabla, .is-style-afc-tabla) {
		overflow: visible;
	}

	:is(.afc-tabla, .is-style-afc-tabla) table {
		min-width: 0 !important;
	}
}

/* ------------------------------------------------------------------
 * 16. Compatibilidad con contenido antiguo (lo pinta includes/legado.php)
 *     Listados afc-cluster (orbital/cluster, asap/cluster, [orbital_cluster]),
 *     índice de [toc] (usa afc-indice), cajas, listas con icono y botones de
 *     Shortcodes Ultimate. Los colores que vienen en el contenido llegan como
 *     variables (--afc-caja-color, --afc-boton-fondo…); el texto, del tema.
 * ------------------------------------------------------------------ */

/* Sin max-width ni márgenes laterales: así respetan el ancho de contenido del tema
   (en los temas de bloques, el diseño "constrained" los centra). */

/* Listado: rejilla de tarjetas. Como mucho --afc-cluster-cols columnas y nunca
   más estrechas que 8.5rem (en el móvil, 2 por fila). */
body ul.afc-cluster {
	--afc-cluster-gap: 1rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(8.5rem, calc((100% - (var(--afc-cluster-cols, 3) - 1) * var(--afc-cluster-gap)) / var(--afc-cluster-cols, 3)))), 1fr));
	gap: var(--afc-cluster-gap);
	box-sizing: border-box;
	margin-top: var(--afc-space);
	margin-bottom: var(--afc-space);
	padding: 0;
	list-style: none;
}

body .afc-cluster > li {
	min-width: 0;
	margin: 0;
	padding: 0;
}

body .afc-cluster > li::before,
body .afc-cluster > li::marker {
	content: none;
}

body a.afc-cluster__enlace {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	box-sizing: border-box;
	border: 1px solid var(--afc-border);
	border-radius: var(--afc-radius);
	background: rgba(127, 127, 127, 0.04);
	background: color-mix(in srgb, var(--afc-accent) 4%, transparent);
	color: inherit;
	text-decoration: none;
	transition: border-color 0.15s ease;
}

body a.afc-cluster__enlace:hover {
	border-color: var(--afc-accent);
}

body a.afc-cluster__enlace:hover .afc-cluster__titulo {
	text-decoration: underline;
}

body a.afc-cluster__enlace:focus-visible {
	outline: 2px solid var(--afc-accent);
	outline-offset: 2px;
}

body .afc-cluster__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	border-radius: 0;
	aspect-ratio: var(--afc-cluster-ratio, 16 / 9);
	object-fit: cover;
}

body .afc-cluster__titulo {
	display: block;
	margin: 0;
	padding: 0.6em 0.75em 0.75em;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	overflow-wrap: anywhere;
}

/* Miniaturas cuadradas (thumbnailSize "thumbnail"): imagen entera, sin recortar */
body .afc-cluster--mini .afc-cluster__img {
	aspect-ratio: 1;
	object-fit: contain;
}

/* Una columna: filas con la imagen pequeña a la izquierda */
body ul.afc-cluster--lista {
	grid-template-columns: minmax(0, 1fr);
	gap: 0.6rem;
}

body .afc-cluster--lista a.afc-cluster__enlace {
	flex-direction: row;
	align-items: center;
}

body .afc-cluster--lista .afc-cluster__img {
	flex: 0 0 8rem;
	width: 8rem;
}

body .afc-cluster--lista .afc-cluster__titulo {
	padding: 0.6em 0.9em;
}

@media (prefers-reduced-motion: reduce) {
	body a.afc-cluster__enlace {
		transition: none;
	}
}

/* Índice de [toc]: la lista es afc-indice (sección 4); el nav no añade nada */
.afc-toc {
	margin-top: var(--afc-space);
	margin-bottom: var(--afc-space);
}

.afc-toc > .afc-indice {
	margin: 0;
}

/* Caja ([su_box]): borde superior del color de la caja; título con el color del texto */
.afc-caja {
	--afc-caja-color: var(--afc-accent);
	box-sizing: border-box;
	margin-top: var(--afc-space);
	margin-bottom: var(--afc-space);
	overflow-wrap: break-word;
	border: 1px solid var(--afc-border);
	border-top: 4px solid var(--afc-caja-color);
	border-radius: var(--afc-radius);
	background: rgba(127, 127, 127, 0.05);
	background: color-mix(in srgb, var(--afc-caja-color) 6%, transparent);
}

body .afc-caja__titulo {
	margin: 0;
	padding: 0.6em 1.15em;
	border-bottom: 1px solid var(--afc-border);
	font-weight: 700;
	line-height: 1.3;
}

body .afc-caja__contenido {
	padding: 0.9em 1.15em;
}

.afc-caja__contenido > :first-child {
	margin-top: 0;
}

.afc-caja__contenido > :last-child {
	margin-bottom: 0;
}

/* Lista con icono ([su_list]): el icono de la web va como viñeta (decorativo) */
body .afc-lista-iconos :is(ul, ol) {
	margin-left: 0;
	padding-left: 0;
	list-style: none;
}

body .afc-lista-iconos > :first-child {
	margin-top: 0;
}

body .afc-lista-iconos > :last-child {
	margin-bottom: 0;
}

body .afc-lista-iconos li {
	position: relative;
	margin: 0.4em 0;
	padding-left: 1.75em;
}

body .afc-lista-iconos li::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 1.1em;
	height: 1.1em;
	background: var(--afc-lista-icono, none) center / contain no-repeat;
}

body .afc-lista-iconos--simbolo li::before {
	content: var(--afc-lista-simbolo, "•");
	top: 0;
	width: auto;
	height: auto;
	background: none;
	color: var(--afc-lista-color, var(--afc-accent));
	font-weight: 700;
}

/* Botón ([su_button]) */
body .afc-boton-linea {
	display: block;
	margin-top: 1em;
	margin-bottom: 1em;
}

body .afc-boton-centro {
	text-align: center;
}

body :is(a, span).afc-boton,
body a.afc-boton:visited {
	display: inline-block;
	box-sizing: border-box;
	max-width: 100%;
	padding: 0.7em 1.4em;
	border-radius: var(--afc-radius);
	background: var(--afc-boton-fondo, var(--afc-accent));
	color: var(--afc-boton-texto, var(--afc-on-accent));
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	overflow-wrap: anywhere;
}

body a.afc-boton:hover {
	text-decoration: underline;
}

body a.afc-boton:focus-visible {
	outline: 2px solid var(--afc-accent);
	outline-offset: 2px;
}

body .afc-boton--ancho {
	min-width: min(100%, 18em);
}
