/*
Theme Name: Enlinea Tangram
Version: 1.0.1
Description: Enlinea's own theme: a tangram set on a periwinkle table, with white sheets for reading.
Text Domain: enlinea-tangram
License: GPL-2.0-or-later
*/

/* ---------- type, shipped inside the theme (OFL; licences in assets/type) ---------- */

@font-face {
	font-family: "Jost";
	src: url("assets/type/enlinea-jost.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Gelasio";
	src: url("assets/type/enlinea-gelasio.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Gelasio";
	src: url("assets/type/enlinea-gelasio-italic.woff2") format("woff2");
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
}

/* ---------- the set: colours, pieces, measures ---------- */

:root {
	--mesa: #e9e7fb;      /* the periwinkle table */
	--hoja: #ffffff;      /* reading sheets */
	--tinta: #18163a;     /* deep ink */
	--ultramar: #5b4ff5;  /* ultramarine pieces */
	--enlace: #3a2fc4;    /* links on white and on the table */
	--gris: #57546f;      /* quiet text */
	--regla: #c9c5ef;     /* the tray's edge */
	--lila: #8d84f7;      /* a lighter piece, on the ink band */

	--sans: "Jost", "Avenir Next", "Segoe UI", sans-serif;
	--serif: "Gelasio", Georgia, "Times New Roman", serif;

	--hueco: 2px;         /* the gap between fitted pieces */
	--ancho: 76rem;
	--medida: 66ch;
	--orilla: clamp(1rem, 4vw, 2.5rem);

	/* piece outlines for small glyphs, in a 1 x 1 box */
	--forma-grande: polygon(0 0, 0 100%, 100% 100%);
	--forma-cuadro: polygon(0 0, 100% 0, 100% 100%, 0 100%);
	--forma-romboide: polygon(36% 0, 100% 0, 64% 100%, 0 100%);
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--mesa);
	color: var(--tinta);
	font-family: var(--serif);
	font-size: 1.125rem;
	line-height: 1.7;
	font-kerning: normal;
}

img,
svg {
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: var(--enlace);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--ultramar);
	outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
	font-family: var(--sans);
	font-weight: 600;
	line-height: 1.15;
	margin: 0;
	text-wrap: balance;
}

.saltar {
	position: absolute;
	left: -999rem;
	top: 0.75rem;
	z-index: 100;
	padding: 0.6rem 1rem;
	background: var(--tinta);
	color: var(--hoja);
	font-family: var(--sans);
}

.saltar:focus {
	left: 0.75rem;
}

/* ---------- the tray header ---------- */

.bandeja-cabecera {
	background: var(--hoja);
}

.cabecera-interior {
	max-width: var(--ancho);
	margin: 0 auto;
	padding: 0.85rem var(--orilla);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 2rem;
}

.cabecera-logo {
	display: block;
	line-height: 0;
}

.cabecera-logo img {
	height: 3.25rem;
	width: auto;
}

.secciones,
.politicas,
.aviso-secciones,
.piezas-lista,
.tarjetas,
.filas {
	list-style: none;
	margin: 0;
	padding: 0;
}

.secciones {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.75rem;
	font-family: var(--sans);
	font-weight: 500;
	font-size: 1.05rem;
}

.secciones a {
	display: inline-block;
	position: relative;
	padding: 0.4rem 0 0.55rem;
	color: var(--tinta);
	text-decoration: none;
}

.secciones a:hover {
	color: var(--enlace);
}

.secciones .current-menu-item > a::after,
.secciones .current-post-ancestor > a::after,
.secciones .current-menu-parent > a::after,
.secciones .current-category-ancestor > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 1.6rem;
	height: 0.4rem;
	background: var(--ultramar);
	clip-path: var(--forma-romboide);
}

/* ---------- shared frames ---------- */

main {
	display: block;
	max-width: var(--ancho);
	margin: 0 auto;
	padding: 0 var(--orilla);
}

.hoja {
	background: var(--hoja);
	padding: clamp(1.4rem, 5vw, 3.75rem);
	margin: 0 auto 2.5rem;
}

.hoja-texto {
	max-width: var(--medida);
	margin: 0 auto;
}

.hoja-guia,
.hoja-pagina,
.hoja-inicio,
.hoja-aviso {
	max-width: calc(var(--medida) + 2 * clamp(1.4rem, 5vw, 3.75rem));
}

/* ---------- the home page: the hero table ---------- */

