/* ==========================================================================
   Conadeip Trámites — estilos
   Paleta: papel + tinta + cempasúchil (acento) + jade (hecho). Día y noche.
   ========================================================================== */

@font-face {
	font-family: "Bricolage";
	src: url("../fonts/bricolage.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
}

:root {
	color-scheme: light;
	--fondo: #f7f3ea;
	--superficie: #fffdf8;
	--superficie-2: #efe8da;
	--tinta: #1a2030;
	--tinta-suave: #4d5566;
	--linea: #e2d9c6;
	--acento: #f0a020;
	--acento-suave: #fbe6bf;
	--sobre-acento: #1d1503;
	--enlace: #8f4f00;
	--jade: #0b7a62;
	--jade-suave: #d5efe6;
	--sombra: 0 1px 2px rgb(26 32 48 / .06), 0 8px 24px -8px rgb(26 32 48 / .14);
	--sombra-alta: 0 2px 4px rgb(26 32 48 / .06), 0 24px 48px -16px rgb(26 32 48 / .28);
	--radio: 18px;
	--radio-s: 10px;
	--ancho: 1180px;
	--ancho-entrada: 1100px;
	--prosa: 72ch;
	--titulos: "Bricolage", ui-sans-serif, system-ui, sans-serif;
	--texto: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--cab-alto: 68px;
	--curva: cubic-bezier(.2, .7, .1, 1);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--fondo: #0d121c;
		--superficie: #151c2a;
		--superficie-2: #1c2536;
		--tinta: #eef1f6;
		--tinta-suave: #a7b0c0;
		--linea: #263044;
		--acento: #f4b23e;
		--acento-suave: #3a2e17;
		--sobre-acento: #1d1503;
		--enlace: #f6c06a;
		--jade: #3fd0a6;
		--jade-suave: #12352d;
		--sombra: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5);
		--sombra-alta: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -16px rgb(0 0 0 / .7);
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--fondo: #0d121c;
	--superficie: #151c2a;
	--superficie-2: #1c2536;
	--tinta: #eef1f6;
	--tinta-suave: #a7b0c0;
	--linea: #263044;
	--acento: #f4b23e;
	--acento-suave: #3a2e17;
	--sobre-acento: #1d1503;
	--enlace: #f6c06a;
	--jade: #3fd0a6;
	--jade-suave: #12352d;
	--sombra: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5);
	--sombra-alta: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -16px rgb(0 0 0 / .7);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--cab-alto) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	background: var(--fondo);
	color: var(--tinta);
	font: 400 1.0625rem/1.65 var(--texto);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--enlace); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--titulos); line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .6em; text-wrap: balance; }
p { margin: 0 0 1em; }
kbd { font: 600 .75rem/1 var(--texto); padding: .25em .45em; border: 1px solid var(--linea); border-bottom-width: 2px; border-radius: 6px; background: var(--superficie); }
.oculto, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.envoltura { width: min(100% - 32px, var(--ancho)); margin-inline: auto; }
.ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

.saltar { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--acento); color: var(--sobre-acento); padding: .6em 1em; border-radius: var(--radio-s); font-weight: 700; }
.saltar:focus { top: 12px; }

/* ---------- barra de progreso de lectura ---------- */
.progreso { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progreso span { display: block; height: 100%; width: 100%; background: var(--acento); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- botones y chips ---------- */
.boton {
	display: inline-flex; align-items: center; gap: .5em; justify-content: center;
	min-height: 44px; padding: .6em 1.15em; border-radius: 999px; border: 1px solid transparent;
	font: 650 .95rem/1.1 var(--texto); text-decoration: none; cursor: pointer;
	transition: transform .2s var(--curva), background-color .2s, box-shadow .2s;
}
.boton:active { transform: scale(.97); }
.boton-acento { background: var(--acento); color: var(--sobre-acento); box-shadow: 0 6px 18px -8px var(--acento); }
.boton-acento:hover { box-shadow: 0 10px 24px -8px var(--acento); transform: translateY(-1px); }
.boton-suave { background: var(--superficie); color: var(--tinta); border-color: var(--linea); }
.boton-suave:hover { border-color: var(--tinta-suave); }
.boton-icono {
	display: inline-grid; place-items: center; position: relative;
	width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--linea);
	background: var(--superficie); color: var(--tinta); cursor: pointer; transition: border-color .2s, transform .2s var(--curva);
}
.boton-icono:hover { border-color: var(--tinta-suave); }
.boton-icono:active { transform: scale(.94); }
.chip {
	display: inline-flex; align-items: center; gap: .4em; padding: .35em .8em; border-radius: 999px;
	background: var(--superficie); border: 1px solid var(--linea); color: var(--tinta);
	font: 600 .85rem/1.2 var(--texto); text-decoration: none; transition: border-color .2s, background-color .2s;
}
a.chip:hover { border-color: var(--acento); background: var(--acento-suave); }
.chip .ico { width: 1.1em; height: 1.1em; color: var(--enlace); }
.chip-mini { font-size: .75rem; padding: .25em .6em; }
.chip-dep { font-size: .9rem; margin-bottom: 1rem; }
.enlace-flecha { display: inline-flex; align-items: center; gap: .35em; font-weight: 650; text-decoration: none; }
.enlace-flecha .ico { transition: transform .25s var(--curva); }
.enlace-flecha:hover .ico { transform: translateX(4px); }

/* ---------- cabecera ---------- */
.cabecera {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--fondo) 82%, transparent);
	backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.cabecera.con-scroll { border-color: var(--linea); box-shadow: 0 6px 20px -16px rgb(0 0 0 / .4); }
