/**
 * Blog editorial styles (efeonce-editorial-blocks/includes/editorial). Front end and editor.
 *
 * Each rule is scoped to its own style class; unstyled native blocks keep the theme's look.
 * La órbita (review of 2026-10-24):
 * - Colors only from efeonceGraphicLine: navy #023c70 (text on paper), paper #f7f8f6, dark #001a33 and the accent of
 *   the post's topic line, which the plugin publishes per post as --eo-line-on-light / --eo-line-on-dark (same map as
 *   the blog home). Without them (editor, other pages) the Engine accent #0375db is the fallback.
 * - The accent only in graphics (≥ 3:1) or in text of 24 px or more; smaller text stays navy on paper, white on dark.
 * - No sphere as a bullet or ornament: one sphere per piece, and only where something is decided.
 * Design: greenhouse-eo docs/public-site/BLOG_EDITORIAL_BLOCK_STYLES_V1.md.
 */

.is-style-efeonce-destacado,
.is-style-efeonce-pasos,
.is-style-efeonce-recuadro,
.is-style-efeonce-tabla {
	--eo-ed-ink: #023c70;
	--eo-ed-muted: rgba(2, 60, 112, 0.72);
	--eo-ed-accent: var(--eo-line-on-light, #0375db);
	--eo-ed-panel: #f7f8f6;
	--eo-ed-line: rgba(2, 60, 112, 0.14);
	--eo-ed-mark: rgba(2, 60, 112, 0.5);
}

.dark-scheme .is-style-efeonce-destacado,
.dark-scheme .is-style-efeonce-pasos,
.dark-scheme .is-style-efeonce-recuadro,
.dark-scheme .is-style-efeonce-tabla {
	--eo-ed-ink: #ffffff;
	--eo-ed-muted: rgba(255, 255, 255, 0.72);
	--eo-ed-accent: var(--eo-line-on-dark, #0375db);
	--eo-ed-panel: #001a33;
	--eo-ed-line: rgba(255, 255, 255, 0.16);
	--eo-ed-mark: rgba(255, 255, 255, 0.6);
}

/* ------------------------------------------------------------------ Destacado y Cita (core/pullquote) */

/*
 * 0.8.0 (review of 2026-10-25): two functions, two tones, four styles of core/pullquote.
 * - Destacado (`efeonce-destacado`, navy; `efeonce-destacado-claro`, paper): the thesis a section stands on. No quotation
 *   marks (it is not a quote). La órbita voice: the open ring starts the line and the sphere closes it, replacing the
 *   final period; Bricolage 400 opens and <strong> (700) lands the idea. Without <strong>, the whole line is 700.
 *   Short lines (`is-eo-corta`, ≤ 80 characters, set by EO_Editorial_Styles::pullquote_classes) get a larger size.
 * - Cita (`efeonce-cita`, navy; `efeonce-cita-clara`, paper): a real quote with its attribution in <cite>. Quotation
 *   marks in their own column, Bricolage 400, attribution under a hairline.
 * The panels keep the wide halo of the line accent from the top corner (the 0.6.0 gradient; the operator rejected a
 * flat panel on 2026-10-25). One sphere per piece: the sphere is only in the Destacado and only when its line ends in a period.
 * Accent contrast measured: the Engine accent #0375db is 3.82:1 on #001a33 and 2.43:1 on #023c70, so the dark panel
 * stays #001a33 in the dark scheme too, separated by a hairline, instead of lightening to #023c70.
 */
.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro, .is-style-efeonce-cita, .is-style-efeonce-cita-clara) {
	--eo-dq-surface: #001a33;
	--eo-dq-ink: #ffffff;
	--eo-dq-muted: rgba(255, 255, 255, 0.7);
	--eo-dq-rule: rgba(255, 255, 255, 0.16);
	--eo-dq-border: transparent;
	--eo-dq-accent: var(--eo-line-on-dark, #36c8bf);
	--eo-dq-glow: var(--eo-dq-accent);
	--eo-dq-halo: 22%;
	position: relative;
	margin: 56px 0 !important;
	overflow: hidden;
	border: 1px solid var(--eo-dq-border) !important;
	border-radius: 24px;
	background: var(--eo-dq-surface);
	color: var(--eo-dq-ink);
	text-align: left;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado-claro, .is-style-efeonce-cita-clara) {
	--eo-dq-surface: #f7f8f6;
	--eo-dq-ink: #023c70;
	--eo-dq-muted: rgba(2, 60, 112, 0.72);
	--eo-dq-rule: rgba(2, 60, 112, 0.14);
	--eo-dq-border: rgba(2, 60, 112, 0.1);
	--eo-dq-accent: var(--eo-line-on-light, #0375db);
	--eo-dq-glow: var(--eo-dq-accent);
	--eo-dq-halo: 14%;
}

.dark-scheme .wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-cita) {
	--eo-dq-border: rgba(255, 255, 255, 0.14);
}

.dark-scheme .wp-block-pullquote:is(.is-style-efeonce-destacado-claro, .is-style-efeonce-cita-clara) {
	--eo-dq-surface: #023c70;
	--eo-dq-ink: #ffffff;
	--eo-dq-muted: rgba(255, 255, 255, 0.72);
	--eo-dq-rule: rgba(255, 255, 255, 0.16);
	--eo-dq-border: rgba(255, 255, 255, 0.12);
	--eo-dq-accent: #ffffff;
	--eo-dq-glow: var(--eo-line-on-dark, #36c8bf);
	--eo-dq-halo: 22%;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro, .is-style-efeonce-cita, .is-style-efeonce-cita-clara) blockquote {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro, .is-style-efeonce-cita, .is-style-efeonce-cita-clara) blockquote::before,
.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro, .is-style-efeonce-cita, .is-style-efeonce-cita-clara) blockquote::after {
	display: none !important;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro, .is-style-efeonce-cita, .is-style-efeonce-cita-clara) p {
	margin: 0 !important;
	color: var(--eo-dq-ink);
	font-family: "Bricolage Grotesque", sans-serif !important;
	font-variation-settings: "opsz" 96;
}

/* Destacado: thesis, ring → sphere. */
.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro)::before {
	content: none !important;
	display: none !important;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro) {
	padding: 52px 64px 56px !important;
	background:
		radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--eo-dq-glow) var(--eo-dq-halo), transparent) 0%, transparent 55%),
		var(--eo-dq-surface);
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro) p {
	max-width: 36ch;
	font-size: clamp(28px, 1rem + 2.4vw, 46px) !important;
	font-weight: 400;
	line-height: 1.12 !important;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro) p:not(:has(strong)) {
	font-weight: 700;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro) p strong {
	font-weight: 700;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro).is-eo-corta p {
	font-size: clamp(30px, 1rem + 3vw, 56px) !important;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro) p:first-child::before {
	content: "";
	display: inline-block;
	width: 0.34em;
	height: 0.34em;
	margin: 0 0.3em 0 0;
	border: max(2px, 0.055em) solid var(--eo-dq-accent);
	border-radius: 50%;
	vertical-align: 0.14em;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro):not(.is-eo-sin-esfera) p:last-of-type::after {
	content: "";
	display: inline-block;
	width: 0.2em;
	height: 0.2em;
	margin-left: 0.06em;
	border-radius: 50%;
	background: var(--eo-dq-accent);
	vertical-align: baseline;
}