.tablero {
	display: grid;
	gap: 2rem;
	padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
	align-items: center;
}

.tablero h1 {
	font-weight: 500;
	font-size: clamp(2.6rem, 1.4rem + 4.6vw, 4.75rem);
	line-height: 1.03;
	letter-spacing: -0.015em;
	max-width: 11ch;
}

.tablero-entrada {
	max-width: 34rem;
	margin: 1.4rem 0 0;
	font-size: 1.2rem;
	line-height: 1.6;
}

.piezas-titulo {
	margin: 2.2rem 0 0.75rem;
	font-size: 1.05rem;
	font-weight: 600;
}

.piezas-lista {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, max-content));
	gap: 0.45rem 2.25rem;
	font-family: var(--sans);
	font-size: 1.02rem;
	line-height: 1.3;
}

.piezas-lista li {
	display: grid;
	grid-template-columns: 2.4rem minmax(0, 1fr);
	align-items: center;
	gap: 0.6rem;
}

.pieza-icono {
	display: block;
	flex: none;
	height: 1.15rem;
	width: auto;
}

.piezas-lista .pieza-icono {
	width: auto;
	height: auto;
	max-width: 2.4rem;
}

.tablero-dibujo {
	min-width: 0;
}

.tablero-figura {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.tablero-figura .pieza {
	transform-box: view-box;
	transform-origin: 0 0;
	transform: var(--to);
}

@media (prefers-reduced-motion: no-preference) {
	.tablero-figura .pieza {
		animation: enlinea-desplegar 1.15s cubic-bezier(0.22, 0.8, 0.26, 1) both;
		animation-delay: calc(0.3s + var(--n) * 80ms);
	}
}

@keyframes enlinea-desplegar {
	from {
		transform: translate(0px, 0px) rotate(0deg);
	}
	to {
		transform: var(--to);
	}
}

/* ---------- the guide as a wide card, one corner cut by a triangle ---------- */

.guias {
	margin: 0 0 2.5rem;
}

.guias-titulo {
	font-size: 1.6rem;
	margin: 0 0 1.1rem;
}

.tarjetas {
	display: grid;
	gap: 1.5rem;
}

.tarjeta {
	position: relative;
	--corte: 2.75rem;
}

.tarjeta-recorte {
	display: grid;
	background: var(--hoja);
	clip-path: polygon(0 0, calc(100% - var(--corte)) 0, 100% var(--corte), 100% 100%, 0 100%);
}

.tarjeta::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: var(--corte);
	height: var(--corte);
	background: var(--ultramar);
	clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px));
}

.tarjeta-figura {
	background: var(--mesa);
	margin: 0.75rem 0.75rem 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.tarjeta-figura img,
.tarjeta-figura svg {
	display: block;
	width: 100%;
	max-width: 26rem;
	height: auto;
}

.tarjeta-texto {
	padding: 1.75rem clamp(1.4rem, 4vw, 2.5rem) 2rem;
}

.tarjeta-nicho {
	margin: 0 0 0.5rem;
	font-family: var(--sans);
	font-size: 0.95rem;
	color: var(--enlace);
}

.tarjeta h3 {
	font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
	line-height: 1.15;
	max-width: 30ch;
}

.tarjeta h3 a {
	color: var(--tinta);
	text-decoration: none;
}

.tarjeta h3 a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.tarjeta-resumen {
	margin: 0.85rem 0 1rem;
	max-width: 40rem;
}

.tarjeta time,
.fila-fecha {
	font-family: var(--sans);
	font-size: 0.9rem;
	color: var(--gris);
}

.guias-vacio {
	font-family: var(--sans);
	color: var(--gris);
}

/* ---------- ad spaces: plain labelled frames, apart from the pieces ---------- */

.hueco {
	margin: 2.5rem auto;
}

.hueco-inicio,
.hueco-seccion {
	max-width: calc(var(--medida) + 7.5rem);
}

.hoja-lisa {
	background: var(--hoja);
	max-width: calc(var(--medida) + 7.5rem);
	margin: 0 auto 3rem;
	padding: 1.25rem;
}

.romboide {
	display: block;
	margin: 0 auto;
	padding: 0.7rem 0.75rem 0.75rem;
	background: #fbfaff;
	border: 1px solid var(--regla);
}

.romboide iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	border: 0;
	margin: 0 auto;
}

.cateto {
	display: block;
	margin: 0 0 0.5rem;
	font-family: var(--sans);
	font-size: 0.8rem;
	line-height: 1.3;
	color: var(--gris);
}