.cabecera-fila { display: flex; align-items: center; gap: 16px; min-height: var(--cab-alto); }
.marca { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--tinta); margin-right: auto; min-width: 0; }
.marca-sello svg { display: block; transition: transform .5s var(--curva); }
.marca:hover .marca-sello svg { transform: rotate(-8deg) scale(1.06); }
.marca-logo { width: 36px; height: 36px; object-fit: contain; }
.marca-texto { display: grid; line-height: 1.1; min-width: 0; }
.marca-nombre { font: 750 1.15rem/1.1 var(--titulos); letter-spacing: -.02em; }
.marca-lema { font-size: .75rem; color: var(--tinta-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-lista { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-lista a { display: block; padding: .55em .9em; border-radius: 10px; color: var(--tinta); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-lista a:hover, .nav-lista .current-menu-item > a { background: var(--superficie-2); }
.cabecera-acciones { display: flex; gap: 8px; }
.atajo { position: absolute; right: -4px; bottom: -4px; font: 700 .6rem/1 var(--texto); background: var(--superficie-2); border: 1px solid var(--linea); border-radius: 5px; padding: 2px 4px; color: var(--tinta-suave); }
.cambiar-tema .ico-luna { display: none; }
:root[data-theme="dark"] .cambiar-tema .ico-sol { display: none; }
:root[data-theme="dark"] .cambiar-tema .ico-luna { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .cambiar-tema .ico-sol { display: none; }
	:root:not([data-theme="light"]) .cambiar-tema .ico-luna { display: block; }
}
.abrir-menu { display: none; }
.abrir-menu .ico-cerrar { display: none; }
.abrir-menu[aria-expanded="true"] .ico-menu { display: none; }
.abrir-menu[aria-expanded="true"] .ico-cerrar { display: block; }

@media (max-width: 860px) {
	.abrir-menu { display: inline-grid; }
	.atajo { display: none; }
	.nav {
		position: fixed; inset: var(--cab-alto) 0 auto; background: var(--fondo); border-bottom: 1px solid var(--linea);
		clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .4s var(--curva), visibility 0s .4s;
	}
	.nav.abierto { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .4s var(--curva); }
	.nav-lista { flex-direction: column; padding: 8px 16px 20px; }
	.nav-lista a { padding: .9em .6em; font-size: 1.05rem; border-bottom: 1px solid var(--linea); border-radius: 0; }
	.marca-lema { display: none; }
}

/* ---------- aviso de sitio no oficial ---------- */
.aviso-oficial { background: var(--superficie-2); border-bottom: 1px solid var(--linea); font-size: .85rem; color: var(--tinta-suave); }
.aviso-oficial .envoltura { display: flex; gap: .6em; align-items: center; padding-block: .55em; }
.aviso-oficial p { margin: 0; }
.aviso-oficial strong { color: var(--tinta); }
.aviso-oficial .ico { color: var(--enlace); }

/* ---------- buscador (dialog) ---------- */
.buscador {
	width: min(100% - 24px, 680px); max-height: min(80vh, 640px); padding: 0; margin: 10vh auto auto;
	border: 1px solid var(--linea); border-radius: 20px; background: var(--superficie); color: var(--tinta); box-shadow: var(--sombra-alta);
	overflow: hidden;
}
.buscador[open] { display: flex; flex-direction: column; animation: aparecer .35s var(--curva); }
.buscador::backdrop { background: rgb(8 10 16 / .5); backdrop-filter: blur(4px); }
@keyframes aparecer { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.buscador-caja { display: flex; align-items: center; gap: .6em; padding: 14px 16px; border-bottom: 1px solid var(--linea); }
.buscador-caja .ico { color: var(--tinta-suave); }
.buscador-input { flex: 1; min-width: 0; border: 0; background: none; color: var(--tinta); font: 500 1.15rem/1.4 var(--texto); outline: none; }
.buscador-cerrar { border: 1px solid var(--linea); background: var(--superficie-2); color: var(--tinta-suave); border-radius: 8px; padding: .3em .6em; font: 600 .75rem/1 var(--texto); cursor: pointer; }
.buscador-res { list-style: none; margin: 0; padding: 8px; overflow: auto; flex: 1; }
.buscador-res:empty { display: none; }
.buscador-res a { display: flex; gap: .7em; align-items: center; padding: .75em .9em; border-radius: 12px; color: var(--tinta); text-decoration: none; }
.buscador-res a .ico { color: var(--tinta-suave); }
.buscador-res [aria-selected="true"] a, .buscador-res a:hover { background: var(--acento-suave); }
.buscador-res mark { background: none; color: var(--enlace); font-weight: 700; }
.buscador-res .estado { padding: 1em; color: var(--tinta-suave); }
.buscador-pie { margin: 0; padding: 10px 16px; border-top: 1px solid var(--linea); font-size: .78rem; color: var(--tinta-suave); display: flex; gap: .4em; align-items: center; }
@media (pointer: coarse) { .buscador-pie { display: none; } }

/* ---------- portada ---------- */
.portada-hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.portada-hero::before {
	content: ""; position: absolute; inset: -20% -10% auto auto; width: 60vw; aspect-ratio: 1; border-radius: 50%;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--acento) 28%, transparent), transparent);
	filter: blur(10px); pointer-events: none; z-index: -1;
}
.hero-rejilla { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.antetitulo { display: inline-block; font: 700 .78rem/1 var(--texto); letter-spacing: .12em; text-transform: uppercase; color: var(--enlace); margin-bottom: 1.2rem; }
.hero-titulo { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 780; line-height: .98; letter-spacing: -.035em; margin-bottom: 1.4rem; }
.hero-titulo .linea { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-titulo .linea > span { display: inline-block; }
.subrayado { position: relative; white-space: nowrap; }
.subrayado::after {
	content: ""; position: absolute; left: -.05em; right: -.05em; bottom: .04em; height: .28em; z-index: -1;
	background: var(--acento); border-radius: .2em; transform-origin: 0 50%;
}
.hero-bajada { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--tinta-suave); max-width: 56ch; }
.hero-buscar {
	display: flex; align-items: center; gap: .5em; max-width: 620px; margin-top: 1.6rem;
	padding: 6px 6px 6px 18px; border-radius: 999px; background: var(--superficie); border: 1.5px solid var(--linea); box-shadow: var(--sombra);
	transition: border-color .2s, box-shadow .3s;
}
.hero-buscar:focus-within { border-color: var(--acento); box-shadow: 0 0 0 5px var(--acento-suave), var(--sombra); }
.hero-buscar > .ico { color: var(--tinta-suave); }
.hero-buscar input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--tinta); font: 500 1.05rem/1.4 var(--texto); padding: .55em 0; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 1.1rem; font-size: .85rem; color: var(--tinta-suave); }

.hero-turno { display: grid; place-items: center; perspective: 900px; }
.turno-boleto {
	width: min(100%, 320px); padding: 22px 22px 18px; background: var(--superficie); border-radius: 20px; box-shadow: var(--sombra-alta);
	transform: rotate(3deg); position: relative;
	-webkit-mask: radial-gradient(circle 12px at 0 62px, #0000 98%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 62px, #0000 98%, #000) 100% 0 / 51% 100% no-repeat;
	        mask: radial-gradient(circle 12px at 0 62px, #0000 98%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 62px, #0000 98%, #000) 100% 0 / 51% 100% no-repeat;
	animation: flotar 7s ease-in-out infinite;
}
@keyframes flotar { 50% { transform: rotate(1deg) translateY(-8px); } }
.turno-cab { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 2px dashed var(--linea); font: 700 .8rem/1 var(--texto); letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-suave); }
.turno-cab b { font: 800 2rem/1 var(--titulos); color: var(--tinta); letter-spacing: -.02em; }
.turno-lista { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.turno-lista li { display: flex; gap: .6em; align-items: center; font-weight: 550; font-size: .95rem; }
.turno-lista .ico { width: 22px; height: 22px; padding: 3px; border-radius: 7px; border: 1.5px solid var(--linea); color: transparent; }
.turno-lista .ok .ico { background: var(--jade); border-color: var(--jade); color: var(--superficie); }
.turno-barra { height: 8px; border-radius: 99px; background: var(--superficie-2); overflow: hidden; }
.turno-barra span { display: block; height: 100%; width: 75%; background: var(--jade); border-radius: inherit; }
.turno-pie { margin: 8px 0 0; font: 700 .85rem/1 var(--texto); color: var(--jade); text-align: right; }

.bloque { padding-block: clamp(40px, 6vw, 72px); }
.seccion-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 24px; margin-bottom: 1.6rem; }
.seccion-titulo { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 750; margin: 0; }
.seccion-bajada { color: var(--tinta-suave); margin: 0; }

/* guías esenciales: mosaico con la primera grande */
.esenciales { padding-top: 8px; }
.rejilla-esenciales { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(132px, auto); gap: 12px; }
.rejilla-esenciales > li:first-child { grid-column: span 2; grid-row: span 2; }
.esencial {
	position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 100%;
	padding: 18px 20px; border-radius: var(--radio); background: var(--superficie); border: 1px solid var(--linea);
	color: var(--tinta); text-decoration: none; overflow: hidden; isolation: isolate;
	transition: transform .35s var(--curva), box-shadow .35s var(--curva), border-color .2s;
}
.esencial::before {
	content: ""; position: absolute; inset: 0; z-index: -1; background: var(--acento);
	clip-path: circle(0 at 100% 100%); transition: clip-path .6s var(--curva);
}
.esencial:hover { transform: translateY(-4px); box-shadow: var(--sombra); border-color: var(--acento); }
.esencial:hover::before { clip-path: circle(150% at 100% 100%); }
.esencial:hover, .esencial:hover .esencial-frase, .esencial:hover .esencial-ico { color: var(--sobre-acento); }
.esencial-ico { position: absolute; top: 18px; left: 20px; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--acento-suave); color: var(--enlace); transition: background-color .3s, color .3s; }
.esencial:hover .esencial-ico { background: rgb(255 255 255 / .35); }
.esencial-titulo { font: 750 1.15rem/1.15 var(--titulos); letter-spacing: -.015em; margin-top: 52px; }
.esencial-frase { font-size: .86rem; color: var(--tinta-suave); transition: color .3s; }
.esencial-flecha { position: absolute; top: 22px; right: 18px; color: var(--enlace); transition: transform .3s var(--curva), color .3s; }
.esencial:hover .esencial-flecha { transform: translateX(4px) rotate(-45deg); color: var(--sobre-acento); }
.esencial-grande { background: var(--tinta); color: var(--fondo); border-color: var(--tinta); padding: 28px; }
.esencial-grande .esencial-titulo { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.esencial-grande .esencial-frase { color: color-mix(in srgb, var(--fondo) 75%, transparent); font-size: 1rem; }
.esencial-grande .esencial-ico { width: 56px; height: 56px; top: 28px; left: 28px; background: var(--acento); color: var(--sobre-acento); }
.esencial-grande .esencial-flecha { color: var(--acento); top: 32px; right: 28px; }
@media (max-width: 860px) {
	.rejilla-esenciales { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(120px, auto); }
	.rejilla-esenciales > li:first-child { grid-row: span 1; }
	.esencial-grande { min-height: 170px; }
}

.rejilla-deps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.dep {
	position: relative; display: grid; gap: 2px; height: 100%; padding: 18px 18px 16px; border-radius: var(--radio);
	background: var(--superficie); border: 1px solid var(--linea); color: var(--tinta); text-decoration: none; overflow: hidden;
	transition: transform .35s var(--curva), box-shadow .35s var(--curva), border-color .2s;
}
.dep::after {
	content: ""; position: absolute; inset: auto -30% -60% auto; width: 140px; aspect-ratio: 1; border-radius: 50%;
	background: var(--acento-suave); transform: scale(0); transition: transform .5s var(--curva); z-index: 0;
}
.dep > * { position: relative; z-index: 1; }
.dep:hover { transform: translateY(-4px); box-shadow: var(--sombra); border-color: var(--acento); }
.dep:hover::after { transform: scale(1.6); }
.dep-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--acento-suave); color: var(--enlace); margin-bottom: 10px; }
.dep-sigla { font: 780 1.3rem/1.1 var(--titulos); letter-spacing: -.02em; }
.dep-nombre { font-size: .82rem; color: var(--tinta-suave); line-height: 1.35; }
.dep-n { margin-top: 8px; font: 650 .78rem/1 var(--texto); color: var(--jade); }

