/*
 * Centro de ayuda de Fichalia.
 * Estilos propios inspirados en la navegación del ejemplo «cheatsheet» de Bootstrap.
 *
 * Contraste comprobado (WCAG 2.1):
 * - Blanco sobre #0451AA: 7,6:1.
 * - #1B2433 sobre #F25165 (botón de demo): 4,56:1.
 * - #0091FF se usa solo en bordes, acentos y foco (3,23:1 frente a blanco, válido para elementos no textuales).
 */

:root {
	--azul: #0451AA;
	--azul-oscuro: #03408A;
	--azul-registro: #0091FF;
	--azul-suave: #E8F1FC;
	--cta: #F25165;
	--cta-hover: #D93A50;
	--texto: #1B2433;
	--texto-suave: #4A5568;
	--fondo: #F6F8FB;
	--superficie: #FFFFFF;
	--borde: #DDE3EC;
	--aviso-fondo: #FFF6E0;
	--aviso-borde: #E0A800;
	--radio: 10px;
	--sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
	--fuente-titulos: "Quicksand", "Segoe UI", system-ui, -apple-system, sans-serif;
	--fuente-texto: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ancho-lateral: 290px;
	color-scheme: light;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 1rem;
}

body {
	margin: 0;
	font-family: var(--fuente-texto);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--texto);
	background: var(--fondo);
}

h1,
h2,
h3,
h4 {
	font-family: var(--fuente-titulos);
	font-weight: 700;
	line-height: 1.25;
	color: var(--texto);
	margin: 1.6em 0 .6em;
}

h1 {
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
	margin-top: .2em;
}

h2 {
	font-size: 1.4rem;
}

h3 {
	font-size: 1.15rem;
}

h4 {
	font-size: 1.05rem;
}

a {
	color: var(--azul);
	text-underline-offset: .15em;
}

a:hover {
	color: var(--azul-oscuro);
}

:focus-visible {
	outline: 3px solid var(--azul-registro);
	outline-offset: 2px;
	border-radius: 4px;
}

img {
	max-width: 100%;
	height: auto;
}

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

[hidden] {
	display: none !important;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -100px;
	z-index: 100;
	padding: .6rem 1rem;
	background: var(--azul);
	color: #fff;
	border-radius: 0 0 var(--radio) var(--radio);
	font-weight: 600;
}

.skip-link:focus {
	top: 0;
	color: #fff;
}

/* Cabecera. */

.site-header {
	background: var(--superficie);
	border-bottom: 1px solid var(--borde);
	border-top: 4px solid var(--azul);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1320px;
	margin: 0 auto;
	padding: .75rem 16px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: .75rem;
	text-decoration: none;
	color: var(--texto);
}

.brand img {
	display: block;
	width: 132px;
	height: auto;
}

.brand__name {
	font-family: var(--fuente-titulos);
	font-weight: 700;
	font-size: 1.35rem;
	color: var(--azul);
}

.brand__section {
	font-family: var(--fuente-titulos);
	font-weight: 700;
	font-size: 1rem;
	color: var(--texto-suave);
	padding-left: .75rem;
	border-left: 2px solid var(--azul-registro);
}

.site-header__link {
	font-weight: 600;
	font-size: .95rem;
	white-space: nowrap;
}

/* Estructura. */

.layout {
	display: flex;
	flex-direction: column;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 16px;
}

.main {
	min-width: 0;
	padding: 1.5rem 0 3rem;
	outline: none;
}

.sidebar {
	min-width: 0;
}

/* Sin JavaScript, en móvil el menú aparece después del contenido y el enlace «Ver guías» lleva hasta él. */
.no-js .sidebar {
	order: 3;
}

.no-js .main {
	order: 2;
}

.guides-toggle {
	order: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	margin-top: 1rem;
	padding: .65rem 1rem;
	font: inherit;
	font-weight: 600;
	color: var(--azul);
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: var(--radio);
	text-decoration: none;
	cursor: pointer;
}

.guides-toggle::before {
	content: "";
	width: 1rem;
	height: .75rem;
	background:
		linear-gradient(currentColor 0 0) top / 100% 2px no-repeat,
		linear-gradient(currentColor 0 0) center / 100% 2px no-repeat,
		linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat;
}

.guides-toggle[aria-expanded="true"] {
	background: var(--azul-suave);
	border-color: var(--azul);
}

.js .sidebar.is-collapsed {
	display: none;
}