.hoja-texto .hueco,
.hoja-texto > .romboide {
	margin: 2.5rem 0;
}

/* ---------- the guide: title block on the table, then one sheet ---------- */

.guia-cabeza {
	display: grid;
	gap: 2rem;
	padding: clamp(2rem, 5vw, 3.75rem) 0 clamp(2rem, 4vw, 3rem);
	align-items: center;
}

.guia-nicho {
	margin: 0 0 0.9rem;
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 500;
}

.guia-nicho a {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
}

.guia-nicho a::before {
	content: "";
	width: 1.3rem;
	height: 0.45rem;
	background: var(--ultramar);
	clip-path: var(--forma-romboide);
}

.guia-nicho a:hover {
	text-decoration: underline;
}

.guia h1,
.pagina h1,
.seccion h1,
.perdida h1 {
	font-size: clamp(2rem, 1.25rem + 2.7vw, 3.3rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.guia h1 {
	max-width: 24ch;
}

.guia-entrada {
	margin: 1.1rem 0 1.5rem;
	font-size: 1.2rem;
	line-height: 1.6;
	max-width: 38rem;
}

.firma {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin: 0 0 0.6rem;
}

.firma-marca {
	flex: none;
	width: 3rem;
	height: 3rem;
}

.firma p {
	margin: 0;
	font-family: var(--sans);
	font-size: 0.98rem;
	line-height: 1.35;
}

.firma-por,
.firma-rol {
	display: block;
	color: var(--gris);
	font-size: 0.9rem;
}

.fechas {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 1.4rem;
	margin: 0;
	font-family: var(--sans);
	font-size: 0.9rem;
	color: var(--gris);
}

.guia-figura {
	margin: 0;
}

.guia-figura img {
	display: block;
	width: 100%;
	max-width: 32rem;
	margin: 0 auto;
}

/* ---------- inside the sheet: every block in the set's own cut ---------- */

.hoja-texto > :first-child {
	margin-top: 0;
}

.hoja-texto p,
.hoja-texto ul,
.hoja-texto ol,
.hoja-texto dl {
	margin: 0 0 1.15em;
}

.hoja-texto h2 {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin: 2.4em 0 0.75em;
	font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.75rem);
	line-height: 1.2;
}

.hoja-texto h2::before {
	content: "";
	flex: none;
	width: 0.95em;
	height: 0.95em;
	background: var(--ultramar);
	clip-path: var(--forma-grande);
	transform: translateY(0.08em);
}

.hoja-texto h2:nth-of-type(7n + 2)::before {
	background: var(--tinta);
	width: 0.95em;
	clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hoja-texto h2:nth-of-type(7n + 3)::before {
	width: 0.7em;
	height: 0.7em;
	clip-path: var(--forma-grande);
}

.hoja-texto h2:nth-of-type(7n + 4)::before {
	background: var(--tinta);
	width: 0.62em;
	height: 0.62em;
	clip-path: var(--forma-cuadro);
}

.hoja-texto h2:nth-of-type(7n + 5)::before {
	width: 1.25em;
	height: 0.5em;
	clip-path: var(--forma-romboide);
	transform: translateY(-0.12em);
}

.hoja-texto h2:nth-of-type(7n + 6)::before {
	background: var(--tinta);
	width: 0.5em;
	height: 0.5em;
	clip-path: var(--forma-grande);
}

.hoja-texto h2:nth-of-type(7n + 7)::before {
	width: 0.5em;
	height: 0.5em;
	clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hoja-texto h3 {
	margin: 1.9em 0 0.55em;
	font-size: 1.25rem;
	line-height: 1.25;
}

.hoja-texto strong {
	font-weight: 700;
}

.hoja-texto ul {
	list-style: none;
	padding: 0;
}

.hoja-texto ul li {
	position: relative;
	padding-left: 1.5rem;
	margin: 0 0 0.45em;
}

.hoja-texto ul li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.62em;
	width: 0.6rem;
	height: 0.6rem;
	background: var(--ultramar);
	clip-path: var(--forma-grande);
}

.hoja-texto ol {
	list-style: none;
	padding: 0;
	counter-reset: paso;
}

.hoja-texto ol li {
	position: relative;
	counter-increment: paso;
	padding-left: 2.75rem;
	margin: 0 0 0.75em;
	min-height: 1.85rem;
}

.hoja-texto ol li::before {
	content: counter(paso);
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 1.85rem;
	height: 1.85rem;
	background: var(--tinta);
	color: var(--hoja);
	font-family: var(--sans);
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.85rem;
	text-align: center;
}

.hoja-texto figure {
	margin: 2.25rem 0;
	padding: clamp(0.9rem, 3vw, 1.5rem);
	background: var(--mesa);
}

.hoja-texto figure img {
	display: block;
	width: 100%;
	margin: 0 auto;
}

.hoja-texto figcaption {
	position: relative;
	margin: 1rem 0 0;
	padding-left: 1.4rem;
	font-family: var(--sans);
	font-size: 0.94rem;
	line-height: 1.5;
	color: var(--tinta);
}

.hoja-texto figcaption::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.4em;
	width: 0.65rem;
	height: 0.65rem;
	background: var(--ultramar);
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.tabla-bandeja {
	margin: 2.25rem 0;
	overflow-x: auto;
	background: var(--mesa);
	padding: var(--hueco);
}

.hoja-texto table {
	width: 100%;
	min-width: 34rem;
	border-collapse: separate;
	border-spacing: var(--hueco);
	font-size: 1rem;
	line-height: 1.5;
}

.hoja-texto caption {
	caption-side: top;
	text-align: left;
	padding: 0.7rem 0.6rem 0.6rem;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
}

.hoja-texto th,
.hoja-texto td {
	padding: 0.65rem 0.85rem;
	text-align: left;
	vertical-align: top;
}

.hoja-texto th {
	background: var(--tinta);
	color: var(--hoja);
	font-family: var(--sans);
	font-weight: 600;
	font-size: 0.95rem;
}

.hoja-texto tbody th {
	background: #2b2858;
}

.hoja-texto td {
	background: var(--hoja);
}

.hoja-texto aside {
	position: relative;
	margin: 2.25rem 0;
	padding: 1.35rem 2.6rem 1.35rem 1.5rem;
	background: var(--mesa);
}

.hoja-texto aside::before,
.hoja-texto aside::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 1.9rem;
	height: 1.9rem;
}

.hoja-texto aside::before {
	background: var(--hoja);
	clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.hoja-texto aside::after {
	background: var(--ultramar);
	clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px));
}

