/* ==========================================================================
   LANDING — chapa de datos industrial
   Bastidor anodizado con riel de patrimonio; placas de aluminio remachadas
   al ras, con registro grabado y canto de estado.
   ========================================================================== */

@font-face {
	font-family: 'Archivo';
	src: url('fonts/archivo-latin.woff2') format('woff2');
	font-weight: 400 800;
	font-stretch: 75% 125%;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
		U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
		U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Archivo';
	src: url('fonts/archivo-latin-ext.woff2') format('woff2');
	font-weight: 400 800;
	font-stretch: 75% 125%;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
		U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
		U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	/* Bastidor: anodizado verde muy hondo, casi negro */
	--anodizado: #0c1f1e;
	--anodizado-hondo: #060f0f;
	--anodizado-alto: #123331;

	/* Chapa: aluminio anodizado negro, grafito templado */
	--aluminio: #23282a;
	--aluminio-alto: #2c3234;
	--aluminio-medio: #1a1f20;
	--aluminio-bajo: #454d4e;

	/* Grabado: el laser deja marca clara sobre el anodizado */
	--grabado: #edece4;
	--grabado-medio: #b4b9b2;
	--grabado-tenue: #999f96;

	--naranja: #d44e12;
	--naranja-vivo: #ff8347;
	--oxido: #7a6045;

	--sobre-anodizado: #c3ccc6;
	--sobre-anodizado-tenue: #7e938d;

	--chaflan: 11px;
	--ease-salida: cubic-bezier(0.23, 1, 0.32, 1);
	--ease-fisico: cubic-bezier(0.32, 0.72, 0, 1);

	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100dvh;
	font-family: 'Archivo', system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--sobre-anodizado);
	background-color: var(--anodizado-hondo);
	background-image:
		linear-gradient(168deg, var(--anodizado-alto) 0%, var(--anodizado) 34%, var(--anodizado-hondo) 86%);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
}

.grano {
	position: fixed;
	inset: 0;
	z-index: 80;
	pointer-events: none;
	opacity: 0.19;
	mix-blend-mode: soft-light;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='0.5'/%3E%3C/svg%3E");
}

/* Superficies del navegador ------------------------------------------------ */
::selection {
	background: var(--naranja);
	color: #fff;
}

::-webkit-scrollbar {
	width: 13px;
}
::-webkit-scrollbar-track {
	background: var(--anodizado-hondo);
}
::-webkit-scrollbar-thumb {
	background: var(--aluminio-bajo);
	border: 3px solid var(--anodizado-hondo);
}
::-webkit-scrollbar-thumb:hover {
	background: var(--aluminio-medio);
}

* {
	scrollbar-color: var(--aluminio-bajo) var(--anodizado-hondo);
}

:focus-visible {
	outline: 2px solid var(--naranja-vivo);
	outline-offset: 3px;
}