.js .sidebar {
	order: 1;
	margin-top: .5rem;
}

.js .guides-toggle {
	order: 0;
}

.js .main {
	order: 2;
}

/* Portada, categorías y búsqueda: una sola columna centrada, sin menú lateral. */
.layout--simple .main {
	width: 100%;
	max-width: 1040px;
	margin: 0 auto;
}

@media (min-width: 992px) {
	.layout--con-lateral {
		display: grid;
		grid-template-columns: var(--ancho-lateral) minmax(0, 1fr);
		gap: 2.5rem;
		align-items: start;
	}

	.guides-toggle,
	.js .guides-toggle {
		display: none;
	}

	.sidebar,
	.js .sidebar,
	.js .sidebar.is-collapsed,
	.no-js .sidebar {
		display: block;
		order: 0;
		position: sticky;
		top: 0;
		max-height: 100vh;
		overflow-y: auto;
		margin-top: 0;
		padding: 1.5rem 0 2rem;
	}

	.main,
	.no-js .main,
	.js .main {
		order: 0;
		max-width: 860px;
		padding-top: 2rem;
	}
}

/* Menú lateral. */

.guides-nav {
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: var(--radio);
	padding: 1rem;
	font-size: .94rem;
}

@media (min-width: 992px) {
	.guides-nav {
		background: transparent;
		border: 0;
		padding: 0;
	}
}

.guides-nav__search {
	display: flex;
	gap: .4rem;
	margin-bottom: 1rem;
}

.guides-nav__search input {
	flex: 1;
	min-width: 0;
	padding: .5rem .65rem;
	font: inherit;
	border: 1px solid var(--borde);
	border-radius: 8px;
	background: var(--superficie);
}

.guides-nav__search button {
	padding: .5rem .75rem;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--azul);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

.guides-nav__module-title {
	font-family: var(--fuente-titulos);
	font-weight: 700;
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--texto-suave);
	margin: 1.25rem 0 .5rem;
}

.guides-nav__module:first-of-type .guides-nav__module-title {
	margin-top: 0;
}

.guides-nav__home {
	margin: 0 0 .85rem;
	font-weight: 600;
}

.guides-nav__home a {
	text-decoration: none;
}

.guides-nav__home a:hover {
	text-decoration: underline;
}

/* Temas del menú: un desplegable por categoría con su color. */
.nav-topic {
	margin-bottom: .4rem;
	border-radius: var(--radio);
}

.nav-topic > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	padding: .3rem .25rem;
	cursor: pointer;
	list-style: none;
	border-radius: var(--radio);
}

.nav-topic > summary::-webkit-details-marker {
	display: none;
}

.nav-topic > summary:hover .tema-pill {
	border-color: var(--tema);
}

.nav-topic__count {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	flex: none;
	font-size: .8rem;
	font-weight: 600;
	color: var(--texto-suave);
}

.nav-topic__count::after {
	content: "";
	width: .45rem;
	height: .45rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform .15s;
}

.nav-topic[open] .nav-topic__count::after {
	transform: rotate(-135deg) translateY(-1px);
}

.guides-nav__list {
	list-style: none;
	margin: .3rem 0 .6rem .7rem;
	padding: 0 0 0 .25rem;
	border-left: 3px solid var(--tema, var(--borde));
}

.guides-nav__list a {
	display: block;
	padding: .3rem .6rem;
	color: var(--texto-suave);
	text-decoration: none;
	line-height: 1.4;
	border-radius: 0 6px 6px 0;
}

.guides-nav__list a:hover {
	color: var(--texto);
	background: var(--tema-suave, var(--azul-suave));
}

.guides-nav__list a.is-active {
	color: var(--texto);
	font-weight: 700;
	background: var(--tema-suave, var(--azul-suave));
}

/*
 * Colores de los bloques (Registro horario, Planificación, Gestión laboral, Facturación…). El texto de las etiquetas es siempre oscuro (más de 13:1);
 * el color del tema solo se usa en puntos y bordes (más de 3:1 frente a blanco).
 */