.hoja-texto aside > :last-child {
	margin-bottom: 0;
}

.hoja-texto details {
	border-top: 2px solid var(--mesa);
	padding: 0.85rem 0;
}

.hoja-texto details:last-of-type {
	border-bottom: 2px solid var(--mesa);
}

.hoja-texto summary {
	display: flex;
	align-items: baseline;
	gap: 0.8rem;
	cursor: pointer;
	list-style: none;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1.1rem;
	line-height: 1.35;
}

.hoja-texto summary::-webkit-details-marker {
	display: none;
}

.hoja-texto summary::before {
	content: "";
	flex: none;
	width: 1.1rem;
	height: 0.42rem;
	background: var(--tinta);
	clip-path: var(--forma-romboide);
	transform: translateY(-0.1em);
}

.hoja-texto details[open] summary::before {
	background: var(--ultramar);
	transform: translateY(-0.1em) rotate(90deg);
}

@media (prefers-reduced-motion: no-preference) {
	.hoja-texto summary::before {
		transition: transform 0.2s ease, background-color 0.2s ease;
	}
}

.hoja-texto details > :not(summary) {
	margin: 0.75rem 0 0.25rem 1.9rem;
}

.hoja-texto dl {
	display: grid;
	gap: var(--hueco);
	background: var(--mesa);
	padding: var(--hueco);
	margin: 2rem 0;
}

.hoja-texto dt,
.hoja-texto dd {
	background: var(--hoja);
	margin: 0;
	padding: 0.7rem 1rem;
}

.hoja-texto dt {
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1.02rem;
	line-height: 1.35;
	padding-bottom: 0.25rem;
}

.hoja-texto dd {
	padding-top: 0.25rem;
	margin-bottom: 0;
}

.hoja-texto blockquote {
	position: relative;
	margin: 2.25rem 0;
	padding: 0 0 0 2.4rem;
	font-style: italic;
	font-size: 1.25rem;
	line-height: 1.55;
}

.hoja-texto blockquote::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.2rem;
	height: 2.4rem;
	background: var(--ultramar);
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.hoja-texto blockquote p:last-child {
	margin-bottom: 0;
}

.hoja-texto hr {
	border: 0;
	height: var(--hueco);
	background: var(--mesa);
	margin: 2.5rem 0;
}