.como { background: var(--superficie-2); }
.pasos { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: p; }
.pasos li { background: var(--superficie); border-radius: var(--radio); padding: 22px; border: 1px solid var(--linea); }
.pasos h3 { font-size: 1.2rem; margin: .7rem 0 .4rem; }
.pasos p { color: var(--tinta-suave); margin: 0; font-size: .96rem; }
.paso-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tinta); color: var(--fondo); font: 800 1.1rem/1 var(--titulos); }

@media (max-width: 860px) {
	.hero-rejilla { grid-template-columns: 1fr; }
	.hero-turno { display: none; }
	.pasos { grid-template-columns: 1fr; }
}

/* ---------- tarjetas ---------- */
.rejilla-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.tarjeta {
	position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radio);
	background: var(--superficie); border: 1px solid var(--linea); transition: transform .35s var(--curva), box-shadow .35s var(--curva), border-color .2s;
}
.tarjeta:hover { transform: translateY(-3px); box-shadow: var(--sombra); border-color: color-mix(in srgb, var(--acento) 60%, var(--linea)); }
.tarjeta-titulo { font-size: 1.08rem; font-weight: 680; line-height: 1.3; margin: 0; letter-spacing: -.005em; }
.tarjeta-titulo a { color: var(--tinta); text-decoration: none; }
.tarjeta-titulo a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tarjeta-pie { margin: auto 0 0; display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--tinta-suave); }
.tarjeta-flecha { color: var(--enlace); transition: transform .3s var(--curva); }
.tarjeta:hover .tarjeta-flecha { transform: translateX(4px); }