.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro) cite {
	display: block;
	margin-top: 24px;
	color: var(--eo-dq-muted);
	font: 500 14px/1.5 "Poppins", sans-serif !important;
	font-style: normal;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

/* Cita: quotation marks in their own column, attribution under a hairline. */
.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara) {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	column-gap: 28px;
	padding: 52px 64px 48px 48px !important;
	background:
		radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--eo-dq-glow) var(--eo-dq-halo), transparent) 0%, transparent 55%),
		var(--eo-dq-surface);
}

.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara)::before {
	content: "";
	grid-column: 1;
	width: 64px;
	height: 47px;
	margin-top: 6px;
	background: var(--eo-dq-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 56'%3E%3Cpath d='M2.4 37C1 22 9 8 27 1l3.2 6.4C19 12.6 14.2 20 15 30z'/%3E%3Ccircle cx='15' cy='40' r='14'/%3E%3Cpath d='M43.4 37C42 22 50 8 68 1l3.2 6.4C60 12.6 55.2 20 56 30z'/%3E%3Ccircle cx='56' cy='40' r='14'/%3E%3C/svg%3E") no-repeat 0 0 / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 56'%3E%3Cpath d='M2.4 37C1 22 9 8 27 1l3.2 6.4C19 12.6 14.2 20 15 30z'/%3E%3Ccircle cx='15' cy='40' r='14'/%3E%3Cpath d='M43.4 37C42 22 50 8 68 1l3.2 6.4C60 12.6 55.2 20 56 30z'/%3E%3Ccircle cx='56' cy='40' r='14'/%3E%3C/svg%3E") no-repeat 0 0 / contain;
}

.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara) blockquote {
	grid-column: 2;
}