.hoja-texto code {
	font-family: var(--sans);
	font-size: 0.95em;
	background: var(--mesa);
	padding: 0.05em 0.35em;
}

/* ---------- the close of a guide ---------- */

.cierre {
	display: grid;
	gap: 1.5rem;
	margin: 0 0 3rem;
}

.cierre > :only-child {
	grid-column: 1 / -1;
}

.cierre h2 {
	font-size: 1.3rem;
	margin: 0 0 0.6rem;
}

.cierre-equipo {
	display: flex;
	align-items: flex-start;
	gap: 1.1rem;
}

.cierre-equipo img {
	flex: none;
	width: 4rem;
	height: 4rem;
}

.cierre-equipo p {
	margin: 0 0 0.6rem;
}

.cierre-nombre {
	font-family: var(--sans);
	font-weight: 500;
}

.cierre-seccion {
	margin: 1rem 0 0;
	font-family: var(--sans);
}

/* ---------- rows of guides, 2 px apart like fitted pieces ---------- */

.filas {
	display: grid;
	gap: var(--hueco);
}

.fila {
	background: var(--hoja);
}

.fila-enlace {
	display: grid;
	grid-template-columns: minmax(5.5rem, 9rem) 1fr;
	gap: 1.25rem;
	align-items: center;
	padding: 1rem;
	color: var(--tinta);
	text-decoration: none;
}

.fila-figura {
	display: block;
	background: var(--mesa);
	padding: 0.5rem;
}

.fila-figura img,
.fila-figura svg {
	display: block;
	width: 100%;
	height: auto;
}

.fila-titulo {
	display: block;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1.25rem;
	line-height: 1.2;
}

.fila-enlace:hover .fila-titulo {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

.fila-resumen {
	display: block;
	margin: 0.4rem 0 0.35rem;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--gris);
}

.fila-fecha {
	display: block;
}

.paginas {
	margin: 1.5rem 0;
	font-family: var(--sans);
}

.paginas .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

/* ---------- section, search and page heads ---------- */

.seccion-cabeza {
	display: grid;
	gap: 1.5rem 3rem;
	padding: clamp(2rem, 5vw, 3.5rem) 0 2rem;
	align-items: end;
}

.seccion-descripcion {
	max-width: 38rem;
	margin: 1rem 0 0.75rem;
	font-size: 1.15rem;
}

.seccion-descripcion p {
	margin: 0;
}

.seccion-cuenta {
	margin: 0;
	font-family: var(--sans);
	font-size: 0.95rem;
	color: var(--gris);
}

.fila-piezas {
	display: block;
	width: 100%;
	max-width: 34rem;
	height: auto;
}

.seccion .hueco-seccion {
	margin-top: 3rem;
}

.pagina-cabeza {
	display: flex;
	align-items: flex-start;
	gap: 1.1rem;
	max-width: calc(var(--medida) + 2 * clamp(1.4rem, 5vw, 3.75rem));
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 3.5rem) 0 1.75rem;
}

.pagina-pieza .pieza-icono {
	height: 1.9rem;
	width: auto;
	margin-top: 0.55rem;
}

.pagina-entrada {
	margin: 0.8rem 0 0;
	font-size: 1.15rem;
	max-width: 38rem;
}

.contacto-linea a {
	font-family: var(--sans);
}

.aviso-secciones {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	font-family: var(--sans);
}

.perdida {
	display: grid;
	gap: 2rem;
	padding-top: clamp(2rem, 5vw, 3.5rem);
	align-items: center;
}

.pieza-perdida {
	display: block;
	width: 100%;
	max-width: 26rem;
	height: auto;
	margin: 0 auto;
}

.perdida .hoja-aviso {
	margin: 0 0 3rem;
}

.perdida h1 {
	margin-bottom: 1rem;
}

/* ---------- the ink band ---------- */

.banda-tinta {
	margin-top: 1.5rem;
	background: var(--tinta);
	color: var(--mesa);
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.5;
}

.banda-tinta a {
	color: var(--hoja);
}

.banda-tinta :focus-visible {
	outline-color: var(--mesa);
}

.banda-interior {
	max-width: var(--ancho);
	margin: 0 auto;
	padding: 3rem var(--orilla) 1.5rem;
	display: grid;
	gap: 2rem;
}

.banda-marca img {
	display: block;
	width: 3.5rem;
	height: 3.5rem;
}

