/*
Theme Name: labajamar
Theme URI: https://labajamar.com
Author: Xavier Figueroa
Description: Tema de bloques para labajamar: notas sobre lo que asoma cuando uno se detiene a observar. Azul #0C3282 sobre blanco, Source Serif 4 e Instrument Serif, y una marea que baja a medida que se lee.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.2.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: labajamar

Fuentes: Source Serif 4 e Instrument Serif, SIL Open Font License 1.1.
*/

/* ==========================================================
   Tokens (los colores y tamaños vienen de theme.json)
   ========================================================== */
:root {
	--blue: var(--wp--preset--color--ink, #0C3282);
	--soft: var(--wp--preset--color--soft, rgba(12, 50, 130, .72));
	--rule: var(--wp--preset--color--rule, rgba(12, 50, 130, .15));
	--bg: var(--wp--preset--color--base, #fff);
	--font: var(--wp--preset--font-family--body);
	--font-display: var(--wp--preset--font-family--display);
	--fs-sm: var(--wp--preset--font-size--sm);
	--fs-base: var(--wp--preset--font-size--base);
	--fs-text: var(--wp--preset--font-size--text);
	--fs-md: var(--wp--preset--font-size--md);
	--fs-lg: var(--wp--preset--font-size--lg);
	--fs-xl: var(--wp--preset--font-size--xl);
	--fs-display: var(--wp--preset--font-size--display);
	--measure: 38rem;
	--wide: 74rem;
	--tide-max: 34px;
}

body { -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
::selection { background: var(--blue); color: #fff; }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
time, .wp-block-post-date, .reading-time { font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: 1.5rem; box-sizing: border-box; width: 100%; }

/* Menú */
.nav.wp-block-navigation { gap: .25rem 1.25rem; font-size: var(--fs-base); }
.nav .wp-block-navigation-item__content { color: var(--soft); padding: 0; }
.nav .wp-block-navigation-item__content:hover,
.nav .current-menu-item > .wp-block-navigation-item__content { color: var(--blue); }


/* «labajamar» grande (portada) */
.wordmark.wp-block-site-title {
	margin: 0 0 0 -.03em;
	font-family: var(--font-display);
	font-size: var(--fs-display);
	font-style: italic;
	font-weight: 400;
	line-height: .9;
	letter-spacing: -.02em;
}
.wordmark a { color: inherit; text-decoration: none; }
.wordmark .bob { display: inline-block; animation: bob 4.5s ease-in-out infinite; animation-delay: calc(var(--i) * -.32s); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.06em); } }

.tagline.wp-block-site-tagline { margin: 0; font-size: 1.375rem; line-height: 1.4; }
.copyright { gap: .25rem 1rem; font-size: var(--fs-sm); color: var(--soft); }
.copyright p { margin: 0; }
.copyright a { color: var(--soft); text-decoration: none; }
.copyright a:hover { color: var(--blue); }

/* Buscador desplegable */
.search-block { display: contents; }
.search-toggle {
	display: inline-flex; align-items: center;
	padding: 0; border: 0; background: transparent;
	color: var(--soft); cursor: pointer;
}
.search-toggle:hover, .search-toggle[aria-expanded="true"] { color: var(--blue); }
.search-toggle svg { width: 21px; height: 21px; }
.search-wrap {
	flex-basis: 100%;
	display: grid;
	grid-template-rows: 0fr;
	margin-top: -.25rem;
	opacity: 0;
	transform: translateY(-.4rem);
	visibility: hidden;
	transition:
		grid-template-rows .45s cubic-bezier(.2, .7, .2, 1),
		margin-top .45s cubic-bezier(.2, .7, .2, 1),
		opacity .3s ease,
		transform .45s cubic-bezier(.2, .7, .2, 1),
		visibility 0s linear .45s;
}
.search-wrap.open {
	grid-template-rows: 1fr;
	margin-top: .75rem;
	opacity: 1;
	transform: none;
	visibility: visible;
	transition-delay: 0s, 0s, .08s, 0s, 0s;
}
.search-inner { min-height: 0; overflow: hidden; padding: 2px; margin: -2px; }
.search-box {
	display: flex; align-items: center;
	border: 1px solid var(--blue); border-radius: 999px;
	padding-inline: 1.1rem;
	transition: box-shadow .2s;
}
.search-box:focus-within { box-shadow: 0 0 0 1px var(--blue); }
.search-box input {
	flex: 1; min-width: 0;
	font: inherit; font-size: var(--fs-base); color: var(--blue);
	background: transparent; border: 0; padding: .6rem 0; outline: none;
	-webkit-appearance: none; appearance: none;
}
.search-box input::placeholder { color: var(--soft); opacity: 1; }
.search-box input::-webkit-search-cancel-button { display: none; }

/* Lista de la barra lateral (Más leídos) */
.recent .label { margin: 0 0 .6rem; font-family: var(--font); font-size: var(--fs-sm); font-weight: 400; font-style: italic; line-height: 1.4; color: var(--soft); }
.recent ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.recent li { border-bottom: 1px solid var(--rule); }
.recent a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: .55rem; color: inherit; text-decoration: none; }
.recent a:hover .t { color: var(--soft); }
.recent .t { font-size: var(--fs-base); line-height: 1.35; }
.recent time { flex: none; font-size: var(--fs-sm); color: var(--soft); text-transform: lowercase; }

/* Suscripción (bloque de Jetpack) */
.subscribe .label { margin: 0 0 .6rem; font-size: var(--fs-sm); font-style: italic; color: var(--soft); }
.subscribe .consent { margin: .6rem 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--soft); }
.subscribe .consent a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.subscribe .consent a:hover { color: var(--blue); }
.subscribe-form form { margin: 0 !important; padding: 0 !important; border: 0 !important; max-width: 30rem; }
.subscribe-form .wp-block-jetpack-subscriptions__form-elements {
	display: flex !important; flex-wrap: wrap !important; align-items: center !important;
	gap: .5rem; width: 100%;
}
.subscribe-form p { margin: 0 !important; line-height: 1.4 !important; }
.subscribe-form p#subscribe-email,
.subscribe-form .wp-block-jetpack-subscriptions__form-elements > p:first-child { flex: 1 1 12rem; min-width: 0; }
.subscribe-form p#subscribe-submit { flex: none; display: flex !important; margin-left: auto !important; }
/* Campo: la misma píldora que el buscador y los comentarios */
.subscribe-form input[type="email"] {
	width: 100% !important; box-sizing: border-box !important;
	font: inherit !important; font-size: var(--fs-base) !important; line-height: 1.7 !important; color: var(--blue) !important;
	background: transparent !important;
	border: 1px solid var(--blue) !important; border-radius: 999px !important;
	padding: .6rem 1.1rem !important; margin: 0 !important;
	outline: none; box-shadow: none !important; transition: box-shadow .2s;
}
.subscribe-form input[type="email"]:focus { box-shadow: 0 0 0 1px var(--blue) !important; }
.subscribe-form input[type="email"]::placeholder { color: var(--soft) !important; opacity: 1 !important; }
/* Botón: píldora aparte, relleno */
.subscribe-form button,
.subscribe-form .wp-block-button__link {
	display: inline-flex !important; align-items: center; justify-content: center;
	height: calc(var(--fs-base) * 1.7 + 1.2rem + 2px) !important; width: auto !important; box-sizing: border-box !important;
	font: inherit !important; font-size: var(--fs-base) !important; line-height: 1 !important;
	color: #fff !important; background: var(--blue) !important;
	border: 1px solid var(--blue) !important; border-radius: 999px !important;
	padding: 0 1.25rem !important; margin: 0 !important;
	cursor: pointer; transition: background-color .2s, color .2s;
}
.subscribe-form button:hover { background: var(--soft) !important; border-color: transparent !important; color: #fff !important; }
.subscribe-form .wp-block-jetpack-subscriptions__subscount { display: none; }

.no-results { color: var(--soft); }

/* Paginación */
.pager.wp-block-query-pagination {
	margin-top: 3.5rem; padding-top: 2rem;
	border-top: 1px solid var(--rule);
	font-size: var(--fs-sm); gap: 1rem; align-items: center;
}
.pager .wp-block-query-pagination-numbers { display: flex; gap: .4rem; margin: 0 auto; }
/* Números siempre al centro, aunque falte «anterior» o «siguiente» */
.pager.wp-block-query-pagination { display: grid !important; grid-template-columns: 1fr auto 1fr; }
.pager .wp-block-query-pagination-previous { grid-column: 1; justify-self: start; }
.pager .wp-block-query-pagination-numbers { grid-column: 2; }
.pager .wp-block-query-pagination-next { grid-column: 3; justify-self: end; }
.pager .wp-block-query-pagination-previous, .pager .wp-block-query-pagination-next { white-space: nowrap; }
.pager a, .pager .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 2.5rem; height: 2.5rem; padding-inline: 1rem; box-sizing: border-box;
	border: 1px solid var(--blue); border-radius: 999px;
	color: var(--blue); line-height: 1; text-decoration: none;
	transition: background-color .2s, color .2s;
}
.pager .page-numbers { padding-inline: 0; }
.pager .page-numbers.dots { border: 0; }
.pager a:hover, .pager .page-numbers.current { background: var(--blue); color: #fff; }

/* ==========================================================
   POST: título grande, foto ancha, texto con margen lateral
   ========================================================== */
.topbar { gap: .5rem 1.5rem; padding-block: 2rem; }
.brand.wp-block-site-title {
	margin: 0;
	font-family: var(--font-display);
	font-size: 2.375rem;
	font-style: italic; font-weight: 400;
	letter-spacing: -.01em; line-height: 1;
}
.brand a { color: inherit; text-decoration: none; }
/* Buscador también en la cabecera de posts y páginas */
.topbar .brand { margin-right: auto; }
/* En la portada ya está «labajamar» grande: la cabecera muestra solo el menú y la lupa */
.home .topbar .brand { display: none; }
.home .topbar { justify-content: flex-end !important; }
.topbar .search-wrap .search-inner { width: min(100%, 26rem); margin-left: auto; }
/* En escritorio, el buscador de la cabecera se abre hacia el lado, junto a la lupa */
@media (min-width: 861px) {
	.topbar .search-wrap {
		order: 2; flex-basis: auto; margin: 0; transform: translateX(.6rem);
		grid-template-rows: 1fr; grid-template-columns: 0fr;
		transition:
			grid-template-columns .45s cubic-bezier(.2, .7, .2, 1),
			opacity .3s ease,
			transform .45s cubic-bezier(.2, .7, .2, 1),
			visibility 0s linear .45s;
	}
	.topbar .search-wrap.open { grid-template-columns: 1fr; margin: 0; transform: none; transition-delay: 0s, .08s, 0s, 0s; }
	.topbar .search-wrap .search-inner { width: auto; min-width: 0; margin: -2px; }
	.topbar .search-box { width: 16rem; }
	.topbar .search-toggle { order: 3; }
	/* Cerrado no ocupa sitio: anula el hueco extra entre «Archivo» y la lupa */
	.topbar .search-wrap:not(.open) { margin-right: -1.5rem; }
	.topbar .search-box input { padding-block: .4rem; }
}

.post-title {
	font-family: var(--font-display);
	font-size: var(--fs-xl);
	font-weight: 400;
	line-height: 1;
	letter-spacing: -.015em;
	margin: 2.5rem 0 3rem;
}

.post-hero { margin: 0 0 4rem; }
.post-hero img { width: auto; max-width: 100%; max-height: 85vh; margin-inline: auto; }

.post-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr);
	column-gap: 3rem;
}
.post-body > * { grid-column: 2; }
.post-aside {
	grid-column: 1; grid-row: 1;
	position: sticky; top: 2rem; align-self: start;
	font-size: var(--fs-base); line-height: 1.45; color: var(--soft);
	display: flex; flex-direction: column; gap: .4rem; text-align: right;
}
.admin-bar .post-aside { top: calc(2rem + 32px); }
.post-aside p { margin: 0; }
.post-aside .wp-block-post-date, .post-aside time { white-space: normal; } /* «9 de noviembre de 2026» puede ocupar dos líneas en el margen */
.post-aside .back { margin-top: 1rem; }
.post-aside a { color: var(--soft); text-decoration: none; }
.post-aside a:hover { color: var(--blue); }