.saltar {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 10px 18px;
	/* El mismo naranja del control de acceso, no el del canto: sobre blanco el
	   naranja de la chapa se queda en 4.3:1. */
	background: #bb4010;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}
.saltar:focus {
	left: 12px;
	top: 12px;
}

/* Ocultar de la vista sin ocultar del lector de pantalla. Deliberadamente
   separada de .saltar: aquella es un control que aparece al enfocarse, y
   reutilizarla acá hacía asomar el encabezado como un chip naranja suelto. */
.oculto-visual {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.bastidor {
	max-width: 1300px;
	margin: 0 auto;
	padding: clamp(20px, 4vw, 52px) clamp(14px, 3.5vw, 40px) 70px;
}

/* --------------------------------------------------------------------------
   Chapa maestra
   -------------------------------------------------------------------------- */

.chapa-maestra {
	position: relative;
	padding: clamp(22px, 3.2vw, 38px) clamp(20px, 3vw, 40px) 0;
	margin-bottom: clamp(26px, 3.6vw, 44px);
	clip-path: polygon(
		var(--chaflan) 0,
		calc(100% - var(--chaflan)) 0,
		100% var(--chaflan),
		100% calc(100% - var(--chaflan)),
		calc(100% - var(--chaflan)) 100%,
		var(--chaflan) 100%,
		0 calc(100% - var(--chaflan)),
		0 var(--chaflan)
	);
	background:
		radial-gradient(circle 5px at 19px 19px, #5e6665 0%, #363d3c 42%, #171c1b 74%, rgba(0, 0, 0, 0.6) 92%, transparent 100%),
		radial-gradient(circle 5px at calc(100% - 19px) 19px, #5e6665 0%, #363d3c 42%, #171c1b 74%, rgba(0, 0, 0, 0.6) 92%, transparent 100%),
		radial-gradient(circle 5px at 19px calc(100% - 19px), #5e6665 0%, #363d3c 42%, #171c1b 74%, rgba(0, 0, 0, 0.6) 92%, transparent 100%),
		radial-gradient(circle 5px at calc(100% - 19px) calc(100% - 19px), #5e6665 0%, #363d3c 42%, #171c1b 74%, rgba(0, 0, 0, 0.6) 92%, transparent 100%),
		repeating-linear-gradient(91deg, rgba(255, 255, 255, 0.035) 0 2px, rgba(0, 0, 0, 0.16) 2px 4px),
		linear-gradient(157deg, var(--aluminio-alto) 0%, var(--aluminio) 44%, var(--aluminio-medio) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.13),
		inset 0 -1px 0 rgba(0, 0, 0, 0.6),
		0 2px 1px rgba(4, 18, 17, 0.5);
}

.rotulo {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px 30px;
	padding-bottom: 22px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.6);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
}

.marca {
	margin: 0;
	font-size: clamp(2.7rem, 8vw, 5.4rem);
	font-weight: 800;
	font-stretch: 84%;
	line-height: 0.84;
	letter-spacing: -0.012em;
	text-transform: uppercase;
	color: var(--grabado);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}

.bajada {
	margin: 11px 0 0;
	max-width: 46ch;
	font-size: 0.95rem;
	color: var(--grabado-medio);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
	text-wrap: pretty;
}

/* Enlace de sesión: entra al panel desde la cara pública, o cierra desde adentro. */
.sesion {
	align-self: center;
	padding: 7px 13px;
	font-size: 0.66rem;
	font-weight: 700;
	font-stretch: 84%;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--grabado-medio);
	background: rgba(0, 0, 0, 0.26);
	box-shadow:
		inset 0 1px 2px rgba(0, 0, 0, 0.5),
		0 1px 0 rgba(255, 255, 255, 0.07);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
	transition: color 150ms var(--ease-salida), background 150ms var(--ease-salida);
}
.sesion:hover {
	color: var(--grabado);
	background: rgba(0, 0, 0, 0.36);
}
.sesion:active {
	transform: scale(0.97);
}

.cinta {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 18px 5px 16px;
	background: #0a0d0c;
	border-radius: 3px;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.14),
		inset 0 -2px 5px rgba(0, 0, 0, 0.6),
		0 2px 0 rgba(255, 255, 255, 0.35);
}
.cinta::before,
.cinta::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
	transform: translateY(-50%);
}
.cinta::before {
	left: 6px;
}
.cinta::after {
	right: 6px;
}
.cinta svg {
	flex: none;
	color: #93a089;
}
.cinta:focus-within {
	box-shadow:
		inset 0 0 0 1px var(--naranja-vivo),
		inset 0 -2px 5px rgba(0, 0, 0, 0.6),
		0 2px 0 rgba(255, 255, 255, 0.35);
}

#q {
	width: 200px;
	padding: 7px 0;
	border: 0;
	background: transparent;
	color: #eeece0;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	font-stretch: 88%;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.14);
	caret-color: var(--naranja-vivo);
	outline: 0;
}
#q::placeholder {
	color: #99a692;
	opacity: 1;
}

.campos {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
	margin: 0;
	padding: 0;
}

.campo {
	padding: 16px 20px 18px 0;
	border-right: 1px solid rgba(0, 0, 0, 0.55);
	box-shadow: 1px 0 0 rgba(255, 255, 255, 0.07);
}
.campo:last-child {
	border-right: 0;
	box-shadow: none;
}