/* ---------- entrada / trámite ---------- */
.entrada-cabecera { padding-top: clamp(24px, 4vw, 48px); padding-bottom: 8px; max-width: var(--ancho-entrada); }
.entrada-cabecera .entrada-titulo { max-width: 22ch; }
.migas { font-size: .85rem; color: var(--tinta-suave); margin-bottom: 1.1rem; }
.migas a { color: var(--tinta-suave); text-decoration: none; }
.migas a:hover { color: var(--enlace); text-decoration: underline; }
.migas .sep { margin: 0 .35em; opacity: .5; }
.entrada-titulo { font-size: clamp(1.9rem, 4.4vw, 3.2rem); font-weight: 780; letter-spacing: -.03em; }
.entrada-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--tinta-suave); font-size: .9rem; }
.entrada-meta span { display: inline-flex; gap: .4em; align-items: center; }

.ficha-envoltura { max-width: var(--ancho-entrada); margin-block: 18px 8px; }
.ficha { max-width: 860px; }
.ficha {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 24px;
	background: var(--superficie); border: 1px solid var(--linea); border-radius: 22px; box-shadow: var(--sombra); overflow: hidden;
}
.ficha-talon {
	align-self: stretch; display: grid; place-content: center; text-align: center; padding: 18px 22px;
	background: var(--acento); color: var(--sobre-acento); position: relative;
}
.ficha-talon::after {
	content: ""; position: absolute; top: 0; bottom: 0; right: -1px; width: 2px;
	background: radial-gradient(circle, var(--superficie) 3px, transparent 3.5px) 0 0 / 2px 12px repeat-y;
}
.ficha-turno-txt { font: 700 .68rem/1 var(--texto); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.ficha-turno { font: 800 2.1rem/1 var(--titulos); letter-spacing: -.03em; }
.ficha-datos { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; padding: 16px 0; }
.ficha-datos dt { font: 700 .7rem/1.2 var(--texto); letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-suave); }
.ficha-datos dd { margin: 3px 0 0; font-weight: 650; font-size: .95rem; }
.ficha-docs-enlace { color: var(--jade); text-decoration: none; font-weight: 750; }
.ficha-fuente { margin-right: 18px; white-space: nowrap; }
@media (max-width: 700px) {
	.ficha { grid-template-columns: auto 1fr; }
	.ficha-talon { grid-row: span 2; }
	.ficha-fuente { grid-column: 2; justify-self: start; margin: 0 16px 16px 0; white-space: normal; }
	.ficha-talon { padding: 14px 16px; }
	.ficha-turno { font-size: 1.6rem; }
}