.prose,
.wp-block-post-content { font-size: var(--fs-text); line-height: 1.7; }
.prose > *,
.wp-block-post-content > * { margin-block: 0; }
.prose > * + *,
.wp-block-post-content > * + * { margin-top: 1.4em; }
.prose h2,
.prose h3,
.wp-block-post-content h2,
.wp-block-post-content h3 { line-height: 1.15; margin-top: 2em; }
.prose a,
.wp-block-post-content a { text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover,
.wp-block-post-content a:hover { text-decoration-style: wavy; }
.prose h2 + *,
.prose h3 + *,
.wp-block-post-content h2 + *,
.wp-block-post-content h3 + * { margin-top: .6em; }
.prose strong,
.wp-block-post-content strong { font-weight: 600; }
.prose mark,
.wp-block-post-content mark { background: rgba(12, 50, 130, .12); color: inherit; padding: 0 .15em; }
.prose :not(pre) > code,
.wp-block-post-content :not(pre) > code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82em;
	background: rgba(12, 50, 130, .06); border-radius: .35em; padding: .1em .35em;
}

/* Listas */
.prose ul,
.prose ol,
.wp-block-post-content ul,
.wp-block-post-content ol { padding-left: 1.3em; }
.prose li + li,
.wp-block-post-content li + li { margin-top: .4em; }
.prose li > ul,
.prose li > ol,
.wp-block-post-content li > ul,
.wp-block-post-content li > ol { margin-top: .4em; }
.prose li::marker,
.wp-block-post-content li::marker { color: var(--soft); }
.prose ol > li::marker,
.wp-block-post-content ol > li::marker { font-family: var(--font-display); font-size: 1.1em; }