.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara) p {
	max-width: 44ch;
	font-size: clamp(24px, 1rem + 1.6vw, 36px) !important;
	font-weight: 400;
	line-height: 1.22 !important;
	letter-spacing: -0.02em;
	text-wrap: pretty;
}

.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara) cite {
	display: block;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--eo-dq-rule);
	color: var(--eo-dq-muted);
	font: 400 15px/1.5 "Poppins", sans-serif !important;
	font-style: normal;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara) cite :is(strong, b) {
	color: var(--eo-dq-ink);
	font-weight: 600;
}

.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara) cite a {
	color: var(--eo-dq-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 600px) {
	.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro, .is-style-efeonce-cita, .is-style-efeonce-cita-clara) {
		margin: 40px 0 !important;
		border-radius: 20px;
	}

	.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro) {
		padding: 36px 28px 40px !important;
	}

	.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro) p {
		max-width: none;
		font-size: 27px !important;
	}

	.wp-block-pullquote:is(.is-style-efeonce-destacado, .is-style-efeonce-destacado-claro).is-eo-corta p {
		font-size: 30px !important;
	}

	.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara) {
		grid-template-columns: 1fr;
		row-gap: 18px;
		padding: 32px 26px 30px !important;
	}

	.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara)::before {
		width: 44px;
		height: 32px;
		margin: 0;
	}

	.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara) blockquote {
		grid-column: 1;
	}

	.wp-block-pullquote:is(.is-style-efeonce-cita, .is-style-efeonce-cita-clara) p {
		font-size: 22px !important;
	}
}

/* ------------------------------------------------------------------ Pasos (ordered core/list) */

ol.is-style-efeonce-pasos {
	margin: 28px 0 36px !important;
	padding: 0 !important;
	list-style: none !important;
	counter-reset: eo-paso;
}

ol.is-style-efeonce-pasos > li {
	position: relative;
	margin: 0 !important;
	padding: 20px 0 20px 60px !important;
	border-top: 1px solid var(--eo-ed-line);
	counter-increment: eo-paso;
	list-style: none !important;
}

ol.is-style-efeonce-pasos > li:last-child {
	border-bottom: 1px solid var(--eo-ed-line);
}

ol.is-style-efeonce-pasos > li::marker {
	content: "";
}

/* The number is large text (28 px), so it may carry the accent; no tinted disc behind it. */
ol.is-style-efeonce-pasos > li::before {
	content: counter(eo-paso, decimal-leading-zero);
	position: absolute;
	top: 15px;
	left: 0;
	color: var(--eo-ed-accent);
	font-family: "DM Sans", sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
	ol.is-style-efeonce-pasos > li {
		padding-left: 52px !important;
	}

	ol.is-style-efeonce-pasos > li::before {
		font-size: 24px;
		top: 18px;
	}
}

/* ------------------------------------------------------------------ Recuadro (core/list) */

.is-style-efeonce-recuadro {
	margin: 28px 0 32px !important;
	padding: 24px 28px !important;
	border: 1px solid var(--eo-ed-line);
	border-radius: 16px;
	background: var(--eo-ed-panel);
	list-style: none !important;
}

.is-style-efeonce-recuadro > li {
	position: relative;
	margin: 0 0 12px !important;
	padding-left: 24px !important;
	list-style: none !important;
}

.is-style-efeonce-recuadro > li:last-child {
	margin-bottom: 0 !important;
}