.entrada-rejilla { padding-block: 24px 40px; max-width: var(--ancho-entrada); }
.entrada-rejilla.con-indice { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; }
.entrada-rejilla.con-indice .prosa { grid-row: 1; grid-column: 1; }
.indice { grid-column: 2; grid-row: 1; }
.indice-caja { position: sticky; top: calc(var(--cab-alto) + 20px); max-height: calc(100vh - var(--cab-alto) - 40px); overflow: auto; padding: 16px; border-radius: var(--radio); background: var(--superficie); border: 1px solid var(--linea); }
.indice-caja summary { display: flex; align-items: center; gap: .5em; font: 700 .78rem/1.2 var(--texto); letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-suave); cursor: pointer; list-style: none; }
.indice-caja summary::-webkit-details-marker { display: none; }
.indice ol { list-style: none; margin: 12px 0 0; padding: 0; border-left: 2px solid var(--linea); }
.indice li a { display: block; padding: .35em .8em; margin-left: -2px; border-left: 2px solid transparent; color: var(--tinta-suave); text-decoration: none; font-size: .9rem; line-height: 1.35; transition: color .2s, border-color .2s; }
.indice li.nivel-3 a { padding-left: 1.6em; font-size: .85rem; }
.indice li a:hover { color: var(--tinta); }
.indice li a.activo { color: var(--tinta); border-color: var(--acento); font-weight: 650; }
@media (max-width: 1020px) {
	.entrada-rejilla.con-indice { grid-template-columns: 1fr; gap: 0; }
	.indice { grid-column: 1; grid-row: 1; margin-bottom: 20px; }
	.entrada-rejilla.con-indice .prosa { grid-row: 2; }
	.indice-caja { position: static; max-height: none; }
}