/* Cita */
.prose .wp-block-quote,
.wp-block-post-content .wp-block-quote {
	margin-inline: 0; padding: 0 0 0 1.25rem;
	border: 0; border-left: 2px solid var(--blue);
	font-style: italic;
}
.prose .wp-block-quote p,
.wp-block-post-content .wp-block-quote p { margin: 0; }
.prose .wp-block-quote cite,
.prose .wp-block-pullquote cite,
.wp-block-post-content .wp-block-quote cite,
.wp-block-post-content .wp-block-pullquote cite {
	display: block; margin-top: .6rem;
	font-style: normal; font-size: var(--fs-sm); color: var(--soft);
	text-transform: none; letter-spacing: normal;
}
.prose .wp-block-quote cite::before,
.prose .wp-block-pullquote cite::before,
.wp-block-post-content .wp-block-quote cite::before,
.wp-block-post-content .wp-block-pullquote cite::before { content: "— "; }

/* Cita destacada */
.prose .wp-block-pullquote,
.wp-block-post-content .wp-block-pullquote {
	margin-block: 2.5em; padding: 2rem 0;
	border: 0; border-block: 1px solid var(--rule);
	text-align: center;
}
.prose .wp-block-pullquote blockquote,
.wp-block-post-content .wp-block-pullquote blockquote { margin: 0; }
.prose .wp-block-pullquote p,
.wp-block-post-content .wp-block-pullquote p {
	margin: 0; font-family: var(--font-display); font-style: italic;
	font-size: var(--fs-lg); line-height: 1.15;
}