.tema-1 { --tema: #0451AA; --tema-suave: #E7EFFA; }
.tema-2 { --tema: #1E8E5A; --tema-suave: #E4F5EC; }
.tema-3 { --tema: #7048E8; --tema-suave: #EFEBFD; }
.tema-4 { --tema: #D9480F; --tema-suave: #FDEEE6; }
.tema-5 { --tema: #0C8599; --tema-suave: #E2F5F7; }
.tema-6 { --tema: #C2255C; --tema-suave: #FBE8EF; }
.tema-7 { --tema: #0091FF; --tema-suave: #E3F2FF; }
.tema-8 { --tema: #A35F00; --tema-suave: #FBF1DF; }

.tema-pill {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	min-width: 0;
	padding: .25rem .7rem;
	font-family: var(--fuente-titulos);
	font-weight: 700;
	font-size: .9rem;
	line-height: 1.3;
	color: var(--texto);
	background: var(--tema-suave, var(--azul-suave));
	border: 1px solid transparent;
	border-radius: 999px;
	text-decoration: none;
}

a.tema-pill:hover {
	color: var(--texto);
	border-color: var(--tema);
}

.tema-pill--small {
	font-size: .78rem;
	padding: .15rem .6rem;
}

.tema-dot {
	flex: none;
	display: inline-block;
	width: .6rem;
	height: .6rem;
	background: var(--tema, var(--azul));
	border-radius: 50%;
}

.guide__topic {
	margin: 0 0 .6rem;
}

.category-title {
	display: flex;
	align-items: center;
	gap: .6rem;
}

.category-title .tema-dot {
	width: .9rem;
	height: .9rem;
}

/* Portada. */

.hero {
	padding: 2rem 1.25rem;
	margin-bottom: 1rem;
	background: var(--azul);
	color: #fff;
	border-radius: calc(var(--radio) * 1.4);
	background-image: radial-gradient(circle at 100% 0, rgba(0, 145, 255, .55), transparent 55%);
}

.hero h1 {
	color: #fff;
	margin-bottom: .4rem;
}

.hero__lead {
	max-width: 46rem;
	margin: 0 0 1.25rem;
	font-size: 1.08rem;
}

@media (min-width: 768px) {
	.hero {
		padding: 2.5rem 2.25rem;
	}
}

.search-form {
	max-width: 40rem;
}

.search-form__label {
	display: block;
	font-weight: 600;
	margin-bottom: .4rem;
}

.search-form__row {
	display: flex;
	gap: .5rem;
}

.search-form input {
	flex: 1;
	min-width: 0;
	padding: .8rem 1rem;
	font: inherit;
	font-size: 1.05rem;
	color: var(--texto);
	border: 2px solid transparent;
	border-radius: var(--radio);
	background: #fff;
	box-shadow: var(--sombra);
}

.main > .search-form input,
.main > form.search-form input {
	border-color: var(--borde);
}

.search-form input:focus-visible {
	border-color: var(--azul-registro);
	outline-offset: 0;
}

.search-form button {
	padding: .8rem 1.25rem;
	font: inherit;
	font-weight: 700;
	color: #fff;
	background: var(--azul-oscuro);
	border: 2px solid #fff;
	border-radius: var(--radio);
	cursor: pointer;
}

.main > .search-form button {
	border-color: var(--azul-oscuro);
}

.search-form button:hover {
	background: #022E66;
}

.section {
	margin-top: 2rem;
}

.task-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: .9rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.task-card a {
	display: flex;
	flex-direction: column;
	gap: .55rem;
	align-items: flex-start;
	height: 100%;
	padding: 1rem 1.1rem;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-top: 4px solid var(--tema, var(--azul-registro));
	border-radius: var(--radio);
	box-shadow: var(--sombra);
	text-decoration: none;
	color: var(--texto);
	transition: border-color .15s, transform .15s;
}

.task-card a:hover {
	border-color: var(--azul);
	transform: translateY(-1px);
}

.task-card__category {
	font-size: .8rem;
	font-weight: 600;
	color: var(--texto-suave);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.task-card__title {
	font-family: var(--fuente-titulos);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.35;
	color: var(--azul);
}

.module-block__title {
	font-size: 1.15rem;
	padding-bottom: .4rem;
	border-bottom: 2px solid var(--borde);
}

/* Categorías desplegables. */

.category-disclosure {
	margin-bottom: .75rem;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-left: 5px solid var(--tema, var(--borde));
	border-radius: var(--radio);
	box-shadow: var(--sombra);
}

.category-disclosure > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: .9rem 1.1rem;
	cursor: pointer;
	list-style: none;
	font-family: var(--fuente-titulos);
	font-weight: 700;
	font-size: 1.05rem;
}

.category-disclosure > summary::-webkit-details-marker {
	display: none;
}

.category-disclosure > summary::after {
	content: "";
	flex: none;
	width: .6rem;
	height: .6rem;
	border-right: 2px solid var(--azul);
	border-bottom: 2px solid var(--azul);
	transform: rotate(45deg);
	transition: transform .15s;
}

.category-disclosure[open] > summary::after {
	transform: rotate(-135deg);
}

.category-disclosure__name {
	flex: 1;
	display: inline-flex;
	align-items: center;
	gap: .6rem;
}

.category-disclosure__count {
	font-family: var(--fuente-texto);
	font-size: .85rem;
	font-weight: 500;
	color: var(--texto-suave);
}

.category-disclosure .guide-list {
	padding: 0 1.1rem;
	border-top: 1px solid var(--borde);
}

.category-disclosure__more {
	margin: 0;
	padding: .75rem 1.1rem 1rem;
	font-size: .94rem;
}

/* Listas de guías con respuesta desplegable. */

.guide-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.guide-item {
	padding: 1rem 0;
	border-bottom: 1px solid var(--borde);
}

.guide-item:last-child {
	border-bottom: 0;
}

.guide-list--page .guide-item {
	padding: 1.1rem 1.2rem;
	margin-bottom: .75rem;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: var(--radio);
}

.guide-item__title {
	margin: 0 0 .3rem;
	font-size: 1.05rem;
}

.guide-item__title a {
	text-decoration: none;
}

.guide-item__title a:hover {
	text-decoration: underline;
}

.guide-item__summary {
	margin: 0 0 .6rem;
	color: var(--texto-suave);
}

.answer-toggle {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .4rem .8rem;
	font: inherit;
	font-size: .92rem;
	font-weight: 600;
	color: var(--azul);
	background: var(--azul-suave);
	border: 1px solid transparent;
	border-radius: 999px;
	cursor: pointer;
}

.answer-toggle::after {
	content: "";
	width: .45rem;
	height: .45rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .15s;
}

.answer-toggle:hover::after {
	transform: rotate(-45deg) translate(1px, 1px);
}

.answer-toggle:hover {
	border-color: var(--azul);
}

.answer-panel {
	margin-top: .75rem;
	padding: 1rem 1.1rem;
	background: var(--fondo);
	border-left: 4px solid var(--azul-registro);
	border-radius: 0 var(--radio) var(--radio) 0;
}

.answer-panel__status {
	margin: 0;
	color: var(--texto-suave);
}

.answer-panel__body > :first-child {
	margin-top: 0;
}

.answer-panel__more {
	margin: 1rem 0 0;
	font-weight: 600;
}

.answer-panel__error {
	margin: 0;
}

/* Ruta de navegación. */

.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem .5rem;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	font-size: .9rem;
	color: var(--texto-suave);
}

.breadcrumb li + li::before {
	content: "›";
	margin-right: .5rem;
	color: var(--texto-suave);
}

.lead {
	font-size: 1.1rem;
	color: var(--texto-suave);
}

/* Guía. */

.guide {
	padding: 1.5rem 1.25rem;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: calc(var(--radio) * 1.4);
	box-shadow: var(--sombra);
}

@media (min-width: 768px) {
	.guide {
		padding: 2rem 2.25rem;
	}
}

.guide__header {
	padding-bottom: 1rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid var(--borde);
}

.guide__audience {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
	margin: .5rem 0 0;
	font-size: .9rem;
}

.guide__audience-label {
	font-weight: 600;
	color: var(--texto-suave);
}

.badge {
	display: inline-block;
	padding: .15rem .6rem;
	font-size: .82rem;
	font-weight: 600;
	color: var(--azul-oscuro);
	background: var(--azul-suave);
	border: 1px solid #BCD4F2;
	border-radius: 999px;
}

.guide__body {
	font-size: 1.03rem;
}

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

.guide__body h2 {
	font-size: 1.25rem;
	margin-top: 1.8rem;
}

.respuesta-directa {
	font-size: 1.08rem;
	padding: .9rem 1.1rem;
	background: var(--azul-suave);
	border-left: 4px solid var(--azul-registro);
	border-radius: 0 var(--radio) var(--radio) 0;
}

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

ol.pasos > li {
	counter-increment: paso;
	position: relative;
	padding: .15rem 0 .15rem 2.6rem;
	margin-bottom: .85rem;
}

ol.pasos > li::before {
	content: counter(paso);
	position: absolute;
	left: 0;
	top: .1rem;
	display: grid;
	place-items: center;
	width: 1.8rem;
	height: 1.8rem;
	font-weight: 700;
	font-size: .9rem;
	color: #fff;
	background: var(--azul);
	border-radius: 50%;
}

.nota,
.aviso,
.ejemplo {
	margin: 1.25rem 0;
	padding: .85rem 1.1rem;
	border-radius: var(--radio);
	border: 1px solid var(--borde);
	background: var(--fondo);
}

.nota > :first-child,
.aviso > :first-child,
.ejemplo > :first-child {
	margin-top: 0;
}

.nota > :last-child,
.aviso > :last-child,
.ejemplo > :last-child {
	margin-bottom: 0;
}

.aviso {
	background: var(--aviso-fondo);
	border-color: var(--aviso-borde);
}

.ejemplo {
	border-left: 4px solid var(--azul);
}

.guide__body kbd,
.answer-panel kbd {
	display: inline-block;
	padding: .05rem .4rem;
	font-family: var(--fuente-texto);
	font-size: .92em;
	font-weight: 600;
	color: var(--texto);
	background: var(--superficie);
	border: 1px solid #B8C2D1;
	border-bottom-width: 2px;
	border-radius: 5px;
	white-space: nowrap;
}

.guide__body table,
.answer-panel table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
	font-size: .95rem;
	display: block;
	overflow-x: auto;
}

.guide__body th,
.guide__body td,
.answer-panel th,
.answer-panel td {
	padding: .5rem .7rem;
	text-align: left;
	border: 1px solid var(--borde);
	vertical-align: top;
}

.guide__body th,
.answer-panel th {
	background: var(--fondo);
}

/* Llamada a la acción. */

.demo-cta {
	margin-top: 2rem;
	padding: 1.4rem 1.5rem;
	background: #FFF1F3;
	border: 1px solid #F7B4BE;
	border-radius: var(--radio);
}

.demo-cta h2 {
	margin-top: 0;
	font-size: 1.2rem;
}

.button {
	display: inline-block;
	padding: .8rem 1.4rem;
	font-weight: 700;
	text-decoration: none;
	border-radius: var(--radio);
}

.button--cta {
	color: var(--texto);
	background: var(--cta);
	border: 2px solid var(--cta);
}

.button--cta:hover {
	color: #fff;
	background: var(--cta-hover);
	border-color: var(--cta-hover);
}

/* Relacionadas y pie de guía. */

.related ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.related li {
	display: flex;
	flex-direction: column;
	padding: .7rem 0;
	border-bottom: 1px solid var(--borde);
}

.related li a {
	font-weight: 600;
}

.related li span {
	color: var(--texto-suave);
	font-size: .94rem;
}

.guide__footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--borde);
	font-size: .92rem;
	color: var(--texto-suave);
}

.guide__footer p {
	margin: .25rem 0;
}

.search-summary {
	margin: 1.25rem 0;
	font-weight: 600;
}

/* Pie. */

.site-footer {
	border-top: 1px solid var(--borde);
	background: var(--superficie);
	font-size: .9rem;
	color: var(--texto-suave);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .5rem 1rem;
	max-width: 1320px;
	margin: 0 auto;
	padding: 1.25rem 16px;
}

.site-footer p {
	margin: 0;
}

@media (max-width: 575px) {
	.brand__section {
		display: none;
	}

	.search-form__row {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
	}
}

/* Bloques y categorías. */

.module-block__title a {
	color: var(--texto);
	text-decoration: none;
}

.module-block__title a:hover {
	color: var(--azul);
	text-decoration: underline;
}

.module-block__description,
.block-category__description {
	margin: -.2rem 0 .9rem;
	color: var(--texto-suave);
}

.guides-nav__module-title a {
	color: inherit;
	text-decoration: none;
}

.guides-nav__module-title a:hover {
	color: var(--azul);
	text-decoration: underline;
}

.topic-index {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
}

.block-category {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-left: 5px solid var(--tema, var(--borde));
	border-radius: var(--radio);
	box-shadow: var(--sombra);
}

.block-category .category-title {
	margin-top: .2rem;
	font-size: 1.2rem;
}

.block-category .category-title a {
	color: var(--texto);
	text-decoration: none;
}

.block-category .category-title a:hover {
	text-decoration: underline;
}

.block-category__more {
	margin: .5rem 0 0;
	font-weight: 600;
}

.category-actions {
	margin: 0 0 1.25rem;
}

.button--secondary {
	color: var(--azul);
	background: var(--superficie);
	border: 2px solid var(--azul);
	font-size: .95rem;
	padding: .55rem 1rem;
}

.button--secondary:hover {
	color: #fff;
	background: var(--azul);
}

/* Todas las respuestas de una categoría. */

.toc {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: var(--radio);
}

.toc ol {
	margin: 0;
	padding-left: 1.25rem;
}

.toc li {
	margin: .25rem 0;
}

.guide--compact {
	margin-bottom: 1.25rem;
}

.guide--compact > h2 {
	margin-top: 0;
	font-size: 1.3rem;
}

.guide--compact > h2 a {
	color: var(--texto);
	text-decoration: none;
}

.guide__more {
	margin: 1rem 0 0;
	font-size: .92rem;
}

/* Imágenes y vídeos dentro de las respuestas. */

.guide__body figure,
.answer-panel figure {
	margin: 1.25rem 0;
}

.guide__body figure img,
.answer-panel figure img {
	display: block;
	border: 1px solid var(--borde);
	border-radius: var(--radio);
}

.guide__body figcaption,
.answer-panel figcaption {
	margin-top: .4rem;
	font-size: .9rem;
	color: var(--texto-suave);
}

.video__enlace {
	position: relative;
	display: block;
	max-width: 640px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
	border-radius: var(--radio);
}

.video__enlace img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0 !important;
	opacity: .85;
}

.video__play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	max-width: 90%;
	padding: .6rem 1rem;
	font-weight: 700;
	color: #fff;
	background: rgba(4, 81, 170, .92);
	border-radius: 999px;
}

.video__play::before {
	content: "";
	border-style: solid;
	border-width: .45rem 0 .45rem .75rem;
	border-color: transparent transparent transparent #fff;
}

.video__enlace:hover .video__play,
.video__enlace:focus-visible .video__play {
	background: var(--azul-oscuro);
}

.video iframe {
	display: block;
	width: 100%;
	max-width: 640px;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: var(--radio);
}


/* Color del bloque en su título. */

.module-block__title,
.guides-nav__module-title,
.block-title {
	display: flex;
	align-items: center;
}

/* Separación entre el punto de color y el texto. */
.module-block__title .tema-dot,
.guides-nav__module-title .tema-dot,
.block-title .tema-dot {
	margin-right: .65rem;
}

.module-block {
	margin-top: 1.75rem;
}

.module-block__title {
	border-bottom-color: var(--tema, var(--borde));
	border-bottom-width: 3px;
}

.guides-nav__module-title .tema-dot {
	width: .55rem;
	height: .55rem;
}

.block-title .tema-dot {
	width: 1rem;
	height: 1rem;
}

/* Panel lateral con una sola respuesta. */

.has-drawer,
.has-drawer body {
	overflow: hidden;
}

.answer-drawer-overlay {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(16, 24, 40, .45);
	opacity: 0;
	transition: opacity .2s;
}

.answer-drawer-overlay.is-open {
	opacity: 1;
}

.answer-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 100;
	display: flex;
	flex-direction: column;
	width: min(620px, 100vw);
	background: var(--superficie);
	box-shadow: -8px 0 30px rgba(16, 24, 40, .18);
	transform: translateX(100%);
	transition: transform .25s ease;
}

.answer-drawer.is-open {
	transform: translateX(0);
}

.answer-drawer__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 1.25rem 1rem 1.5rem;
	border-bottom: 1px solid var(--borde);
	border-top: 4px solid var(--azul);
}

