/*
 * Calculadoras Perú
 * Las variables --cp-* se pueden redefinir desde el tema.
 */

.cpe {
	--_tinta: var(--cp-tinta, #1a2433);
	--_tenue: var(--cp-tenue, #556070);
	--_fondo: var(--cp-fondo, #edf0f3);
	--_papel: var(--cp-papel, #fff);
	--_linea: var(--cp-linea, #d3d9e0);
	--_linea-fuerte: var(--cp-linea-fuerte, #9aa5b2);
	--_sello: var(--cp-sello, #3b3494);
	--_foco: var(--cp-foco, rgba(59, 52, 148, 0.32));
	--_resaltador: var(--cp-resaltador, #ffe45c);
	--_aviso-fondo: var(--cp-aviso-fondo, #fff4d6);
	--_aviso-texto: var(--cp-aviso-texto, #5c4300);
	--_sans: var(--cp-sans, "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	--_mono: var(--cp-mono, "Atkinson Hyperlegible Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace);
	--_radio: 6px;

	font-family: var(--_sans);
	color: var(--_tinta);
}

.cpe *,
.cpe *::before,
.cpe *::after {
	box-sizing: border-box;
}

.cpe .cpe-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------
 * Contenedor: el formulario sobre la "mesa" y la boleta impresa al lado
 * --------------------------------------------------------------- */

.cpe.cpe-calc {
	margin: 1.75rem 0 2.5rem;
}

.cpe .cpe-calc__cuerpo {
	display: grid;
	gap: 1.75rem;
	align-items: start;
	padding: clamp(1.1rem, 3vw, 2rem);
	background: var(--_fondo);
	border-radius: 12px;
}

@media (min-width: 54rem) {
	.cpe .cpe-calc__cuerpo {
		grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem);
		gap: 2.25rem;
	}

	.cpe.cpe-calc .cpe-resultado {
		position: sticky;
		top: 1.5rem;
	}
}

.cpe.cpe-calc--compacta {
	margin: 0;
}

.cpe.cpe-calc--compacta .cpe-calc__cuerpo {
	grid-template-columns: minmax(0, 1fr);
	padding: 0;
	background: none;
	gap: 1.5rem;
}

/* ------------------------------------------------------------------
 * Formulario
 * --------------------------------------------------------------- */

.cpe .cpe-form {
	display: grid;
	gap: 1.35rem;
	min-width: 0;
	margin: 0;
}

.cpe .cpe-fila {
	display: flex;
	flex-wrap: wrap;
	gap: 1.35rem 1rem;
	align-items: end;
}

.cpe .cpe-fila > .cpe-opciones {
	flex: 0 1 auto;
}

.cpe .cpe-fila > .cpe-campo:not(.cpe-opciones) {
	flex: 1 1 7rem;
}

.cpe .cpe-campo {
	display: grid;
	gap: 0.45rem;
	min-width: 0;
	margin: 0;
}

.cpe .cpe-campo[hidden],
.cpe [data-cpe-campo][hidden] {
	display: none;
}

.cpe .cpe-grupo {
	display: grid;
	gap: 1.35rem;
}

.cpe .cpe-campo > label,
.cpe .cpe-opciones > legend {
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.3;
}

.cpe .cpe-opcional {
	font-weight: 400;
	color: var(--_tenue);
}

.cpe .cpe-ayuda {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--_tenue);
}

.cpe .cpe-entrada {
	display: flex;
	align-items: center;
	min-height: 3.1rem;
	background: var(--_papel);
	border: 1.5px solid var(--_linea-fuerte);
	border-radius: var(--_radio);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.cpe .cpe-entrada:focus-within {
	border-color: var(--_sello);
	box-shadow: 0 0 0 3px var(--_foco);
}

.cpe .cpe-entrada__prefijo {
	padding-left: 0.9rem;
	font-weight: 600;
	color: var(--_tenue);
}

.cpe .cpe-entrada input {
	flex: 1;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0.7rem 0.9rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1.125rem;
	font-variant-numeric: tabular-nums;
	outline: none;
	box-shadow: none;
}

.cpe .cpe-entrada--soles input {
	padding-left: 0.45rem;
}

.cpe .cpe-select {
	width: 100%;
	min-height: 3.1rem;
	margin: 0;
	padding: 0.65rem 2.5rem 0.65rem 0.9rem;
	border: 1.5px solid var(--_linea-fuerte);
	border-radius: var(--_radio);
	background: var(--_papel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%231a2433' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
	color: inherit;
	font: inherit;
	font-size: 1rem;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.cpe .cpe-select:focus {
	outline: none;
	border-color: var(--_sello);
	box-shadow: 0 0 0 3px var(--_foco);
}

/* Opciones con aspecto de botones */

.cpe .cpe-opciones {
	display: block;
	min-width: 0;
	padding: 0;
	border: 0;
}

.cpe .cpe-opciones > .cpe-ayuda {
	margin-top: 0.45rem;
}

.cpe .cpe-opciones > legend {
	float: left;
	width: 100%;
	margin-bottom: 0.45rem;
	padding: 0;
}

.cpe .cpe-opciones__lista {
	clear: both;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.cpe .cpe-opcion {
	position: relative;
}

.cpe .cpe-opcion input {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.cpe .cpe-opcion label {
	display: inline-flex;
	align-items: center;
	min-height: 2.85rem;
	padding: 0.55rem 1.05rem;
	border: 1.5px solid var(--_linea-fuerte);
	border-radius: var(--_radio);
	background: var(--_papel);
	font-weight: 600;
	line-height: 1.25;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.cpe .cpe-opcion input:checked + label {
	background: var(--_sello);
	border-color: var(--_sello);
	color: #fff;
}

.cpe .cpe-opcion input:focus-visible + label {
	outline: 3px solid var(--_sello);
	outline-offset: 2px;
}

.cpe .cpe-opcion input:disabled + label {
	cursor: not-allowed;
}

.cpe .cpe-opcion input:disabled + label {
	color: var(--_tenue);
	border-style: dashed;
}

/* Casilla */

.cpe .cpe-casilla {
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	column-gap: 0.65rem;
}

.cpe .cpe-casilla input {
	width: 1.35rem;
	height: 1.35rem;
	margin: 0;
	accent-color: var(--_sello);
	cursor: pointer;
}

.cpe .cpe-casilla label {
	font-weight: 600;
	cursor: pointer;
}

.cpe .cpe-casilla .cpe-ayuda {
	grid-column: 2;
}

/* Datos adicionales plegables */

.cpe .cpe-mas-opciones {
	border-top: 1px solid var(--_linea-fuerte);
	padding-top: 0.25rem;
}

.cpe .cpe-mas-opciones > summary {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 0;
	color: var(--_sello);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.cpe .cpe-mas-opciones > summary::-webkit-details-marker {
	display: none;
}

.cpe .cpe-mas-opciones > summary::before {
	content: "+";
	display: inline-grid;
	place-items: center;
	width: 1.35rem;
	height: 1.35rem;
	border: 1.5px solid currentColor;
	border-radius: 4px;
	line-height: 1;
}

.cpe .cpe-mas-opciones[open] > summary::before {
	content: "\2212";
}

.cpe .cpe-mas-opciones > summary:focus-visible {
	outline: 3px solid var(--_sello);
	outline-offset: 2px;
}

.cpe .cpe-mas-opciones__campos {
	display: grid;
	gap: 1.35rem;
	padding: 0.75rem 0 0.25rem;
}

/* ------------------------------------------------------------------
 * Editor de factura (calculadora de IGV)
 * --------------------------------------------------------------- */

.cpe .cpe-form {
	container-type: inline-size;
}

.cpe .cpe-factura {
	display: grid;
	gap: 0.75rem;
}

.cpe .cpe-factura__filas {
	display: grid;
	gap: 0.6rem;
}

.cpe .cpe-factura__cabecera,
.cpe .cpe-factura__fila {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 4.5rem 8.5rem 6.5rem 2.5rem;
	gap: 0.5rem;
	align-items: center;
}

.cpe .cpe-factura__cabecera {
	color: var(--_tenue);
	font-size: 0.8125rem;
	font-weight: 600;
}

.cpe .cpe-factura__cabecera span:nth-child(4) {
	text-align: right;
}

.cpe .cpe-factura__desc,
.cpe .cpe-factura__cant {
	width: 100%;
	min-width: 0;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.55rem 0.7rem;
	border: 1.5px solid var(--_linea-fuerte);
	border-radius: var(--_radio);
	background: var(--_papel);
	color: inherit;
	font: inherit;
}

.cpe .cpe-factura__cant {
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.cpe .cpe-factura__desc:focus,
.cpe .cpe-factura__cant:focus {
	outline: none;
	border-color: var(--_sello);
	box-shadow: 0 0 0 3px var(--_foco);
}

.cpe .cpe-factura__precio {
	min-height: 2.75rem;
}

.cpe .cpe-factura__precio input {
	padding: 0.5rem 0.65rem 0.5rem 0.35rem;
	font-size: 1rem;
	text-align: right;
}

.cpe .cpe-factura__importe {
	font-family: var(--_mono);
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.cpe .cpe-factura__quitar {
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: var(--_radio);
	background: transparent;
	color: var(--_tenue);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.cpe .cpe-factura__quitar:hover {
	background: var(--_papel);
	color: #8a2e12;
}

.cpe .cpe-factura__quitar:focus-visible,
.cpe .cpe-boton-secundario:focus-visible {
	outline: 3px solid var(--_sello);
	outline-offset: 2px;
}

.cpe .cpe-boton-secundario {
	justify-self: start;
	min-height: 2.6rem;
	padding: 0.5rem 1rem;
	border: 1.5px dashed var(--_sello);
	border-radius: var(--_radio);
	background: transparent;
	color: var(--_sello);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.cpe .cpe-boton-secundario:hover {
	background: var(--_papel);
}

@container (max-width: 34rem) {
	.cpe .cpe-factura__cabecera {
		display: none;
	}

	.cpe .cpe-factura__fila {
		grid-template-columns: 4.5rem minmax(0, 1fr) 2.5rem;
		grid-template-areas: "desc desc desc" "cant precio quitar" "importe importe importe";
		padding-bottom: 0.6rem;
		border-bottom: 1px solid var(--_linea-fuerte);
	}

	.cpe .cpe-factura__desc { grid-area: desc; }
	.cpe .cpe-factura__cant { grid-area: cant; }
	.cpe .cpe-factura__precio { grid-area: precio; }
	.cpe .cpe-factura__importe { grid-area: importe; }
	.cpe .cpe-factura__quitar { grid-area: quitar; }
}

/* Resultado: boleta + botones de copiar e imprimir */

.cpe .cpe-resultado {
	display: grid;
	gap: 0.9rem;
	min-width: 0;
}

.cpe .cpe-acciones {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.5rem;
}

.cpe .cpe-acciones[hidden] {
	display: none;
}

.cpe .cpe-accion {
	min-height: 2.5rem;
	padding: 0.45rem 0.95rem;
	border: 1.5px solid var(--_linea-fuerte);
	border-radius: var(--_radio);
	background: var(--_papel);
	color: var(--_tinta);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
}

.cpe .cpe-accion:hover {
	border-color: var(--_sello);
	color: var(--_sello);
}

.cpe .cpe-accion:focus-visible {
	outline: 3px solid var(--_sello);
	outline-offset: 2px;
}

.cpe .cpe-boleta__letras {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	letter-spacing: 0.01em;
	overflow-wrap: anywhere;
}

.cpe .cpe-linea--item {
	font-size: 0.875rem;
}

.cpe .cpe-linea--item .cpe-linea__etiqueta {
	overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------
 * Boleta
 * --------------------------------------------------------------- */

.cpe .cpe-boleta-envoltura {
	filter: drop-shadow(0 1px 1px rgba(26, 36, 51, 0.14)) drop-shadow(0 10px 22px rgba(26, 36, 51, 0.1));
}

.cpe .cpe-boleta {
	--diente: 14px;
	padding: 1.35rem 1.35rem calc(1.35rem + var(--diente));
	background: var(--_papel);
	font-family: var(--_mono);
	font-size: 0.9375rem;
	line-height: 1.45;
	-webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--diente) 100%;
	mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--diente) 100%;
}

.cpe .cpe-boleta__titulo {
	margin: 0 0 0.85rem;
	padding-bottom: 0.7rem;
	border-bottom: 1.5px dashed var(--_linea-fuerte);
	font-family: var(--_sans);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--_tenue);
	text-align: center;
}

.cpe .cpe-boleta__lineas {
	min-height: 6.5rem;
}

.cpe .cpe-linea {
	display: flex;
	align-items: baseline;
	gap: 0.45rem;
	padding: 0.28rem 0;
}

.cpe .cpe-linea__etiqueta {
	flex: 0 1 auto;
	min-width: 0;
}

.cpe .cpe-linea__puntos {
	flex: 1 1 0.75rem;
	min-width: 0.75rem;
	border-bottom: 2px dotted var(--_linea);
	transform: translateY(-0.3em);
}

.cpe .cpe-linea__valor {
	flex: none;
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.cpe .cpe-linea--sub {
	color: var(--_tenue);
	font-size: 0.875rem;
}

.cpe .cpe-linea--total {
	padding-top: 0.55rem;
	font-size: 1.3125rem;
	font-weight: 600;
	line-height: 1.25;
}

.cpe .cpe-linea--total .cpe-linea__etiqueta {
	font-family: var(--_sans);
	font-size: 1rem;
	font-weight: 700;
}

.cpe .cpe-linea--total mark {
	padding: 0 0.15em;
	margin-right: -0.15em;
	background: linear-gradient(var(--_resaltador), var(--_resaltador)) no-repeat 0 88% / 100% 58%;
	color: inherit;
}

.cpe .cpe-resaltar {
	animation: cpe-resaltar 0.42s cubic-bezier(0.3, 0.7, 0.4, 1);
}

@keyframes cpe-resaltar {
	from {
		background-size: 0% 58%;
	}
}

.cpe .cpe-boleta__corte {
	height: 0;
	margin: 0.55rem 0;
	border: 0;
	border-top: 1.5px dashed var(--_linea-fuerte);
}

.cpe .cpe-boleta__vacio,
.cpe .cpe-boleta__nota,
.cpe .cpe-boleta__alerta {
	font-family: var(--_sans);
	line-height: 1.45;
}

.cpe .cpe-boleta__vacio {
	margin: 0;
	color: var(--_tenue);
}

.cpe .cpe-boleta__nota {
	margin: 0.8rem 0 0;
	font-size: 0.875rem;
	color: var(--_tenue);
}

.cpe .cpe-boleta__alerta {
	margin: 0.8rem 0 0;
	padding: 0.65rem 0.8rem;
	border-radius: 4px;
	background: var(--_aviso-fondo);
	color: var(--_aviso-texto);
	font-size: 0.9375rem;
}

.cpe .cpe-boleta__alerta:first-child {
	margin-top: 0;
}

/* Sello de tinta con la fecha de revisión */

.cpe .cpe-sello {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: max-content;
	margin: 1.4rem 0.25rem 0 auto;
	padding: 0.35rem 0.75rem 0.4rem;
	border: 2px solid var(--_sello);
	border-radius: 7px;
	box-shadow: inset 0 0 0 2px var(--_papel), inset 0 0 0 3.5px var(--_sello);
	color: var(--_sello);
	font-family: var(--_sans);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	opacity: 0.86;
	transform: rotate(-4deg);
}

.cpe .cpe-sello time {
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
}

/* Enlace bajo la calculadora compacta */

.cpe .cpe-mas {
	margin: 1.1rem 0 0;
	font-size: 0.9375rem;
}

.cpe .cpe-mas a {
	color: var(--_sello);
	font-weight: 700;
	text-underline-offset: 0.2em;
}

/* ------------------------------------------------------------------
 * Fórmula, fuentes y aviso
 * --------------------------------------------------------------- */

.cpe .cpe-pie {
	max-width: 46rem;
	margin-top: 1.25rem;
}

.cpe .cpe-detalle {
	border-bottom: 1px solid var(--_linea);
}

.cpe .cpe-detalle > summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem 0;
	font-weight: 700;
	font-size: 1.0625rem;
	cursor: pointer;
	list-style: none;
}

.cpe .cpe-detalle > summary::-webkit-details-marker {
	display: none;
}

.cpe .cpe-detalle > summary::after {
	content: "+";
	flex: none;
	font-size: 1.35rem;
	font-weight: 400;
	line-height: 1;
	color: var(--_sello);
}

.cpe .cpe-detalle[open] > summary::after {
	content: "\2212";
}

.cpe .cpe-detalle > summary:focus-visible {
	outline: 3px solid var(--_sello);
	outline-offset: 2px;
}

.cpe .cpe-detalle__contenido {
	padding: 0 0 1.1rem;
}

.cpe .cpe-detalle__contenido > :first-child {
	margin-top: 0;
}

.cpe .cpe-detalle__contenido p,
.cpe .cpe-detalle__contenido ul {
	margin: 0 0 0.85rem;
}

.cpe .cpe-aviso {
	margin: 1.1rem 0 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--_tenue);
}

.cpe .cpe-fuentes {
	margin: 0;
	padding-left: 1.1rem;
}

.cpe .cpe-fuentes li + li {
	margin-top: 0.4rem;
}

.cpe .cpe-fuentes a {
	color: var(--_sello);
	text-underline-offset: 0.18em;
}

/* Tablas */

.cpe .cpe-tabla-scroll {
	overflow-x: auto;
	margin: 0 0 1rem;
}

.cpe .cpe-tabla {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.cpe .cpe-tabla th,
.cpe .cpe-tabla td {
	padding: 0.55rem 0.7rem 0.55rem 0;
	border-bottom: 1px solid var(--_linea);
	text-align: left;
	vertical-align: top;
}

.cpe .cpe-tabla thead th {
	border-bottom-width: 2px;
	border-bottom-color: var(--_tinta);
	font-size: 0.875rem;
}

.cpe .cpe-tabla td:nth-child(2) {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.cpe .cpe-tabla__grupo th {
	padding-top: 1rem;
	color: var(--_tenue);
	font-size: 0.875rem;
}

/* ------------------------------------------------------------------
 * Valores en uso
 * --------------------------------------------------------------- */

.cpe.cpe-valores dl {
	margin: 0;
}

.cpe .cpe-valores__fila {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.15rem 1rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--_linea);
}

.cpe.cpe-valores dt {
	font-weight: 600;
}

.cpe.cpe-valores dd {
	margin: 0;
}

.cpe .cpe-valores__monto {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.cpe .cpe-valores__nota {
	grid-column: 1 / -1;
	font-size: 0.8125rem;
	color: var(--_tenue);
}

.cpe .cpe-valores__revision {
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	color: var(--_tenue);
}

/* ------------------------------------------------------------------
 * Próximas fechas
 * --------------------------------------------------------------- */

.cpe.cpe-fechas {
	display: grid;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 48rem) {
	.cpe.cpe-fechas {
		grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
		gap: 1.5rem;
	}
}

.cpe .cpe-fechas__item {
	display: grid;
	align-content: start;
	gap: 0.5rem;
	padding-top: 0.9rem;
	border-top: 3px solid var(--_linea-fuerte);
}

.cpe .cpe-fechas__item:first-child {
	border-top-color: var(--_sello);
}

.cpe .cpe-fechas__dia {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.15rem 0.45rem;
}

.cpe .cpe-fechas__num {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.15;
}

.cpe .cpe-fechas__mes {
	color: var(--_tenue);
	font-variant-numeric: tabular-nums;
}

.cpe .cpe-fechas__titulo,
.cpe .cpe-fechas__nota {
	margin: 0;
}

.cpe .cpe-fechas__titulo {
	font-weight: 700;
}

.cpe .cpe-fechas__titulo a {
	color: var(--_tinta);
	text-decoration-color: var(--_sello);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.cpe .cpe-fechas__titulo a:hover {
	color: var(--_sello);
}

.cpe .cpe-fechas__nota {
	font-size: 0.9375rem;
	color: var(--_tenue);
}

/* ------------------------------------------------------------------
 * Índice de calculadoras
 * --------------------------------------------------------------- */

.cpe.cpe-indice {
	display: grid;
	gap: 2rem;
}

@media (min-width: 48rem) {
	.cpe.cpe-indice:has(.cpe-indice__grupo + .cpe-indice__grupo) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 3rem;
	}
}

.cpe .cpe-indice__titulo {
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--_tinta);
	font-size: 1.0625rem;
}

.cpe .cpe-indice__lista {
	display: grid;
	gap: 1.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cpe .cpe-indice__enlace {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--_tinta);
}

a.cpe-indice__enlace {
	text-decoration: underline;
	text-decoration-color: var(--_sello);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.22em;
}

a.cpe-indice__enlace:hover {
	color: var(--_sello);
}

.cpe .cpe-indice__desc {
	max-width: 44ch;
	margin: 0.35rem 0 0;
	color: var(--_tenue);
}

/* ------------------------------------------------------------------
 * Caja de enlace a una calculadora y artículos relacionados
 * --------------------------------------------------------------- */

.cpe.cpe-cta {
	display: grid;
	gap: 0.5rem;
	margin: 2rem 0;
	padding: 1.4rem 1.5rem;
	background: var(--_fondo);
	border-radius: 10px;
}

.cpe .cpe-cta__titulo {
	margin: 0;
	font-size: 1.1875rem;
	font-weight: 700;
}

.cpe .cpe-cta__texto {
	margin: 0;
	color: var(--_tenue);
}

.cpe .cpe-cta__boton {
	justify-self: start;
	margin-top: 0.4rem;
	padding: 0.7rem 1.15rem;
	border-radius: var(--_radio);
	background: var(--_sello);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.cpe .cpe-cta__boton:hover {
	background: var(--_tinta);
}

.cpe .cpe-cta__boton:focus-visible {
	outline: 3px solid var(--_sello);
	outline-offset: 3px;
}

.cpe.cpe-relacionados {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 2px solid var(--_tinta);
}

.cpe.cpe-relacionados h2 {
	margin: 0 0 1rem;
	font-size: 1.375rem;
}

.cpe.cpe-relacionados ul {
	display: grid;
	gap: 1.1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cpe.cpe-relacionados li {
	display: grid;
	gap: 0.25rem;
}

.cpe.cpe-relacionados a {
	color: var(--_tinta);
	font-weight: 700;
	text-decoration-color: var(--_sello);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

.cpe.cpe-relacionados a:hover {
	color: var(--_sello);
}

.cpe.cpe-relacionados span {
	color: var(--_tenue);
	font-size: 0.9375rem;
}

/* ------------------------------------------------------------------
 * Impresión desde el botón «Imprimir»: solo la boleta
 * --------------------------------------------------------------- */

@media print {
	body.cpe-imprimiendo * {
		visibility: hidden !important;
	}

	body.cpe-imprimiendo .cpe-imprimir .cpe-boleta-envoltura,
	body.cpe-imprimiendo .cpe-imprimir .cpe-boleta-envoltura * {
		visibility: visible !important;
	}

	body.cpe-imprimiendo .cpe-imprimir .cpe-resultado {
		position: static !important;
	}

	body.cpe-imprimiendo .cpe-imprimir .cpe-boleta-envoltura {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		max-width: 26rem;
		filter: none;
	}

	.cpe .cpe-boleta {
		-webkit-mask: none;
		mask: none;
		border: 1px solid #999;
	}

	.cpe .cpe-acciones {
		display: none !important;
	}
}

/* ------------------------------------------------------------------
 * Movimiento reducido
 * --------------------------------------------------------------- */

@media (max-width: 30rem) {
	.cpe .cpe-linea--total {
		font-size: 1.125rem;
	}

	.cpe .cpe-linea--total .cpe-linea__etiqueta {
		font-size: 0.9375rem;
	}

	.cpe .cpe-boleta {
		padding-inline: 1.1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cpe .cpe-resaltar {
		animation: none;
	}

	.cpe .cpe-entrada,
	.cpe .cpe-opcion label {
		transition: none;
	}
}