/* Imágenes y galerías */
.prose .wp-block-image,
.prose .wp-block-gallery,
.wp-block-post-content .wp-block-image,
.wp-block-post-content .wp-block-gallery { margin-block: 2.5em; }
.prose figure img,
.wp-block-post-content figure img { margin-inline: auto; }
.prose figcaption,
.prose .wp-element-caption,
.wp-block-post-content figcaption,
.wp-block-post-content .wp-element-caption {
	font-size: var(--fs-sm); color: var(--soft); text-align: center; margin: .6rem 0 0;
}
.prose .wp-block-gallery,
.wp-block-post-content .wp-block-gallery { gap: .75rem; }
.prose .wp-block-gallery.has-nested-images > .wp-block-image,
.wp-block-post-content .wp-block-gallery.has-nested-images > .wp-block-image { margin: 0; flex: 1 1 14rem; width: auto !important; }
.prose .wp-block-gallery.is-cropped .wp-block-image img,
.wp-block-post-content .wp-block-gallery.is-cropped .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.prose .wp-block-gallery.has-nested-images figcaption.blocks-gallery-caption,
.wp-block-post-content .wp-block-gallery.has-nested-images figcaption.blocks-gallery-caption { flex-basis: 100%; }

/* Separador */
.prose .wp-block-separator,
.wp-block-post-content .wp-block-separator {
	width: 100%; height: 0; margin-block: 2.5em;
	border: 0; border-top: 1px solid var(--rule); background: none; opacity: 1;
}

/* Tabla */
.prose .wp-block-table,
.wp-block-post-content .wp-block-table { margin-block: 2em; overflow-x: auto; }
.prose .wp-block-table table,
.wp-block-post-content .wp-block-table table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.prose .wp-block-table th,
.prose .wp-block-table td,
.wp-block-post-content .wp-block-table th,
.wp-block-post-content .wp-block-table td {
	padding: .6em .75em .6em 0; text-align: left; border: 0; border-bottom: 1px solid var(--rule);
}
.prose .wp-block-table thead,
.wp-block-post-content .wp-block-table thead { border: 0; }
.prose .wp-block-table th,
.wp-block-post-content .wp-block-table th { font-weight: 600; border-bottom: 1px solid var(--blue); }
.prose .wp-block-table td,
.wp-block-post-content .wp-block-table td { font-variant-numeric: tabular-nums; }

/* Código */
.prose .wp-block-code,
.wp-block-post-content .wp-block-code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .8em; line-height: 1.6;
	color: var(--blue); background: rgba(12, 50, 130, .05);
	border: 0; border-radius: 1.25rem; padding: 1rem 1.25rem; overflow-x: auto;
}
.prose .wp-block-code code,
.wp-block-post-content .wp-block-code code { font: inherit; background: none; padding: 0; }