.answer-drawer__title {
	margin: 0;
	font-size: 1.2rem;
	outline: none;
}

.answer-drawer__close {
	flex: none;
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--texto);
	background: var(--fondo);
	border: 1px solid var(--borde);
	border-radius: 50%;
	cursor: pointer;
}

.answer-drawer__close:hover {
	background: var(--azul-suave);
	border-color: var(--azul);
}

.answer-drawer__content {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 1.25rem 1.5rem 2rem;
	font-size: 1.02rem;
}

.answer-drawer__content > :first-child,
.answer-drawer__content .answer-panel__body > :first-child {
	margin-top: 0;
}

.answer-drawer__content figure img {
	display: block;
	border: 1px solid var(--borde);
	border-radius: var(--radio);
}

.answer-drawer__content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
	font-size: .95rem;
	display: block;
	overflow-x: auto;
}

.answer-drawer__content th,
.answer-drawer__content td {
	padding: .5rem .7rem;
	text-align: left;
	border: 1px solid var(--borde);
	vertical-align: top;
}

.answer-drawer__content kbd {
	display: inline-block;
	padding: .05rem .4rem;
	font-size: .92em;
	font-weight: 600;
	background: var(--superficie);
	border: 1px solid #B8C2D1;
	border-bottom-width: 2px;
	border-radius: 5px;
}