/* prosa: normaliza el HTML heredado (tablas, <br>, estilos en línea) */
.prosa { max-width: var(--prosa); font-size: 1.07rem; }

.prosa > *:first-child { margin-top: 0; }
.prosa h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem) !important; font-weight: 740; margin: 2.2em 0 .7em !important; padding-top: .2em; color: var(--tinta) !important; }
.prosa h3 { font-size: 1.25rem; font-weight: 700; margin: 1.8em 0 .5em; }
.prosa h1 { display: none; } /* el título ya es el H1 del tema */
.prosa [class$="-breadcrumb"], .prosa [class*="-breadcrumb "] { display: none !important; }
.prosa p, .prosa li { text-align: left !important; }
.prosa ul, .prosa ol { padding-left: 1.3em; }
.prosa li { margin-bottom: .35em; }
.prosa li::marker { color: var(--enlace); }
.prosa img { border-radius: var(--radio-s); }
.prosa blockquote { margin: 1.5em 0; padding: 1em 1.2em; border-left: 4px solid var(--acento); background: var(--superficie); border-radius: 0 var(--radio-s) var(--radio-s) 0; }
.prosa > br, .prosa h2 + br { display: none; }
.prosa strong { font-weight: 700; }
.tabla-scroll { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--linea); border-radius: var(--radio-s); background: var(--superficie); }
.prosa table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.prosa th, .prosa td { padding: .75em .9em !important; border-bottom: 1px solid var(--linea); vertical-align: top; text-align: left; }
.prosa thead td, .prosa th { background: var(--superficie-2); font-weight: 700; }
.prosa tr:last-child td { border-bottom: 0; }
.prosa td p:last-child { margin-bottom: 0; }