.is-style-efeonce-recuadro > li::marker {
	content: "";
}

/* A short ink dash, not a sphere: the sphere never works as a bullet. */
.is-style-efeonce-recuadro > li::before {
	content: "";
	position: absolute;
	top: 0.78em;
	left: 0;
	width: 12px;
	height: 2px;
	border-radius: 1px;
	background: var(--eo-ed-mark);
}

@media (max-width: 600px) {
	.is-style-efeonce-recuadro {
		padding: 20px !important;
	}
}

/* ------------------------------------------------------------------ Tabla Efeonce (core/table, 0.6.0) */

/*
 * A paper panel with air on every side, so no cell touches the edge of the column. The header rule is the only accent
 * (a graphic); there are no stripes, only hairlines between rows. The first column names what each row compares.
 * Under 600 px each row is a card: the first cell is its title and every other cell shows the name of its column from
 * `data-label`, which the plugin copies from the header when the block renders (EO_Editorial_Styles::label_table_cells).
 */
figure.wp-block-table.is-style-efeonce-tabla {
	margin: 40px 0 !important;
	padding: 8px 28px 20px !important;
	overflow-x: auto;
	border: 1px solid var(--eo-ed-line) !important;
	border-radius: 20px;
	background: var(--eo-ed-panel);
}

.is-style-efeonce-tabla table {
	width: 100%;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: collapse;
	table-layout: auto !important;
	color: var(--eo-ed-ink);
	font-family: Inter, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	font-variant-numeric: tabular-nums;
}

.is-style-efeonce-tabla thead {
	border: 0 !important;
	border-bottom: 2px solid var(--eo-ed-accent) !important;
}

.is-style-efeonce-tabla th {
	padding: 18px 16px 14px !important;
	border: 0 !important;
	background: none !important;
	color: var(--eo-ed-ink);
	font-family: "DM Sans", sans-serif;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.005em;
	text-align: left;
	vertical-align: bottom;
}

.is-style-efeonce-tabla td {
	padding: 16px !important;
	border: 0 !important;
	border-top: 1px solid var(--eo-ed-line) !important;
	background: none !important;
	color: var(--eo-ed-ink);
	vertical-align: top;
}

.is-style-efeonce-tabla tbody tr {
	background: none !important;
}

.is-style-efeonce-tabla tbody tr:first-child td {
	border-top: 0 !important;
}

.is-style-efeonce-tabla td:first-child {
	font-weight: 600;
}

.is-style-efeonce-tabla :is(th, td):first-child {
	padding-left: 0 !important;
}

.is-style-efeonce-tabla :is(th, td):last-child {
	padding-right: 0 !important;
}

.is-style-efeonce-tabla figcaption {
	margin: 4px 0 0 !important;
	padding-top: 14px;
	border-top: 1px solid var(--eo-ed-line);
	color: var(--eo-ed-muted);
	font-family: Inter, sans-serif;
	font-size: 13px;
	text-align: left;
}

@media (max-width: 600px) {
	figure.wp-block-table.is-style-efeonce-tabla {
		margin: 32px 0 !important;
		padding: 4px 20px 16px !important;
		overflow: visible;
		border-radius: 16px;
	}

	.is-style-efeonce-tabla thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.is-style-efeonce-tabla :is(table, tbody, tr, td) {
		display: block;
		width: 100%;
	}

	.is-style-efeonce-tabla tbody tr {
		padding: 18px 0;
		border-top: 1px solid var(--eo-ed-line);
	}

	.is-style-efeonce-tabla tbody tr:first-child {
		border-top: 0;
	}

	.is-style-efeonce-tabla td {
		padding: 0 !important;
		border: 0 !important;
	}

	.is-style-efeonce-tabla td + td {
		margin-top: 12px;
	}

	.is-style-efeonce-tabla td:first-child {
		font-family: "DM Sans", sans-serif;
		font-size: 18px;
		font-weight: 700;
		line-height: 1.3;
	}

	.is-style-efeonce-tabla td[data-label]:not(:first-child)::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 2px;
		color: var(--eo-ed-muted);
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.06em;
		text-transform: uppercase;
	}

	.is-style-efeonce-tabla figcaption {
		margin-top: 0 !important;
	}
}