@media (prefers-reduced-motion: reduce) {
	.answer-drawer,
	.answer-drawer-overlay {
		transition: none;
	}
}

/*
 * Botón fijo de contacto: icono llamativo que despliega el texto al pasar el ratón o con el teclado.
 * Icono blanco sobre #F25165: 3,42:1 (válido para iconos). Texto blanco sobre #D93A50: 4,5:1.
 */

.contact-fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 80;
	display: inline-flex;
	align-items: center;
	height: 4rem;
	min-width: 4rem;
	padding: 0 1.15rem;
	font-weight: 700;
	font-size: 1rem;
	color: #fff;
	background: var(--cta);
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(242, 81, 101, .45), 0 2px 6px rgba(16, 24, 40, .2);
	text-decoration: none;
	animation: contacto-pulso 2.4s ease-out infinite;
	transition: background-color .2s, transform .2s;
}

.contact-fab__icon {
	flex: none;
	width: 1.75rem;
	height: 1.75rem;
}

.contact-fab__text {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	opacity: 0;
	transition: max-width .3s ease, opacity .2s ease, margin-left .3s ease;
}

.contact-fab:hover,
.contact-fab:focus-visible {
	color: #fff;
	background: var(--cta-hover);
	transform: translateY(-2px);
	animation: none;
}