/* ---------- contenido con estilos incrustados (posts reescritos a mano: .gob-wrap, .cifi-wrap, .tr-wrap…) ---------- */
.prosa [class$="-wrap"] {
	--guinda: #8f4f00; --guinda-dark: #5e3400; --guinda-dk: #5e3400; --guinda-hover: #a65d00;
	--guinda-light: #fbe6bf; --guinda-lt: #fbe6bf; --guinda-border: #f0cf8f;
	--gold: #f0a020; --gold-light: #fdf3dc; --gold-lt: #fdf3dc; --gold-border: #f0cf8f;
	max-width: 100% !important; font-family: var(--texto) !important;
}
.prosa [class$="-wrap"] :is(h1, h2, h3, h4, [class*="title"]) { font-family: var(--titulos) !important; }
.prosa [class*="-section-underline"] { background: var(--acento) !important; }
:root[data-theme="dark"] .prosa [class$="-wrap"] { color-scheme: light; --fondo: #f7f3ea; --superficie: #fffdf8; --superficie-2: #efe8da; --tinta: #1a2030; --tinta-suave: #4d5566; --linea: #e2d9c6; --acento: #f0a020; --acento-suave: #fbe6bf; --enlace: #8f4f00; --jade: #0b7a62; --jade-suave: #d5efe6; background: var(--superficie); color: var(--tinta); padding: 20px; border-radius: var(--radio); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .prosa [class$="-wrap"] { color-scheme: light; --fondo: #f7f3ea; --superficie: #fffdf8; --superficie-2: #efe8da; --tinta: #1a2030; --tinta-suave: #4d5566; --linea: #e2d9c6; --acento: #f0a020; --acento-suave: #fbe6bf; --enlace: #8f4f00; --jade: #0b7a62; --jade-suave: #d5efe6; background: var(--superficie); color: var(--tinta); padding: 20px; border-radius: var(--radio); }
}

.aviso-final { display: flex; gap: .8em; margin-top: 2.5rem; padding: 1em 1.2em; border-radius: var(--radio-s); background: var(--superficie-2); color: var(--tinta-suave); font-size: .92rem; }
.aviso-final p { margin: 0; }
.aviso-final .ico { color: var(--enlace); margin-top: .15em; }
.compartir { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); }
.compartir p { margin: 0 auto 0 0; font-weight: 650; }
.relacionados { padding-block: 24px 64px; max-width: var(--ancho-entrada); }
.relacionados .seccion-titulo { margin-bottom: 1.2rem; }

/* ---------- checklist de documentos ---------- */
.checklist-barra {
	position: sticky; top: calc(var(--cab-alto) + 8px); z-index: 5;
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 1em; padding: 12px 14px;
	border-radius: 14px; background: color-mix(in srgb, var(--superficie) 92%, transparent); border: 1px solid var(--linea);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--sombra);
}
.checklist-txt { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: .5em; }
.checklist-txt .ico { color: var(--jade); }
.checklist-medidor { flex: 1 1 140px; height: 10px; border-radius: 99px; background: var(--superficie-2); overflow: hidden; }
.checklist-medidor span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--jade); transform-origin: 0 50%; transform: scaleX(var(--v, 0)); transition: transform .5s var(--curva); }
.checklist-acc { display: flex; gap: 6px; }
.checklist-acc button { min-height: 36px; padding: .4em .8em; font-size: .82rem; }
.checklist-barra.completo { border-color: var(--jade); background: color-mix(in srgb, var(--jade-suave) 80%, var(--superficie)); }
.checklist-barra.completo .checklist-txt { color: var(--jade); }

.doc-check { display: flex; gap: .75em; align-items: flex-start; cursor: pointer; }
.doc-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.doc-caja {
	flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: .05em; border-radius: 8px;
	border: 2px solid color-mix(in srgb, var(--tinta-suave) 60%, var(--linea)); background: var(--superficie); transition: background-color .2s, border-color .2s, transform .2s var(--curva);
}
.doc-caja svg { width: 16px; height: 16px; stroke: var(--superficie); stroke-width: 3; fill: none; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s var(--curva) .05s; }
.doc-check:hover .doc-caja { border-color: var(--jade); }
.doc-check input:focus-visible + .doc-caja { outline: 3px solid var(--acento); outline-offset: 2px; }
.doc-check input:checked + .doc-caja { background: var(--jade); border-color: var(--jade); transform: scale(1.06); }
.doc-check input:checked + .doc-caja svg { stroke-dashoffset: 0; }
.doc-item { transition: background-color .3s, opacity .3s; }
.doc-item.hecho { background: color-mix(in srgb, var(--jade-suave) 55%, transparent); }
.doc-item.hecho .doc-texto { opacity: .78; }
li.doc-item { list-style: none; margin-left: -1.3em; padding: .55em .7em; border-radius: 10px; }
tr.doc-item td:first-child { padding-left: .7em !important; }
.doc-texto { flex: 1; min-width: 0; }
.doc-texto > *:last-child { margin-bottom: 0; }
div.doc-item { border-radius: 12px; }
.doc-cajita-wrap { display: flex; gap: .75em; align-items: flex-start; }

