/* =========================================================================
 * Herramientas gratis — estilos comunes (calculadoras, checklist, mapas…)
 * Prefijo .rvh-. Cada herramienta puede añadir su <id>.css.
 * Reglas de la casa: sin filetes verdes de acento ni franjas laterales;
 * jerarquía con fondo suave, 1px de línea, sombra y tipografía.
 * ========================================================================= */

.rvh {
	--rvh-gap: clamp(1rem, 3vw, 2rem);
	margin: var(--rv-space-6) 0 var(--rv-space-7);
	background: var(--rv-bg);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius-lg);
	box-shadow: var(--rv-shadow);
	color: var(--rv-text);
	font-family: var(--rv-font-sans);
	/* clip y no hidden: hidden rompe position:sticky del resultado */
	overflow: clip;
	/* Gris algo más oscuro que el del tema para pasar 4,5:1 sobre el fondo suave */
	--rv-muted: #5F6B78;
}
.rvh *, .rvh *::before, .rvh *::after { box-sizing: border-box; }
/* Lo oculto con el atributo hidden no se pinta aunque su clase tenga display. */
.rvh [hidden], .rvh-mini[hidden] { display: none !important; }
/* Foco de teclado visible en tinta (el anillo salvia del tema apenas se ve) */
.rvh :focus-visible { outline: 2px solid var(--rv-ink); outline-offset: 2px; }
.rvh .rvh-input :focus-visible { outline: none; }

.rvh__head {
	display: flex;
	align-items: center;
	gap: var(--rv-space-4);
	padding: var(--rvh-gap) var(--rvh-gap) 0;
}
.rvh__icono {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--rv-accent-soft);
	color: var(--rv-accent-dark);
}
.rvh__icono svg { width: 24px; height: 24px; }
/* Estilo 2026: sin etiquetas en mayúsculas encima de los títulos */
.rvh__eyebrow { display: none; }
.rvh .rvh__title {
	margin: 0;
	font-family: var(--rv-font-serif);
	font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
	line-height: var(--rv-leading-snug);
	color: var(--rv-ink);
	text-wrap: pretty;
}

/* Dos zonas: datos | resultado. En móvil, una encima de otra. */
.rvh__body {
	display: grid;
	gap: var(--rvh-gap);
	padding: var(--rvh-gap);
}
@media (min-width: 860px) {
	.rvh__body--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}

/* El tema pone `button:not(…):not(…):not(…):hover{color:#fff!important}` (0,4,1):
   los botones claros de aquí usan .rvh.rvh.rvh button… (0,5,1) para ganarle. */

/* ---------- Campos ---------- */
.rvh-fields { display: grid; gap: var(--rv-space-6); }
.rvh-field { display: grid; gap: var(--rv-space-2); min-width: 0; border: 0; padding: 0; margin: 0; }
.rvh-label {
	font-weight: 600;
	font-size: var(--rv-text-sm);
	color: var(--rv-ink);
	padding: 0;
}
.rvh-hint { font-size: var(--rv-text-xs); color: var(--rv-muted); line-height: 1.45; margin: 0; }
/* Primer bloque (atajos) separado del resto con una línea suave */
.rvh-fields > .rvh-field:first-child:has(.rvh-chips) { padding-bottom: var(--rv-space-6); border-bottom: 1px solid var(--rv-line); }
.rvh-row { display: flex; gap: var(--rv-space-2); flex-wrap: wrap; align-items: stretch; }