.contact-fab:hover .contact-fab__text,
.contact-fab:focus-visible .contact-fab__text {
	max-width: 14rem;
	margin-left: .6rem;
	opacity: 1;
}

@keyframes contacto-pulso {
	0% {
		box-shadow: 0 8px 24px rgba(242, 81, 101, .45), 0 0 0 0 rgba(242, 81, 101, .55);
	}
	70% {
		box-shadow: 0 8px 24px rgba(242, 81, 101, .45), 0 0 0 16px rgba(242, 81, 101, 0);
	}
	100% {
		box-shadow: 0 8px 24px rgba(242, 81, 101, .45), 0 0 0 0 rgba(242, 81, 101, 0);
	}
}

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

	.contact-fab__text {
		transition: none;
	}
}

/* Mientras se lee una respuesta en el panel lateral, el botón no la tapa. */
.has-drawer .contact-fab {
	display: none;
}

/* Espacio para que el botón no tape el texto del pie. */
.site-footer {
	padding-bottom: 4.5rem;
}

@media (max-width: 767px) {
	.contact-fab {
		right: 16px;
		bottom: 16px;
	}
}

@media (min-width: 768px) {
	.site-footer {
		padding-bottom: 0;
	}

	.site-footer__inner {
		padding-right: 100px;
	}
}