.campo dt {
	font-size: 0.66rem;
	font-weight: 700;
	font-stretch: 86%;
	letter-spacing: 0.19em;
	text-transform: uppercase;
	color: var(--grabado-tenue);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}

.campo dd {
	margin: 5px 0 0;
	font-size: 1.5rem;
	font-weight: 700;
	font-stretch: 92%;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
	color: var(--grabado);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}
.campo dd small {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--grabado-tenue);
}

/* --------------------------------------------------------------------------
   Tablero: el bastidor con su riel, al que las placas están remachadas
   -------------------------------------------------------------------------- */

.tablero {
	display: grid;
	grid-template-columns: 30px 1fr;
	padding: 14px;
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0.45) 100%),
		linear-gradient(159deg, #0f2c2a 0%, #081918 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.09),
		inset 0 0 0 1px rgba(0, 0, 0, 0.35),
		inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.riel {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 14px;
	background:
		repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 26px),
		linear-gradient(90deg, #050f0f 0%, #0c2220 50%, #050f0f 100%);
	box-shadow:
		inset 1px 0 0 rgba(0, 0, 0, 0.5),
		inset -1px 0 0 rgba(255, 255, 255, 0.07);
}

.riel-rango {
	position: absolute;
	left: 0;
	right: 0;
	font-size: 0.52rem;
	font-weight: 700;
	font-stretch: 78%;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.12em;
	text-align: center;
	color: #8aa59d;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
	writing-mode: vertical-rl;
	transform: rotate(180deg);
}
.riel-rango.arriba {
	top: 10px;
}
.riel-rango.abajo {
	bottom: 10px;
}

.riel-texto {
	font-size: 0.6rem;
	font-weight: 700;
	font-stretch: 80%;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	white-space: nowrap;
	color: #90aca4;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.placas {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
	grid-auto-flow: dense;
	align-items: start;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* --------------------------------------------------------------------------
   Placa
   -------------------------------------------------------------------------- */

.placa {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 24px 23px 0;
	overflow: hidden;
	clip-path: polygon(
		var(--chaflan) 0,
		calc(100% - var(--chaflan)) 0,
		100% var(--chaflan),
		100% calc(100% - var(--chaflan)),
		calc(100% - var(--chaflan)) 100%,
		var(--chaflan) 100%,
		0 calc(100% - var(--chaflan)),
		0 var(--chaflan)
	);
	background:
		radial-gradient(circle 4px at 12px 12px, #5e6665 0%, #363d3c 42%, #171c1b 74%, rgba(0, 0, 0, 0.6) 92%, transparent 100%),
		radial-gradient(circle 4px at calc(100% - 12px) 12px, #5e6665 0%, #363d3c 42%, #171c1b 74%, rgba(0, 0, 0, 0.6) 92%, transparent 100%),
		radial-gradient(circle 4px at 12px calc(100% - 12px), #5e6665 0%, #363d3c 42%, #171c1b 74%, rgba(0, 0, 0, 0.6) 92%, transparent 100%),
		radial-gradient(circle 4px at calc(100% - 12px) calc(100% - 12px), #5e6665 0%, #363d3c 42%, #171c1b 74%, rgba(0, 0, 0, 0.6) 92%, transparent 100%),
		repeating-linear-gradient(91deg, rgba(255, 255, 255, 0.03) 0 2px, rgba(0, 0, 0, 0.15) 2px 4px),
		linear-gradient(157deg, var(--aluminio-alto) 0%, var(--aluminio) 46%, var(--aluminio-medio) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.11),
		inset 0 -1px 0 rgba(0, 0, 0, 0.55),
		0 1px 2px rgba(4, 18, 17, 0.55);
	transition:
		opacity 260ms var(--ease-salida),
		filter 260ms var(--ease-salida),
		box-shadow 200ms var(--ease-salida);
}

/* Ninguna placa es el mismo trozo de metal que la de al lado */
.placa:nth-child(3n) {
	background-position: 0 0, 100% 0, 0 100%, 100% 100%, 7px 0, 0 0;
}
.placa:nth-child(3n + 1) {
	background-position: 0 0, 100% 0, 0 100%, 100% 100%, 3px 0, 0 0;
}
.placa:nth-child(4n) {
	filter: brightness(0.985);
}
.placa:nth-child(5n) {
	filter: brightness(1.012);
}

.placa.con-acceso {
	grid-column: span 2;
}

@media (max-width: 700px) {
	.placa.con-acceso {
		grid-column: span 1;
	}
}

/* Canto de estado: la franja que se lee de un barrido, sin leer la placa */
.placa::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 9px;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Barrido de luz rasante */
.placa::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		104deg,
		transparent 34%,
		rgba(255, 255, 255, 0.46) 47%,
		rgba(255, 255, 255, 0.6) 50%,
		transparent 64%
	);
	transform: translateX(-115%);
	opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
	.placa:hover::after,
	.placa:focus-within::after {
		opacity: 1;
		transform: translateX(115%);
		transition: transform 720ms var(--ease-fisico), opacity 120ms linear;
	}

	.tablero:has(.placa:hover) .placa:not(:hover) {
		opacity: 0.46;
		filter: saturate(0.5);
	}

	.placa:hover {
		box-shadow:
			inset 0 1px 0 rgba(255, 255, 255, 0.78),
			inset 0 0 0 1px rgba(255, 255, 255, 0.22),
			inset 0 -1px 0 rgba(0, 0, 0, 0.3),
			0 1px 2px rgba(4, 18, 17, 0.55);
	}
}

.placa-alto {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 11px;
}

.patrimonio {
	font-size: 0.63rem;
	font-weight: 700;
	font-stretch: 80%;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--grabado-tenue);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}

.testigo {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 0.6rem;
	font-weight: 700;
	font-stretch: 80%;
	letter-spacing: 0.17em;
	text-transform: uppercase;
	color: var(--grabado-medio);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}

.testigo::before {
	content: '';
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: radial-gradient(circle at 36% 32%, #5a605e 0%, #3a403f 60%, #23282a 100%);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.06);
}

.punzon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex: none;
	margin-left: 2px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.34);
	box-shadow:
		inset 0 2px 3px rgba(0, 0, 0, 0.6),
		inset 0 0 0 1px rgba(0, 0, 0, 0.4),
		0 1px 0 rgba(255, 255, 255, 0.08);
	color: var(--grabado-medio);
}

.placa h2 {
	margin: 0;
	font-size: 1.36rem;
	font-weight: 700;
	font-stretch: 86%;
	line-height: 1.04;
	letter-spacing: -0.004em;
	text-transform: uppercase;
	color: var(--grabado);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
	text-wrap: balance;
}

.placa .desc {
	margin: 9px 0 14px;
	max-width: 56ch;
	font-size: 0.875rem;
	line-height: 1.42;
	color: var(--grabado-medio);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
	text-wrap: pretty;
}

/* Registro grabado: el mismo lenguaje de campos de la chapa maestra --------- */
.registro {
	margin: 14px 0 0;
	padding: 0 0 15px;
}

.fila {
	display: grid;
	grid-template-columns: 78px 1fr;
	gap: 12px;
	align-items: baseline;
	padding: 7px 0;
	border-top: 1px solid rgba(0, 0, 0, 0.55);
	box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.07);
}

.fila dt {
	font-size: 0.6rem;
	font-weight: 700;
	font-stretch: 82%;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--grabado-tenue);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}