.rvh-input {
	display: flex;
	align-items: stretch;
	min-height: 48px;
	background: #fff;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	transition: border-color var(--rv-duration) var(--rv-ease), box-shadow var(--rv-duration) var(--rv-ease);
	flex: 1 1 9rem;
	min-width: 0;
}
.rvh-input:focus-within { border-color: var(--rv-ink); box-shadow: 0 0 0 1px var(--rv-ink); }
.rvh .rvh-input input,
.rvh .rvh-input select {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	border: 0;
	background: transparent;
	box-shadow: none;
	padding: 0 var(--rv-space-4);
	font-size: var(--rv-text-lg);
	font-variant-numeric: tabular-nums;
	color: var(--rv-ink);
	outline: none;
}
.rvh .rvh-input select { font-size: var(--rv-text-base); cursor: pointer; }
.rvh-input__unit {
	display: flex;
	align-items: center;
	padding: 0 var(--rv-space-4) 0 0;
	color: var(--rv-muted);
	font-size: var(--rv-text-sm);
	white-space: nowrap;
}
.rvh .rvh-input input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.rvh .rvh-input input::-webkit-outer-spin-button,
.rvh .rvh-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rvh-input.is-invalid { border-color: #B3261E; box-shadow: 0 0 0 1px #B3261E; }
.rvh-err { margin: 0; font-size: var(--rv-text-sm); line-height: 1.4; color: #B3261E; font-weight: 500; }

/* Control segmentado (2-5 opciones excluyentes) */
.rvh-seg {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	background: var(--rv-bg-soft);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
}
.rvh .rvh-seg__btn {
	min-height: 48px;
	min-width: 48px;
	padding: 0 var(--rv-space-4);
	border: 0;
	border-radius: calc(var(--rv-radius) - 4px);
	background: transparent;
	color: var(--rv-text);
	font-weight: 500;
	font-size: var(--rv-text-sm);
	cursor: pointer;
	transition: background var(--rv-duration) var(--rv-ease), box-shadow var(--rv-duration) var(--rv-ease);
}
@media (hover: hover) {
	.rvh.rvh.rvh button.rvh-seg__btn:not([aria-pressed="true"]):hover { background: #fff; color: var(--rv-ink) !important; }
}
.rvh .rvh-seg__btn[aria-pressed="true"],
.rvh .rvh-seg__btn[aria-pressed="true"]:hover {
	background: var(--rv-ink);
	color: #fff !important;
	font-weight: 600;
	box-shadow: var(--rv-shadow-xs);
}
.rvh-field > .rvh-seg,
.rvh-field > .rvh-seg--block { display: flex; justify-self: stretch; }
.rvh-seg--block { display: flex; }
/* Los botones se reparten todo el ancho, como los campos de texto */
.rvh-field > .rvh-seg > .rvh-seg__btn,
.rvh-seg--block > .rvh-seg__btn,
.rvh-row > .rvh-seg > .rvh-seg__btn { flex: 1 1 auto; }
.rvh-row > .rvh-seg { display: flex; flex: 1 1 14rem; }

/* Chips de ejemplos rápidos */
.rvh-chips { display: flex; flex-wrap: wrap; gap: var(--rv-space-2); }
.rvh .rvh-chip {
	min-height: 44px;
	padding: 0 var(--rv-space-4);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius-pill);
	background: #fff;
	color: var(--rv-text);
	font-size: var(--rv-text-sm);
	cursor: pointer;
	transition: border-color var(--rv-duration) var(--rv-ease), box-shadow var(--rv-duration) var(--rv-ease);
}
@media (hover: hover) {
	.rvh.rvh.rvh button.rvh-chip:not([aria-pressed="true"]):hover { border-color: var(--rv-muted); box-shadow: var(--rv-shadow-xs); color: var(--rv-ink) !important; }
}
/* Seleccionado = relleno en tinta, igual que el control segmentado */
.rvh.rvh.rvh .rvh-chip[aria-pressed="true"],
.rvh.rvh.rvh button.rvh-chip[aria-pressed="true"]:hover { background: var(--rv-ink); border-color: var(--rv-ink); color: #fff !important; font-weight: 600; }

/* Ajustes avanzados plegados: <details class="rvh-ajustes"><summary>Ajustes: …</summary>…</details> */
.rvh-ajustes { border: 1px solid var(--rv-line); border-radius: var(--rv-radius); background: #fff; }
.rvh-ajustes > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--rv-space-3);
	min-height: 48px;
	padding: 0 var(--rv-space-4);
	cursor: pointer;
	list-style: none;
	font-size: var(--rv-text-sm);
	color: var(--rv-ink);
}
.rvh-ajustes > summary::-webkit-details-marker { display: none; }
.rvh-ajustes > summary::after { content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin: -5px 4px 0 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform-origin: 50% 50%; transform: rotate(45deg); transition: transform var(--rv-duration) var(--rv-ease), margin var(--rv-duration) var(--rv-ease); }
.rvh-ajustes[open] > summary::after { margin-top: 5px; transform: rotate(225deg); }
.rvh-ajustes > summary > span { flex: 1 1 auto; min-width: 0; padding: var(--rv-space-3) 0; line-height: 1.4; }
.rvh-ajustes > summary b { font-weight: 600; } /* el texto del resumen va dentro de un <span> */
.rvh-ajustes__dentro { display: grid; gap: var(--rv-space-5); padding: var(--rv-space-2) var(--rv-space-4) var(--rv-space-5); }

/* ---------- Resultado ---------- */
.rvh-result {
	background: #F4F1EC;
	border: 1px solid #E9E3D9;
	border-radius: var(--rv-radius);
	padding: var(--rvh-gap);
	display: grid;
	gap: var(--rv-space-4);
}
@media (min-width: 860px) {
	.rvh-result--sticky { position: sticky; top: calc(var(--rv-header-h) + var(--rv-space-4)); }
}
.rvh-result__label {
	font-size: var(--rv-text-sm);
	font-weight: 600;
	color: var(--rv-ink);
}
.rvh-big {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: var(--rv-space-2) var(--rv-space-3);
	font-family: var(--rv-font-serif);
	color: var(--rv-ink);
	line-height: 1;
}
.rvh-big__num { font-size: clamp(3rem, 2.2rem + 3.4vw, 4.5rem); font-weight: 700; letter-spacing: var(--rv-tracking-tight); font-variant-numeric: tabular-nums; }
.rvh-big__unit { font-size: var(--rv-text-xl); font-weight: 600; }
.rvh-big__alt { font-family: var(--rv-font-sans); font-size: var(--rv-text-sm); color: var(--rv-muted); font-weight: 500; }
/* Destello al cambiar la cifra principal (feedback inmediato) */
.rvh-big__num.is-nuevo { animation: rvh-destello 600ms var(--rv-ease); }
@keyframes rvh-destello { 0% { color: var(--rv-accent-dark); transform: translateY(-2px); } 100% { color: var(--rv-ink); transform: none; } }
@media (prefers-reduced-motion: reduce) { .rvh-big__num.is-nuevo { animation: none; } }
.rvh-result__lead { margin: 0; font-size: var(--rv-text-sm); line-height: 1.5; text-wrap: pretty; }

.rvh-stats { display: grid; gap: 0; margin: 0; padding: 0; }
.rvh-stats > div {
	display: flex;
	justify-content: space-between;
	gap: var(--rv-space-4);
	padding: var(--rv-space-3) 0;
	border-top: 1px solid #E3DCD0;
	font-size: var(--rv-text-sm);
}
.rvh-stats dt { color: var(--rv-muted); margin: 0; }
.rvh-stats dd { margin: 0; color: var(--rv-ink); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Avisos dentro de la herramienta: tono, no franja */
.rvh-note,
.rvh-alert {
	display: flex;
	gap: var(--rv-space-3);
	align-items: flex-start;
	margin: 0;
	padding: var(--rv-space-3) var(--rv-space-4);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	font-size: var(--rv-text-sm);
	line-height: 1.5;
	background: #F5F7FA;
}
.rvh-alert { background: #FBF5EE; border-color: #EEDFCB; }
.rvh-note svg, .rvh-alert svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.rvh-empty { color: var(--rv-muted); font-size: var(--rv-text-sm); margin: 0; }

/* ---------- Botones ---------- */
.rvh-actions { display: flex; flex-wrap: wrap; gap: var(--rv-space-3); }
.rvh .rvh-btn,
.rvh-page .rvh-btn,
.rv-page-content .rvh-sec .rvh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--rv-space-2);
	min-height: 48px;
	padding: 0 var(--rv-space-5);
	border: 1px solid var(--rv-ink);
	border-radius: var(--rv-radius-pill);
	background: var(--rv-ink);
	color: #fff;
	font-weight: 600;
	font-size: var(--rv-text-sm);
	text-decoration: none;
	cursor: pointer;
	transition: transform var(--rv-duration) var(--rv-ease), box-shadow var(--rv-duration) var(--rv-ease);
}
@media (hover: hover) { .rvh .rvh-btn:hover, .rvh-page .rvh-btn:hover, .rv-page-content .rvh-sec .rvh-btn:hover { box-shadow: var(--rv-shadow); transform: translateY(-1px); color: #fff !important; } }
.rvh .rvh-btn--ghost,
.rvh-page .rvh-btn--ghost { background: #fff; color: var(--rv-ink); border-color: var(--rv-line); }
.rvh.rvh.rvh .rvh-btn--ghost:hover, .rvh-page.rvh-page.rvh-page .rvh-btn--ghost:hover { color: var(--rv-ink) !important; border-color: var(--rv-muted); }
.rvh-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.rvh .rvh-btn:disabled,
.rvh .rvh-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Tablas ---------- */
.rvh-table-wrap {
	overflow-x: auto;
	border: 1px solid #E3DCD0;
	border-radius: var(--rv-radius);
	margin: var(--rv-space-6) 0 var(--rv-space-7);
	-webkit-overflow-scrolling: touch;
}
.rvh-table { width: 100%; border-collapse: collapse; font-size: var(--rv-text-sm); font-variant-numeric: tabular-nums; margin: 0; }
.rvh-table th, .rvh-table td { padding: 0.6rem 0.75rem; border: 0; border-bottom: 1px solid var(--rv-line); text-align: center; white-space: nowrap; }
.rvh-table thead th { background: #F4F1EC; color: var(--rv-ink); font-weight: 600; }
.rvh-table tbody tr:nth-child(even) > * { background: #FBFAF7; }
.rvh-table tbody th { text-align: left; background: #fff; color: var(--rv-ink); font-weight: 600; position: sticky; left: 0; }
.rvh-table tbody tr:last-child > * { border-bottom: 0; }
.rvh-table caption { caption-side: bottom; text-align: left; padding: var(--rv-space-3) var(--rv-space-4); color: var(--rv-muted); font-size: var(--rv-text-xs); position: sticky; left: 0; max-width: calc(100vw - 2 * var(--rv-gutter) - 2px); white-space: normal; }

/* Barra fija con el resultado (solo móvil, mientras el resultado no se ve) */
.rvh-mini {
	position: fixed;
	left: var(--rv-space-3);
	right: var(--rv-space-3);
	bottom: calc(var(--rv-space-3) + env(safe-area-inset-bottom, 0px));
	z-index: var(--rv-z-sticky);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--rv-space-3);
	padding: var(--rv-space-2) var(--rv-space-2) var(--rv-space-2) var(--rv-space-4);
	background: var(--rv-ink);
	color: #fff;
	border-radius: var(--rv-radius-pill);
	box-shadow: var(--rv-shadow-lg);
	font-size: var(--rv-text-sm);
	transform: translateY(160%);
	visibility: hidden;
	transition: transform var(--rv-duration-md) var(--rv-ease), visibility 0s linear var(--rv-duration-md);
}
.rvh-mini.is-on { transform: none; visibility: visible; transition: transform var(--rv-duration-md) var(--rv-ease), visibility 0s; }
/* Mientras se ve la barra, que no tape lo último de la herramienta */
@media (max-width: 859px) { .rvh--con-mini { padding-bottom: 88px; } }

/* Hoja inferior con el resultado (móvil) */
.rvh-sin-scroll, .rvh-sin-scroll body { overflow: hidden; }
.rvh-sheet { position: fixed; inset: 0; z-index: var(--rv-z-modal); display: flex; flex-direction: column; justify-content: flex-end; }
.rvh-sheet__fondo { position: absolute; inset: 0; background: rgba(26, 43, 60, 0.45); animation: rvh-fundido var(--rv-duration-md) var(--rv-ease); }
.rvh-sheet__panel {
	position: relative;
	max-height: 88vh;
	overflow: auto;
	overscroll-behavior: contain;
	background: #fff;
	border-radius: var(--rv-radius-lg) var(--rv-radius-lg) 0 0;
	padding: var(--rv-space-3) var(--rv-space-4) calc(var(--rv-space-5) + env(safe-area-inset-bottom, 0px));
	box-shadow: var(--rv-shadow-lg);
	animation: rvh-sube var(--rv-duration-md) var(--rv-ease);
}
.rvh-sheet__panel::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto var(--rv-space-3); border-radius: 2px; background: var(--rv-line); }
.rvh .rvh-sheet__cerrar {
	display: block;
	width: 100%;
	min-height: 48px;
	margin-bottom: var(--rv-space-3);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius-pill);
	background: #fff;
	color: var(--rv-ink);
	font-weight: 600;
	font-size: var(--rv-text-sm);
	cursor: pointer;
}
.rvh.rvh.rvh button.rvh-sheet__cerrar:hover { color: var(--rv-ink) !important; }
.rvh-sheet .rvh-result { border: 0; padding: 0; background: #fff; position: static; }
@keyframes rvh-sube { from { transform: translateY(100%); } to { transform: none; } }
@keyframes rvh-fundido { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rvh-sheet__panel, .rvh-sheet__fondo { animation: none; } }
.rvh .rvh-mini strong { color: #fff; font-size: var(--rv-text-lg); font-variant-numeric: tabular-nums; }
.rvh .rvh-mini__go {
	min-height: 44px;
	padding: 0 var(--rv-space-4);
	border: 0;
	border-radius: var(--rv-radius-pill);
	background: #fff;
	color: var(--rv-ink);
	font-weight: 600;
	font-size: var(--rv-text-xs);
	cursor: pointer;
	white-space: nowrap;
}
.rvh.rvh.rvh button.rvh-mini__go:hover { color: var(--rv-ink) !important; }
@media (min-width: 860px) { .rvh-mini { display: none; } }

/* ---------- Pie de la herramienta ---------- */
.rvh__foot {
	padding: var(--rv-space-4) var(--rvh-gap);
	border-top: 1px solid var(--rv-line);
	background: var(--rv-bg-soft);
	font-size: var(--rv-text-xs);
	color: var(--rv-muted);
	line-height: 1.5;
}
.rvh__foot p { margin: 0; }

/* ---------- Tarjetas: índice y promo en artículos ---------- */
.rvh-grid {
	display: grid;
	gap: var(--rv-space-5);
	grid-template-columns: 1fr;
	margin: var(--rv-space-6) 0;
}
/* Columnas según el número de tarjetas (clase que pone rv_herr_columnas()),
   para que la última fila no quede coja. */
@media (min-width: 640px) { .rvh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .rvh-grid--c3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) {
	.rvh-grid--c4 { grid-template-columns: repeat(4, 1fr); }
	.rvh-grid--c4 .rvh-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
	.rvh-grid--c4 .rvh-card__icon { grid-row: auto; }
	.rvh-grid--c4 .rvh-card__go { grid-column: 1; }
}
.rvh-card {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: 1fr auto;
	gap: var(--rv-space-2) var(--rv-space-4);
	padding: var(--rv-space-5);
	background: #fff;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius-lg);
	box-shadow: var(--rv-shadow-xs);
	transition: box-shadow var(--rv-duration) var(--rv-ease), transform var(--rv-duration) var(--rv-ease);
}
@media (hover: hover) { .rvh-card:hover { box-shadow: var(--rv-shadow-md); transform: translateY(-2px); } }
.rvh-card__icon {
	grid-row: 1 / 3;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--rv-accent-soft);
	color: var(--rv-accent-dark);
}
.rvh-card__icon svg { width: 24px; height: 24px; }
.rvh-card__tipo { font-size: var(--rv-text-sm); font-weight: 500; color: #5F6B78; }
.rvh-card .rvh-card__title { margin: var(--rv-space-1) 0 var(--rv-space-2); font-size: var(--rv-text-lg); line-height: var(--rv-leading-snug); text-wrap: pretty; }
.rvh-card__title a { color: var(--rv-ink); text-decoration: none; }
.rvh-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.rvh-card__title a:focus-visible { outline: none; }
.rvh-card:focus-within { outline: 2px solid var(--rv-ink); outline-offset: 2px; }
.rvh-card__desc { margin: 0; font-size: var(--rv-text-sm); color: var(--rv-text); line-height: 1.5; text-wrap: pretty; }
.rvh-card__go { grid-column: 2; font-size: var(--rv-text-sm); font-weight: 600; color: var(--rv-ink); }

.rvh-promo { margin: var(--rv-space-6) 0; }
.rvh-card--promo { background: var(--rv-bg-soft); box-shadow: none; }

/* Cabecera con foto de las páginas de herramientas: el h1 hereda el color
   tinta de los títulos y no se lee sobre la foto. */
.rv-page-hero .rv-page-hero-inner h1 { color: #fff; }

/* ---------- Página propia de una herramienta (body.rvh-pagina) ----------
   Cabecera propia (rv_herr_cabecera): foto a sangre, degradado lateral para
   que se vea la foto, etiqueta, H1, descripción y tres sellos. Lo justo de alto
   para que la herramienta se vea sin bajar. */
.rvh-cab {
	position: relative;
	isolation: isolate;
	width: 100vw;
	margin: 0 0 var(--rv-space-6) calc(50% - 50vw);
	min-height: 300px;
	display: flex;
	align-items: center;
	color: #fff;
	background: var(--rv-ink);
	overflow: hidden;
}
.rvh-cab__foto { position: absolute; inset: 0; z-index: -1; }
.rvh-cab__foto img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 60%; }
.rvh-cab__foto::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(20, 33, 46, 0.92) 0%, rgba(20, 33, 46, 0.78) 38%, rgba(20, 33, 46, 0.25) 75%, rgba(20, 33, 46, 0.1) 100%);
}
.rvh-cab__dentro {
	width: 100%;
	max-width: var(--rv-container);
	margin: 0 auto;
	padding: var(--rv-space-7) var(--rv-gutter);
}
.rvh-cab__tipo {
	display: inline-flex;
	align-items: center;
	gap: var(--rv-space-2);
	padding: 6px 14px 6px 10px;
	border-radius: var(--rv-radius-pill);
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.28);
	font-size: var(--rv-text-sm);
	font-weight: 600;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.rvh-cab__tipo svg { width: 18px; height: 18px; color: #F2C6A6; }
.rv-page-content .rvh-cab__titulo {
	margin: var(--rv-space-4) 0 var(--rv-space-3);
	max-width: 30ch;
	font-family: var(--rv-font-serif);
	font-size: clamp(2rem, 1.45rem + 2vw, 2.9rem);
	line-height: 1.08;
	letter-spacing: var(--rv-tracking-tight);
	color: #fff;
	text-wrap: balance;
}
.rvh-cab__sub { margin: 0; max-width: 38rem; font-size: var(--rv-text-lg); line-height: 1.5; color: rgba(255, 255, 255, 0.88); text-wrap: pretty; }
.rv-page-content .rvh-cab__sellos { display: flex; flex-wrap: wrap; gap: var(--rv-space-2) var(--rv-space-5); margin: var(--rv-space-5) 0 0; padding: 0; list-style: none; }
.rv-page-content .rvh-cab__sellos li { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--rv-text-sm); color: rgba(255, 255, 255, 0.92); }
.rvh-cab__sellos svg { width: 16px; height: 16px; color: #A8D08D; flex: 0 0 auto; }
.rvh-pagina .rv-page-content > .rvh-cab + .rvh,
.rvh-pagina .rv-page-content > script + .rvh { margin-top: 0; }
@media (max-width: 768px) {
	.rvh-cab { min-height: 0; margin-bottom: var(--rv-space-5); }
	.rvh-cab__foto::after { background: linear-gradient(180deg, rgba(20, 33, 46, 0.55) 0%, rgba(20, 33, 46, 0.9) 100%); }
	.rvh-cab__dentro { padding: var(--rv-space-5) var(--rv-gutter) var(--rv-space-6); }
	.rvh-cab__tipo { font-size: var(--rv-text-xs); padding: 4px 12px 4px 8px; }
	.rv-page-content .rvh-cab__titulo { font-size: 1.75rem; margin: var(--rv-space-3) 0 var(--rv-space-2); }
	.rvh-cab__sub { font-size: var(--rv-text-sm); }
	.rv-page-content .rvh-cab__sellos { gap: 4px var(--rv-space-4); margin-top: var(--rv-space-3); }
	.rv-page-content .rvh-cab__sellos li { font-size: var(--rv-text-xs); }
	/* Migas en una sola línea: el título ya está en la cabecera */
	.rvh-pagina .rv-breadcrumbs ol { flex-wrap: nowrap; overflow: hidden; }
	.rvh-pagina .rv-breadcrumbs li { flex: 0 0 auto; }
	.rvh-pagina .rv-breadcrumbs li:last-child { flex: 1 1 auto; min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.rvh-pagina .rv-breadcrumbs span[aria-current="page"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.rvh-pagina .rv-breadcrumbs li:last-child::before { margin-right: 0.5rem; }
}
@media print { .rvh-cab { display: none !important; } }

/* «Otras herramientas» al final de cada página */
/* El tema quita el margen al último bloque de la página y el contenedor no tiene padding: en las
   páginas de herramientas (y en su índice) el aire hasta el pie va en el contenedor. */
body.rvh-pagina .rv-page-content,
.rv-page-content:has(.rvh-grid) { padding-bottom: var(--rv-space-8); }
.rvh-relacionadas { margin: var(--rv-space-7) 0 var(--rv-space-6); }
.rvh-relacionadas > h2 { margin: 0 0 var(--rv-space-4); }
.rvh-relacionadas .rvh-grid { margin: 0; }
@media (min-width: 900px) { .rvh-relacionadas .rvh-grid { grid-template-columns: repeat(3, 1fr); } }
.rvh-relacionadas__todas { margin: var(--rv-space-4) 0 0; font-weight: 600; }

/* ---------- Sección de portada en /recursos/ ([rv_herramientas_seccion]) ---------- */
.rvh-sec {
	width: 100vw;
	margin: 0 0 0 calc(50% - 50vw);
	padding: var(--rv-space-8) 0;
	background: #F4F1EC;
	color: var(--rv-text);
	font-family: var(--rv-font-sans);
}
.rvh-sec__dentro { max-width: var(--rv-container); margin: 0 auto; padding: 0 var(--rv-gutter); }
.rvh-sec__cab { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: var(--rv-space-7); align-items: center; margin-bottom: var(--rv-space-7); }
.rvh-sec__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: var(--rv-radius-pill);
	background: #fff;
	border: 1px solid #E3DCD0;
	color: var(--rv-ink);
	font-size: var(--rv-text-sm);
	font-weight: 600;
}
.rvh-sec__pill::before { content: ""; width: 14px; height: 8px; border-left: 2.4px solid #5A8C3F; border-bottom: 2.4px solid #5A8C3F; transform: rotate(-45deg) translateY(-2px); }
.rv-page-content .rvh-sec__titulo {
	margin: var(--rv-space-4) 0 var(--rv-space-3);
	font-family: var(--rv-font-serif);
	font-size: clamp(1.9rem, 1.35rem + 2.1vw, 2.75rem);
	line-height: 1.1;
	letter-spacing: var(--rv-tracking-tight);
	color: var(--rv-ink);
	text-align: left;
	text-wrap: balance;
}
.rv-page-content .rvh-sec__lead { margin: 0; max-width: 36rem; font-size: var(--rv-text-lg); line-height: 1.55; color: var(--rv-text); text-align: left; text-wrap: pretty; }
.rv-page-content .rvh-sec__acciones { margin: var(--rv-space-5) 0 0; }
/* Muestra de resultados reales de las herramientas */
.rvh-sec__muestra { position: relative; min-height: 310px; }
.rvh-sec__tarjeta {
	position: absolute;
	top: 0;
	left: 0;
	width: min(100%, 300px);
	display: grid;
	gap: 6px;
	padding: var(--rv-space-5);
	background: #fff;
	border: 1px solid #E9E3D9;
	border-radius: var(--rv-radius-lg);
	box-shadow: var(--rv-shadow-md);
	transform: rotate(-2deg);
}
.rvh-sec__tarjeta--b { top: auto; left: auto; bottom: 0; right: 0; transform: rotate(2deg); }
.rvh-sec__mini-tit { font-size: var(--rv-text-xs); font-weight: 600; color: #5F6B78; }
.rvh-sec__mini-num { font-family: var(--rv-font-serif); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--rv-ink); letter-spacing: var(--rv-tracking-tight); }
.rvh-sec__mini-num small { font-size: var(--rv-text-lg); font-weight: 600; }
.rvh-sec__mini-pie { font-size: var(--rv-text-sm); color: var(--rv-accent-dark); font-weight: 600; }
/* Grupos */
.rvh-sec__grupos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rv-space-6); }
.rv-page-content .rvh-sec__grupo-tit { margin: 0 0 var(--rv-space-3); font-family: var(--rv-font-sans); font-size: var(--rv-text-base); font-weight: 700; color: var(--rv-ink); text-align: left; }
.rv-page-content .rvh-sec__lista { display: grid; gap: var(--rv-space-3); margin: 0; padding: 0; list-style: none; }
.rv-page-content .rvh-sec__lista li { margin: 0; padding: 0; }
.rv-page-content .rvh-sec__lista li::before { content: none; }
.rv-page-content a.rvh-sec__item {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) 20px;
	align-items: center;
	gap: var(--rv-space-4);
	min-height: 76px;
	padding: var(--rv-space-3) var(--rv-space-5) var(--rv-space-3) var(--rv-space-4);
	background: #fff;
	border: 1px solid #E9E3D9;
	border-radius: var(--rv-radius-lg);
	color: var(--rv-ink);
	text-decoration: none;
	transition: box-shadow var(--rv-duration) var(--rv-ease), transform var(--rv-duration) var(--rv-ease);
}
.rvh-sec__icono { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--rv-accent-soft); color: var(--rv-accent-dark); }
.rvh-sec__icono svg { width: 22px; height: 22px; }
.rvh-sec__txt b { display: block; font-size: var(--rv-text-base); font-weight: 600; color: var(--rv-ink); line-height: 1.3; }
.rvh-sec__txt small { display: block; margin-top: 2px; font-size: var(--rv-text-sm); color: #5F6B78; line-height: 1.4; }
.rvh-sec__flecha { width: 20px; height: 20px; color: #5F6B78; transition: transform var(--rv-duration) var(--rv-ease), color var(--rv-duration) var(--rv-ease); }
@media (hover: hover) {
	.rv-page-content a.rvh-sec__item:hover { box-shadow: var(--rv-shadow-md); transform: translateY(-2px); color: var(--rv-ink); }
	.rv-page-content a.rvh-sec__item:hover .rvh-sec__flecha { color: var(--rv-ink); transform: translateX(3px); }
}
.rv-page-content a.rvh-sec__item:focus-visible { outline: 2px solid var(--rv-ink); outline-offset: 2px; }
@media (max-width: 859px) {
	.rvh-sec { padding: var(--rv-space-7) 0; }
	.rvh-sec__cab { grid-template-columns: 1fr; gap: var(--rv-space-6); margin-bottom: var(--rv-space-6); }
	.rvh-sec__grupos { grid-template-columns: 1fr; }
	.rvh-sec__muestra { min-height: 290px; max-width: 420px; }
}
@media (max-width: 520px) {
	.rvh-sec__muestra { display: none; }
	.rv-page-content .rvh-sec__lead { font-size: var(--rv-text-base); }
}

/* ---------- Impresión ---------- */
@media print {
	.rv-site-header, .rv-site-footer, .rv-breadcrumbs, .rv-page-hero, .rv-sidebar,
	.rvh-noprint, #cmplz-cookiebanner-container, .cmplz-cookiebanner { display: none !important; }
	.rvh { box-shadow: none; border-color: #ccc; margin: 0; }
	.rvh-result--sticky { position: static; }
}

/* Índice con un número impar de tarjetas en dos columnas: la última ocupa todo el ancho
   para que la fila no quede coja. */
@media (min-width: 640px) {
	.rvh-grid--c2 > .rvh-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.rvh-grid--c2 > .rvh-card:last-child:nth-child(odd) .rvh-card__desc { max-width: 62ch; }
}