/* Nota desplegable */
.prose .wp-block-details,
.wp-block-post-content .wp-block-details { border-block: 1px solid var(--rule); padding-block: .75rem; }
.prose .wp-block-details summary,
.wp-block-post-content .wp-block-details summary { cursor: pointer; font-style: italic; }
.prose .wp-block-details summary::marker,
.wp-block-post-content .wp-block-details summary::marker { color: var(--soft); }
.prose .wp-block-details[open] summary,
.wp-block-post-content .wp-block-details[open] summary { margin-bottom: .6rem; }
.prose .wp-block-details > * + *,
.wp-block-post-content .wp-block-details > * + * { margin-top: .6em; }

.post-subscribe { margin-top: 4rem; padding: 2rem; border: 1px solid var(--rule); border-radius: 1.25rem; }
.post-subscribe .label { font-size: var(--fs-base); color: var(--blue); }
/* Espaciado del texto con más peso, para que el editor lo respete igual que el sitio */
.wp-block-post-content.wp-block-post-content > * + * { margin-block-start: 1.4em; }
.wp-block-post-content.wp-block-post-content > h2,
.wp-block-post-content.wp-block-post-content > h3 { margin-block-start: 2em; }
.wp-block-post-content.wp-block-post-content > h2 + *,
.wp-block-post-content.wp-block-post-content > h3 + * { margin-block-start: .6em; }
.wp-block-post-content.wp-block-post-content > :first-child { margin-block-start: 0; }

/* Botones para compartir (Jetpack) */
.wp-block-jetpack-sharing-buttons { margin-top: 2.5rem !important; }
body.page .wp-block-jetpack-sharing-buttons { display: none !important; }  /* solo en posts */
.jetpack-sharing-buttons__services-list { gap: .5rem !important; }
.jetpack-sharing-button__button {
	border: 1px solid var(--rule) !important; border-radius: 999px !important;
	background: transparent !important; color: var(--soft) !important;
	font-family: var(--font) !important; font-size: var(--fs-sm) !important;
	box-shadow: none !important; padding: .35rem .85rem !important;
	transition: color .2s, border-color .2s;
}
.jetpack-sharing-button__button:hover { color: var(--blue) !important; border-color: var(--blue) !important; }
.jetpack-sharing-button__button svg { fill: currentColor; width: 1.25em !important; height: 1.25em !important; }
.jetpack-sharing-buttons__services-list { margin-inline: 0 !important; }
.jetpack-sharing-button__button { margin: 0 !important; gap: .35rem; }