.fila dd {
	margin: 0;
	font-size: 0.79rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--grabado-medio);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}

/* La prosa afloja el peso, nunca el color: un solo sistema dentro del registro. */
.fila-nota dd {
	font-weight: 450;
}

.fila-acceso {
	align-items: center;
	padding: 9px 0 0;
}

/* La placa doble gana su ancho: el registro corre a dos columnas. */
@media (min-width: 701px) {
	.con-acceso .registro {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 26px;
	}
	/* La prosa y el acceso cruzan las dos columnas: si la situación se queda en
	   una sola, su alto arrastra el filete de la otra y el registro queda cojo. */
	.con-acceso .fila-nota,
	.con-acceso .fila-acceso {
		grid-column: 1 / -1;
	}
}

.guion {
	font-size: 0.9rem;
	color: var(--grabado-tenue);
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
}

.acceso {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: linear-gradient(178deg, #cf4a15 0%, #bb4010 52%, #a03609 100%);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	font-stretch: 88%;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	text-decoration: none;
	text-shadow: 0 1px 1px rgba(70, 20, 0, 0.5);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.38),
		inset 0 -1px 0 rgba(0, 0, 0, 0.32),
		0 1px 2px rgba(38, 16, 6, 0.5);
	transition: transform 150ms var(--ease-salida), filter 150ms var(--ease-salida);
}
.acceso:hover {
	filter: brightness(1.08);
}
.acceso:active {
	transform: scale(0.97);
}
.acceso svg {
	flex: none;
}