/* Panel privado de estadísticas. Una serie por gráfica, en azul corporativo; cifras siempre en texto. */

.stats-periods {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0 0 1.5rem;
}

.stats-periods a {
	padding: .4rem .9rem;
	font-weight: 600;
	text-decoration: none;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: 999px;
}

.stats-periods a[aria-current="page"] {
	color: #fff;
	background: var(--azul);
	border-color: var(--azul);
}

.stats-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
	gap: .75rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
}

.stats-tiles li {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	padding: 1rem;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: var(--radio);
}

.stats-tiles__value {
	font-family: var(--fuente-titulos);
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--texto);
}

.stats-tiles__label {
	font-size: .88rem;
	color: var(--texto-suave);
}

.stats-card {
	margin-bottom: 1.25rem;
	padding: 1.1rem 1.25rem;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: var(--radio);
}

.stats-card h2 {
	margin: 0 0 .75rem;
	font-size: 1.1rem;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	gap: 0 1.25rem;
}

.stats-note,
.stats-empty {
	margin: -.25rem 0 .75rem;
	font-size: .88rem;
	color: var(--texto-suave);
}

.stats-columns svg {
	display: block;
	width: 100%;
	height: 180px;
}

.stats-columns__base {
	stroke: var(--borde);
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}

.stats-columns__hit {
	fill: transparent;
}