/* ---------- listados, 404, paginación ---------- */
.listado-cabecera { padding-top: clamp(28px, 4vw, 52px); }
.listado-titulo { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 780; letter-spacing: -.03em; }
.listado-bajada { color: var(--tinta-suave); max-width: 70ch; }
.buscar-listado { margin: 0 0 8px; }
.bloque-listado { padding-block: 24px 64px; }
.vacio { padding: 32px; border-radius: var(--radio); background: var(--superficie); border: 1px dashed var(--linea); color: var(--tinta-suave); }
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 .8em; border-radius: 12px; border: 1px solid var(--linea); background: var(--superficie); color: var(--tinta); text-decoration: none; font-weight: 650; }
.pagination .page-numbers.current { background: var(--tinta); color: var(--fondo); border-color: var(--tinta); }
.error404-caja { padding-block: 56px 16px; text-align: center; display: grid; justify-items: center; }
.error404-num { font: 800 clamp(5rem, 18vw, 10rem)/1 var(--titulos); letter-spacing: -.06em; margin: 0; color: transparent; -webkit-text-stroke: 2px var(--acento); }
.error404-caja .hero-buscar { width: 100%; }

/* ---------- pie ---------- */
.pie { margin-top: 40px; background: var(--superficie); border-top: 1px solid var(--linea); font-size: .92rem; color: var(--tinta-suave); }
.pie-rejilla { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding-block: 48px 24px; }
.pie-nombre { font: 780 1.3rem/1.1 var(--titulos); color: var(--tinta); margin-bottom: .6em; }
.pie-marca p:last-child { max-width: 46ch; }
.pie-titulo { font: 700 .75rem/1.2 var(--texto); letter-spacing: .12em; text-transform: uppercase; color: var(--tinta); margin-bottom: .9em; }
.pie-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .45em; }
.pie-deps { grid-template-columns: 1fr 1fr; }
.pie a { color: var(--tinta-suave); text-decoration: none; }
.pie a:hover { color: var(--enlace); text-decoration: underline; }
.pie-legal { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px 28px; border-top: 1px solid var(--linea); font-size: .8rem; }
.pie-legal p { margin: 0; }
.arriba { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--linea); background: var(--fondo); color: var(--tinta); cursor: pointer; }
.arriba .ico { transform: rotate(-90deg); }
@media (max-width: 760px) { .pie-rejilla { grid-template-columns: 1fr; } }

/* ---------- animaciones al hacer scroll (solo con JS y sin «reducir movimiento») ---------- */
@media (prefers-reduced-motion: no-preference) {
	.js .revelar { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--curva), transform .7s var(--curva); }
	.js .revelar.visto { opacity: 1; transform: none; }
	.js .titulo-revelar { clip-path: inset(0 0 100% 0); transform: translateY(.3em); transition: clip-path .8s var(--curva), transform .8s var(--curva); }
	.js .titulo-revelar.visto { clip-path: inset(0 0 -10% 0); transform: none; }
	.js .escalonar > * { opacity: 0; transform: translateY(22px) scale(.98); transition: opacity .6s var(--curva), transform .6s var(--curva); transition-delay: calc(var(--i, 0) * 60ms); }
	.js .escalonar.visto > * { opacity: 1; transform: none; }
	.js .hero-titulo .linea > span { transform: translateY(105%); animation: subir .9s var(--curva) forwards; }
	.js .hero-titulo .linea:nth-child(2) > span { animation-delay: .08s; }
	.js .hero-titulo .linea:nth-child(3) > span { animation-delay: .16s; }
	.js .subrayado::after { transform: scaleX(0); animation: trazo .7s var(--curva) .7s forwards; }
	@keyframes subir { to { transform: none; } }
	@keyframes trazo { to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- impresión: el checklist sale limpio ---------- */
@media print {
	.cabecera, .aviso-oficial, .pie, .indice, .compartir, .relacionados, .progreso, .checklist-acc, .ficha-fuente { display: none !important; }
	body { background: #fff; color: #000; }
	.entrada-rejilla.con-indice { display: block; }
	.checklist-barra { position: static; box-shadow: none; }
}