/* Comentarios */
.comments { margin-top: 4rem; }
.comments > .comment-respond:first-child { margin-top: 0; }
.comments .wp-block-comments-title { font-size: var(--fs-lg); margin: 0 0 1.5rem; }
.comments .wp-block-comments-title .count { font-family: var(--font); font-size: var(--fs-sm); color: var(--soft); vertical-align: middle; margin-left: .35rem; }
.comments .wp-block-comment-template { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.comments .wp-block-comment-template > li { padding-block: 1.5rem; border-bottom: 1px solid var(--rule); }
.comments .wp-block-comment-template ol { list-style: none; margin: 1.25rem 0 0 3.5rem; padding: 0 0 0 1.25rem; border-left: 1px solid var(--rule); }
.comment-card { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; }
.comment-card .wp-block-avatar { margin: 0; }
.avatar-initial {
	display: grid; place-items: center;
	width: 2.5rem; height: 2.5rem; border-radius: 50%;
	background: rgba(12, 50, 130, .08);
	font-family: var(--font-display); font-style: italic; font-size: 1.35rem; line-height: 1;
}
.bypostauthor > .comment-card .avatar-initial { background: var(--blue); color: #fff; }
.comment-head { gap: .15rem .75rem; margin-bottom: .3rem; align-items: baseline; }
.comment-card .wp-block-comment-author-name { font-weight: 600; margin: 0; }
.bypostauthor > .comment-card .wp-block-comment-author-name::after { content: "autor"; margin-left: .5rem; font-weight: 400; font-style: italic; font-size: var(--fs-sm); color: var(--soft); }
.comment-card .wp-block-comment-date { font-size: var(--fs-sm); color: var(--soft); margin: 0; }
.comment-card .wp-block-comment-content p { margin: 0; line-height: 1.6; }
.comment-card .wp-block-comment-content p + p { margin-top: .8em; }
.comment-card .wp-block-comment-reply-link { margin-top: .4rem; font-size: var(--fs-sm); }
.comment-card .wp-block-comment-reply-link a { color: var(--soft); text-decoration: none; }
.comment-card .wp-block-comment-reply-link a:hover { color: var(--blue); }
.comments .wp-block-comments-pagination { margin-top: 1.5rem; font-size: var(--fs-sm); }

.comment-respond { margin-top: 2.5rem; }
.wp-block-post-comments-form .comment-reply-title { margin: 0 0 1rem; font-family: var(--font); font-size: var(--fs-base); font-weight: 400; font-style: italic; color: var(--blue); }
.comment-reply-title small { margin-left: .75rem; font-size: var(--fs-sm); }
.comment-form { display: flex; flex-direction: column; gap: .75rem; }
.comment-form p { margin: 0; }
.comment-form .field {
	width: 100%; box-sizing: border-box;
	font: inherit; font-size: var(--fs-base); color: var(--blue);
	background: transparent;
	border: 1px solid var(--blue); border-radius: 999px;
	padding: .6rem 1.1rem; outline: none; transition: box-shadow .2s;
}
.comment-form textarea.field { border-radius: 1.25rem; resize: vertical; min-height: 7.5rem; line-height: 1.6; }
.comment-form .field::placeholder { color: var(--soft); opacity: 1; }
.comment-form .field:focus { box-shadow: 0 0 0 1px var(--blue); }
.comment-form-cookies-consent,
.comment-form .comment-subscription-form { display: flex; gap: .65rem !important; align-items: flex-start; margin: 0 !important; font-size: var(--fs-base); line-height: 1.5; color: var(--soft); }
.comment-form input[type="checkbox"] { flex: none; width: 1.1rem !important; height: 1.1rem !important; margin: .25em 0 0 !important; accent-color: var(--blue); }
.comment-form .form-submit { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; margin: .5rem 0 0; }
.comment-form .form-submit .comment-notes { flex: 1 1 16rem; }
.comment-form .form-submit input[type="submit"] { margin-left: auto; }
.comment-form input[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center;
	height: calc(var(--fs-base) * 1.7 + 1.2rem + 2px); padding: 0 1.25rem; line-height: 1; box-sizing: border-box; /* misma altura que «Suscribirse» y los campos */
	font: inherit; font-size: var(--fs-base); color: var(--blue);
	background: transparent; border: 1px solid var(--blue); border-radius: 999px;
	cursor: pointer; transition: background-color .2s, color .2s;
}
.comment-form input[type="submit"] { background: var(--blue); color: #fff; }
.comment-form input[type="submit"]:hover { background: var(--soft); border-color: transparent; }
.logged-in-as, .comment-notes { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--soft); }
.comment-notes a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.comment-notes a:hover { color: var(--blue); }
.logged-in-as a { color: inherit; }

/* 404: composición centrada, con el buscador a mano */
.not-found { max-width: var(--measure); text-align: center; padding-block: 2rem 1rem; }
.not-found .post-title { margin: 2rem 0 1.5rem; }
.not-found-text { margin: 0 0 2rem; font-size: var(--fs-text); line-height: 1.6; }
.not-found .search-head { margin: 0 auto; max-width: 26rem; text-align: left; }
.not-found-back { margin: 2rem 0 0; font-size: var(--fs-sm); }
.not-found-back a { color: var(--soft); text-decoration: none; }
.not-found-back a:hover { color: var(--blue); }

/* Páginas de listas (Archivo, búsqueda, categorías, fechas): el título va en la misma columna que la lista */
.post-body > .list-title { grid-column: 2; margin: 1rem 0 2.5rem; }

/* Página «Archivo»: índice compacto de todos los posts */
.archive-intro:not(:empty) { margin-bottom: 2.5rem; }
.archive-list .wp-block-post-template { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.archive-list .wp-block-post-template > li { border-bottom: 1px solid var(--rule); }
.archive-row { gap: 1.5rem; padding-block: .85rem; align-items: baseline !important; }
.archive-row .wp-block-post-title { margin: 0; font-size: calc(var(--fs-md) * 1.1); line-height: 1.2; }
.archive-row .wp-block-post-title a { color: inherit; text-decoration: none; }
.archive-row .wp-block-post-title a:hover { color: var(--soft); }
.archive-row .wp-block-post-date { flex: none; margin: 0; font-size: var(--fs-sm); color: var(--soft); text-transform: lowercase; }
.archive-list .pager.wp-block-query-pagination { padding-bottom: 0; padding-top: 0; margin-top: 2rem; border-top: 0; }

/* Resultados de búsqueda: buscador abierto y lista compacta con un extracto */
.search-head { margin-bottom: 2.5rem; }

.search-count { margin: .75rem 0 0; font-size: var(--fs-sm); color: var(--soft); }
.search-list .wp-block-post-template > li { padding-block: .85rem; }
.search-list .archive-row { padding-block: 0; }
.search-excerpt { margin: .35rem 0 0; }
.search-excerpt .wp-block-post-excerpt__excerpt { margin: 0; font-size: var(--fs-base); line-height: 1.55; color: var(--soft); }
.search-list .no-results { margin: 0; padding-block: .85rem; }

/* Anterior / siguiente */
.post-nav {
	margin-top: 4rem; padding-top: 2rem;
	border-top: 1px solid var(--rule);
	font-size: var(--fs-sm); gap: 1.5rem;
}
.post-nav .wp-block-post-navigation-link { margin: 0; color: var(--soft); max-width: 48%; }
.post-nav .wp-block-post-navigation-link a { color: inherit; text-decoration: none; }
.post-nav .wp-block-post-navigation-link:hover { color: var(--blue); }
.post-nav .prev { margin-left: auto; text-align: right; }
.post-nav .next a::before { content: "←\00a0"; }
.post-nav .prev a::after { content: "\00a0→"; }

/* Pie */
.site-footer {
	padding-block: 4rem calc(var(--tide-max) + 3rem);
	font-size: var(--fs-sm); color: var(--soft);
	text-align: center;
}
.site-footer p { margin: 0; }
.site-footer .copyright { justify-content: center; }
/* Alineado con la columna de texto de posts y páginas */
.site-footer > .wp-block-template-part { max-width: var(--measure); margin-inline: auto; }

/* ==========================================================
   PORTADA: regla de marea (línea con marcas, posts alternados)
   ========================================================== */
.tide-home .wp-block-post-title a { color: inherit; text-decoration: none; transition: color .2s; }
.tide-intro { text-align: center; margin: 1.5rem auto 4.5rem; }
.tide-intro .wordmark.wp-block-site-title { margin: 0; }
.tide-intro .tagline { max-width: 32rem; margin: 1.25rem auto 0; font-size: 1.375rem; line-height: 1.4; }
.timeline .wp-block-post-template { list-style: none; margin: 0; padding: 0 0 3rem; position: relative; }
.timeline .wp-block-post-template::before { content: ""; position: absolute; top: .4rem; bottom: 2.2rem; left: 50%; width: 1px; background: var(--blue); opacity: .35; }
.timeline .wp-block-post-template::after { content: ""; position: absolute; bottom: 0; left: calc(50% - 3.75rem); width: 7.5rem; height: 1rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'%3E%3Cpath d='M2 8q14-8 29 0t29 0t29 0t29 0' fill='none' stroke='%230C3282' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.timeline .wp-block-post-template > li { display: grid; grid-template-columns: minmax(0, 1fr) 7rem minmax(0, 1fr); grid-template-areas: "text date img"; align-items: start; }
.timeline .wp-block-post-template > li + li { margin-top: 4rem; }
.timeline .wp-block-post-template > li:nth-child(even) { grid-template-areas: "img date text"; }
.tl-text { grid-area: text; }
.tl-img { grid-area: img; margin: 0; }
.tl-img img { width: 100%; object-fit: cover; }
.tl-date { grid-area: date; position: relative; z-index: 1; justify-self: center; margin: 0; padding: .1rem .5rem; background: var(--bg); font-size: var(--fs-sm); color: var(--soft); text-transform: lowercase; text-align: center; }
.tl-date::before { content: ""; display: block; width: .6rem; height: .6rem; margin: 0 auto .35rem; border-radius: 50%; background: var(--blue); }
.timeline li:nth-child(odd) .tl-text { text-align: right; }
.tl-text .wp-block-post-title { margin: 0; font-size: var(--fs-lg); line-height: 1.08; }
.tl-text .wp-block-post-excerpt__excerpt { margin: .75rem 0 .5rem; font-size: var(--fs-base); line-height: 1.6; }
.tl-text .wp-block-post-excerpt__more-link { font-size: var(--fs-sm); color: var(--soft); text-decoration: none; }
.tide-home .wp-block-post-title a:hover { color: var(--soft); }
.tide-home .pager.wp-block-query-pagination { margin-top: 2.5rem; padding-top: 0; padding-bottom: 0; border-top: 0; }
.band { display: grid; grid-template-columns: minmax(0, 1fr) 7rem minmax(0, 1fr); gap: 3rem 0; max-width: none; margin: 4rem 0 0; padding-block: 3rem; border-top: 1px solid var(--rule); align-items: start; }
/* Mismas columnas que la regla de marea: «Más leídos» bajo los posts de la izquierda, la suscripción bajo los de la derecha */
.band > .recent { grid-column: 1; }
/* Etiquetas de la franja final, como las del final de los posts: tamaño base y azul pleno */
.band .recent .label, .band .subscribe .label { font-size: var(--fs-base); color: var(--blue); }
.band > .band-subscribe, .band > .wp-block-template-part { grid-column: 3; }
.band:not(:has(.recent)) { grid-template-columns: minmax(0, 26rem); justify-content: center; }
.band:not(:has(.recent)) > * { grid-column: 1; }

/* ==========================================================
   La marea: baja a medida que lees
   ========================================================== */
.tide {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	height: calc(var(--tide, 1) * var(--tide-max));
	overflow: hidden;
	pointer-events: none;
	z-index: 10;
}
.tide svg { position: absolute; left: 0; top: 0; width: 100%; height: var(--tide-max); }
.tide .back { fill: var(--blue); opacity: .22; animation: drift 16s linear infinite reverse; }
.tide .front { fill: var(--blue); animation: drift 10s linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-1200px); } }

/* ==========================================================
   Pantallas pequeñas
   ========================================================== */
@media (max-width: 860px) {
	.wordmark.wp-block-site-title { font-size: clamp(4rem, 21vw, 7.5rem); }
	.tagline.wp-block-site-tagline { font-size: var(--fs-base); line-height: 1.5; }
	.post-body { grid-template-columns: 1fr; }
	.post-body > * { grid-column: 1; }
	.post-aside { grid-row: auto; position: static; text-align: left; flex-direction: row; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: 1.5rem; }
	.post-aside .back { display: none; }
	.post-subscribe { padding: 1.5rem; }
	/* En el móvil, el nombre de la cabecera un poco menor para que quepan menú y lupa en una línea */
	.brand.wp-block-site-title { font-size: 1.875rem; }
	/* Portada: la regla pasa al borde izquierdo */
	.band { grid-template-columns: 1fr; gap: 2.5rem; }
	.band > * { grid-column: 1 !important; }
	/* Paginación en el móvil: en fila, con los números entre los botones */
	.pager.wp-block-query-pagination { display: flex !important; gap: .5rem; }
	.pager .wp-block-query-pagination-numbers { margin: 0 auto; }
	/* Suscripción en el móvil: si el campo queda estrecho, el botón baja a la derecha */
	.subscribe-form p#subscribe-email, .subscribe-form .wp-block-jetpack-subscriptions__form-elements > p:first-child { flex-basis: 15rem; }
	.tide-intro .wordmark.wp-block-site-title { font-size: clamp(4rem, 21vw, 7.5rem); }
	.tide-intro .tagline { font-size: var(--fs-base); }
	.timeline .wp-block-post-template::before { left: .3rem; }
	.timeline .wp-block-post-template::after { left: -.2rem; width: 5rem; background-position: left center; }
	.timeline .wp-block-post-template > li,
	.timeline .wp-block-post-template > li:nth-child(even) { grid-template-columns: 1fr; grid-template-areas: "date" "text" "img"; padding-left: 1.75rem; }
	.tl-date { justify-self: start; display: flex; align-items: center; gap: .5rem; padding: 0; margin-left: -1.75rem; }
	.tl-date::before { margin: 0; }
	.timeline li:nth-child(odd) .tl-text { text-align: left; }
	.tl-img { margin-top: 1rem; }
	.jetpack-sharing-button__button { padding: .3rem .5rem !important; font-size: .875rem !important; gap: 0; }
	.jetpack-sharing-button__service-label { margin-inline-start: .3rem !important; }
	/* En el móvil, solo el icono en las redes (se reconocen); «Compartir» mantiene el texto */
	.jetpack-sharing-button__button:not(.share-share) .jetpack-sharing-button__service-label { display: none; }
	.jetpack-sharing-button__button:not(.share-share) { padding-inline: .6rem !important; }
	.jetpack-sharing-buttons__services-list { gap: .4rem !important; }
	.post-title { margin-top: 1rem; }
	.comments .wp-block-comment-template ol { margin-left: 1.25rem; }
	.prose,
.wp-block-post-excerpt__excerpt,
.wp-block-post-content { -webkit-hyphens: auto; hyphens: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.wordmark .bob, .tide .back, .tide .front { animation: none; }
	.search-wrap, .search-wrap.open { transition: none; }
}