.stats-columns__bar {
	fill: var(--azul);
}

.stats-columns__day:hover .stats-columns__hit {
	fill: var(--azul-suave);
}

.stats-columns__axis {
	display: flex;
	justify-content: space-between;
	margin-top: .35rem;
	font-size: .82rem;
	color: var(--texto-suave);
}

.stats-table {
	margin-top: .75rem;
	font-size: .92rem;
}

.stats-table summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--azul);
}

.stats-table table {
	width: 100%;
	border-collapse: collapse;
	margin-top: .5rem;
}

.stats-table th,
.stats-table td {
	padding: .35rem .6rem;
	text-align: left;
	border-bottom: 1px solid var(--borde);
}

.stats-bars {
	width: 100%;
	border-collapse: collapse;
	font-size: .92rem;
}

.stats-bars th,
.stats-bars td {
	padding: .35rem .4rem;
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var(--borde);
}

.stats-bars tbody th {
	font-weight: 500;
	width: 45%;
	word-break: break-word;
}

.stats-bars thead th {
	font-size: .8rem;
	color: var(--texto-suave);
	font-weight: 600;
}

.stats-bars__bar {
	width: 40%;
}

.stats-bars__bar svg {
	display: block;
	width: 100%;
	height: 12px;
}

.stats-bars__bar rect {
	fill: var(--azul);
}

.stats-bars tr:hover .stats-bars__bar rect {
	fill: var(--azul-oscuro);
}

.stats-bars__value {
	text-align: right !important;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.stats-bars--guides tbody th {
	width: auto;
}

.stats-bars--guides .stats-bars__bar {
	width: 25%;
}

.stats-sub {
	display: block;
	font-size: .8rem;
	color: var(--texto-suave);
}

@media (max-width: 575px) {
	.stats-bars--guides .stats-bars__bar {
		display: none;
	}
}

/* Panel: pestañas, filtros y registros. */

.stats-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .5rem 1rem;
}

.stats-user {
	margin: 0;
	font-size: .9rem;
	color: var(--texto-suave);
}

.stats-tabs {
	display: flex;
	gap: .25rem;
	margin: 0 0 1rem;
	border-bottom: 2px solid var(--borde);
}

.stats-tabs a {
	margin-bottom: -2px;
	padding: .55rem 1rem;
	font-weight: 700;
	color: var(--texto-suave);
	text-decoration: none;
	border-bottom: 3px solid transparent;
}

.stats-tabs a[aria-current="page"] {
	color: var(--azul);
	border-bottom-color: var(--azul);
}

.stats-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: .75rem 1rem;
	margin-bottom: 1rem;
	padding: 1rem 1.25rem;
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: var(--radio);
}

.stats-filters label {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	font-size: .85rem;
	font-weight: 600;
	color: var(--texto-suave);
}

.stats-filters select,
.stats-filters input {
	padding: .45rem .6rem;
	font: inherit;
	font-size: .95rem;
	color: var(--texto);
	background: var(--superficie);
	border: 1px solid var(--borde);
	border-radius: 8px;
}

.stats-filters button {
	padding: .5rem 1.1rem;
	font: inherit;
	font-weight: 700;
	color: #fff;
	background: var(--azul);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

.stats-filters__reset {
	align-self: center;
	font-size: .9rem;
}

.stats-count {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
}

.stats-scroll {
	overflow-x: auto;
}

.stats-log {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
	font-size: .88rem;
}

.stats-log th,
.stats-log td {
	padding: .45rem .5rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--borde);
}

.stats-log thead th {
	font-size: .8rem;
	color: var(--texto-suave);
}

.stats-log__date {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.estado-evento {
	display: inline-block;
	padding: .05rem .5rem;
	font-size: .78rem;
	font-weight: 700;
	white-space: nowrap;
	color: var(--texto);
	background: var(--fondo);
	border: 1px solid var(--borde);
	border-radius: 999px;
}

.estado-evento--panel {
	background: var(--azul-suave);
	border-color: #BCD4F2;
}

.estado-evento--search {
	background: #EFEBFD;
	border-color: #C9BDF5;
}

.estado-evento--404 {
	background: var(--aviso-fondo);
	border-color: var(--aviso-borde);
}

.stats-pager {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-top: 1rem;
	font-size: .92rem;
}