.banda-nombre {
	margin: 0.9rem 0 0.15rem;
	font-weight: 600;
	font-size: 1.2rem;
}

.banda-lema,
.banda-editor p {
	margin: 0 0 0.35rem;
	color: var(--regla);
}

.banda-editor .contacto-linea a {
	color: var(--hoja);
}

.politicas {
	columns: 2;
	column-gap: 2rem;
}

.politicas li {
	break-inside: avoid;
	margin: 0 0 0.45rem;
}

.banda-caja svg {
	display: block;
	width: 6rem;
	height: 6rem;
}

.banda-derechos {
	max-width: var(--ancho);
	margin: 0 auto;
	padding: 0 var(--orilla) 2rem;
	color: var(--regla);
	font-family: var(--sans);
	font-size: 0.85rem;
}

/* ---------- the measurement notice: a quiet strip at the bottom ---------- */

.hipotenusa {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 60;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem 1rem;
	padding: 0.6rem var(--orilla);
	background: var(--hoja);
	color: var(--tinta);
	border-top: 2px solid var(--regla);
	font-family: var(--sans);
	font-size: 0.875rem;
	line-height: 1.4;
}

.hipotenusa[hidden] {
	display: none;
}

.hipotenusa p {
	margin: 0;
	flex: 1 1 22rem;
	max-width: 60rem;
}

.hipotenusa a {
	color: var(--enlace);
}

.hipotenusa button,
.escuadra button {
	min-height: 44px;
	min-width: 6.5rem;
	padding: 0 1.1rem;
	border: 0;
	border-radius: 0;
	background: var(--tinta);
	color: var(--hoja);
	font-family: var(--sans);
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

.hipotenusa button:hover,
.escuadra button:hover {
	background: #2b2858;
}

body:has(.hipotenusa:not([hidden])) {
	padding-bottom: 7rem;
}

.escuadra {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 1.25rem 0;
}

.escuadra p {
	flex: 1 1 100%;
	margin: 0;
}

.escuadra .giro:empty {
	display: none;
}

.giro {
	margin: 0.6rem 0 1.2rem;
	font-family: var(--sans);
	font-size: 0.95rem;
	color: var(--gris);
}

/* ---------- wider screens ---------- */

@media (min-width: 760px) {
	.tarjeta-recorte {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		align-items: stretch;
	}

	.tarjeta-figura {
		margin: 0.75rem 0 0.75rem 0.75rem;
	}

	.tarjeta-texto {
		align-self: center;
	}

	.hoja-texto dl {
		grid-template-columns: minmax(8rem, 13rem) 1fr;
	}

	.hoja-texto dt {
		padding-bottom: 0.7rem;
	}

	.hoja-texto dd {
		padding-top: 0.7rem;
	}

	.banda-interior {
		grid-template-columns: 1.1fr 1.2fr 1.4fr auto;
		align-items: start;
	}
}

@media (min-width: 900px) {
	.tablero {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		gap: 3.5rem;
	}

	.guia-cabeza {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 3rem;
	}

	.seccion-cabeza {
		grid-template-columns: minmax(0, 1fr) minmax(16rem, 30rem);
	}

	.cierre {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 3rem;
		max-width: calc(var(--medida) + 2 * clamp(1.4rem, 5vw, 3.75rem));
		margin-left: auto;
		margin-right: auto;
	}

	.perdida {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		gap: 3rem;
	}
}

/* ---------- small phones ---------- */

@media (max-width: 480px) {
	body {
		font-size: 1.0625rem;
	}

	.cabecera-logo img {
		height: 2.75rem;
	}

	.secciones {
		gap: 0.1rem 1.25rem;
		font-size: 1rem;
	}

	.piezas-lista {
		gap: 0.4rem 1.25rem;
		font-size: 0.98rem;
	}

	.fila-enlace {
		grid-template-columns: 4.75rem 1fr;
		gap: 0.9rem;
		padding: 0.85rem;
	}

	.fila-titulo {
		font-size: 1.1rem;
	}

	.politicas {
		columns: 1;
	}

	.hipotenusa {
		padding: 0.55rem 0.85rem 0.65rem;
		font-size: 0.82rem;
		gap: 0.4rem 0.6rem;
	}

	.hipotenusa p {
		flex-basis: 100%;
	}

	.hipotenusa button {
		flex: 1 1 0;
		min-width: 0;
	}

	body:has(.hipotenusa:not([hidden])) {
		padding-bottom: 10rem;
	}
}