/* --------------------------------------------------------------------------
   Estado en el material: cada estado tiene su canto, del mismo peso
   -------------------------------------------------------------------------- */

/* En servicio: canto pintado de naranja de seguridad */
.es-activo::before {
	background:
		repeating-linear-gradient(72deg, rgba(255, 255, 255, 0.09) 0 3px, transparent 3px 9px),
		linear-gradient(180deg, #9a5228 0%, #85431e 62%, #663113 100%);
}
.es-activo .testigo {
	color: #ff9a62;
}
.es-activo .testigo::before {
	background: radial-gradient(circle at 36% 30%, #ffe2ce 0%, #ff8f52 38%, var(--naranja) 76%, #8c3409 100%);
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* En curso: canto de esténcil de obra */
.es-en-desarrollo::before {
	background: repeating-linear-gradient(
		-45deg,
		rgba(140, 96, 22, 0.62) 0 5px,
		rgba(0, 0, 0, 0.05) 5px 11px
	);
}
.es-en-desarrollo .testigo {
	color: #e3ba64;
}
.es-en-desarrollo .testigo::before {
	background: radial-gradient(circle at 36% 30%, #f8e2ac 0%, #d29c2a 52%, #6b4a0d 100%);
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Terminado: canto de troqueles, la pieza ya pasó por control */
.es-completo::before {
	background:
		repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0 2px, transparent 2px 12px),
		linear-gradient(180deg, #5b6362 0%, #3c4342 100%);
}

/* Detenido: canto sin pintar y metal velado */
.es-pausado {
	filter: saturate(0.4) brightness(0.82);
}
.es-pausado::before {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
}
.es-pausado .testigo::before {
	background: radial-gradient(circle at 36% 32%, #9c8f7e 0%, var(--oxido) 62%, #4f3d2b 100%);
}

/* --------------------------------------------------------------------------
   Búsqueda
   -------------------------------------------------------------------------- */

.placa.apagada {
	opacity: 0.12;
	filter: saturate(0.2) brightness(0.8);
	pointer-events: none;
}

.sin-resultado {
	margin: 26px 4px 8px;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--sobre-anodizado);
}

/* --------------------------------------------------------------------------
   Pie
   -------------------------------------------------------------------------- */

.pie {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 26px;
	margin-top: 22px;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--sobre-anodizado-tenue);
}

/* --------------------------------------------------------------------------
   Entrada
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
	.placa {
		animation: colocar 400ms var(--ease-salida) backwards;
		animation-delay: calc(var(--i, 0) * 42ms);
	}
	.chapa-maestra {
		animation: colocar 460ms var(--ease-salida) backwards;
	}
}

@keyframes colocar {
	from {
		opacity: 0;
		transform: translateY(-7px);
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.placa,
	.chapa-maestra {
		animation: none;
	}
	.placa::after {
		display: none;
	}
}

@media (max-width: 560px) {
	.tablero {
		grid-template-columns: 13px 1fr;
		padding: 9px;
	}
	.riel {
		margin-right: 9px;
	}
	/* En pantalla angosta el riel conserva la escala y suelta el texto:
	   sigue anclando el tablero sin comerse la medida de lectura. */
	.riel-texto,
	.riel-rango {
		display: none;
	}
	.placa {
		padding: 20px 18px 0;
	}
}
