/* rt-hogar · rth-componentes.css
   CERO valores literales de color, sombra, radio, letra, espacio, peso, duración ni curva: todo sale de
   rth-temas.css (tema.md §2, regla R-LIT). Única excepción: los cortes de @media de la lista de rth-temas.css.
   Comprobación: tests/tema-sin-literales.sh (0). Fichas de cada componente: tema.md §9.2. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block: calc(var(--rth-alto-barra) + var(--rth-esp-2)) calc(var(--rth-alto-nav) + var(--rth-esp-2)); }
body {
	margin: 0; background: var(--rth-fondo); color: var(--rth-texto);
	font-family: var(--rth-fuente); font-size: var(--rth-t-16); line-height: var(--rth-lh); font-weight: var(--rth-peso);
}
h1, h2, h3, p { margin: 0; }
a { color: var(--rth-accion-texto); }
button, input { font: inherit; color: inherit; }
.ico { inline-size: var(--rth-ico-24); block-size: var(--rth-ico-24); flex-shrink: 0; }
.ico--20 { inline-size: var(--rth-ico-20); block-size: var(--rth-ico-20); }
.ico--32 { inline-size: var(--rth-ico-32); block-size: var(--rth-ico-32); }
:focus-visible { outline: var(--rth-foco-ancho) solid var(--rth-foco); outline-offset: var(--rth-foco-sep); }
.sr { position: absolute; inline-size: var(--rth-sr); block-size: var(--rth-sr); overflow: hidden; clip-path: inset(var(--rth-sr-recorte)); white-space: nowrap; }
.rth-saltar { position: absolute; inset-inline-start: var(--rth-esp-2); top: var(--rth-saltar-oculto); z-index: var(--rth-z-saltar); background: var(--rth-superficie); padding: var(--rth-esp-3) var(--rth-esp-4); border-radius: var(--rth-radio-control); }
.rth-saltar:focus { top: var(--rth-esp-2); }

/* ---------- Barra azul de la casa (marca + ficha de «Tu cuenta») ---------- */
.rth-barra {
	position: sticky; top: 0; z-index: var(--rth-z-barra);
	display: flex; align-items: center; gap: var(--rth-esp-3);
	min-block-size: var(--rth-alto-barra); padding: 0 var(--rth-esp-2) 0 var(--rth-esp-4);
	background: var(--rth-barra-fondo); color: var(--rth-barra-texto);
	border-block-end: var(--rth-borde-ancho) solid var(--rth-barra-borde);
}
.rth-barra :focus-visible, .rth-lado :focus-visible, .rth-titular :focus-visible { outline-color: var(--rth-foco-barra); }
[data-foco-auto]:focus-visible { outline: none; } /* foco del título puesto por la app tras un toque, no por teclado */
.rth-marca { display: flex; align-items: center; gap: var(--rth-esp-2); min-block-size: var(--rth-tap); min-inline-size: 0; color: inherit; text-decoration: none; }
/* Nombre y firma en una caja de una sola línea: si «de RiosTec» no cabe junto al nombre, salta a la segunda línea, que
   queda recortada; así nunca se mete bajo la ficha de «Tu cuenta» y entre los dos queda siempre el hueco de la barra
   (esp-3 ≥ 8). */
.rth-marca__textos {
	display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--rth-esp-2); min-inline-size: 0;
	max-block-size: calc(var(--rth-t-marca) * var(--rth-lh-apretado)); overflow: hidden;
}
.rth-marca__nombre { font-size: var(--rth-t-marca); font-weight: var(--rth-peso-fuerte); line-height: var(--rth-lh-apretado); white-space: nowrap; }
.rth-marca__firma { font-size: var(--rth-t-13); color: var(--rth-barra-texto-2); white-space: nowrap; }
.rth-barra__fin { margin-inline-start: auto; display: flex; align-items: center; }

/* Ficha del integrante (avatar): esquinas redondas, inicial, nunca solo color */
.rth-iman {
	display: inline-grid; place-items: center; flex-shrink: 0;
	inline-size: var(--rth-iman); block-size: var(--rth-iman); border-radius: var(--rth-radio-iman);
	background: var(--rth-iman-1); color: var(--rth-sobre-iman);
	font-size: var(--rth-t-16); font-weight: var(--rth-peso-fuerte); line-height: var(--rth-lh-apretado);
}
.rth-iman[data-iman="2"] { background: var(--rth-iman-2); } .rth-iman[data-iman="3"] { background: var(--rth-iman-3); }
.rth-iman[data-iman="4"] { background: var(--rth-iman-4); } .rth-iman[data-iman="5"] { background: var(--rth-iman-5); }
.rth-iman[data-iman="6"] { background: var(--rth-iman-6); } .rth-iman[data-iman="7"] { background: var(--rth-iman-7); }
.rth-iman[data-iman="8"] { background: var(--rth-iman-8); }
.rth-iman-btn[aria-current="page"] .rth-iman { box-shadow: 0 0 0 var(--rth-foco-interior) var(--rth-barra-texto); }
.rth-iman-btn { display: inline-flex; align-items: center; justify-content: center; min-inline-size: var(--rth-tap); min-block-size: var(--rth-tap); border-radius: var(--rth-radio-control); text-decoration: none; }

/* ---------- Título de la vista: la barra azul continúa con el h1 (y el resumen en Hoy) ---------- */
.rth-titular {
	margin-inline: calc(-1 * var(--rth-esp-4));
	padding: var(--rth-esp-2) var(--rth-esp-4) var(--rth-esp-5);
	background: var(--rth-barra-fondo); color: var(--rth-barra-texto);
	border-block-end: var(--rth-borde-ancho) solid var(--rth-barra-borde);
	display: grid; gap: var(--rth-esp-1);
}
.rth-titular__resumen { color: var(--rth-barra-texto-2); font-variant-numeric: tabular-nums; }
/* 24 bajo la banda para lo primero que se VE: las franjas ocultas ([hidden]) entre la banda y el contenido no cuentan */
.rth-vista > .rth-titular + *, .rth-vista > .rth-titular + [hidden] + *, .rth-vista > .rth-titular + [hidden] + [hidden] + *,
.rth-vista > .rth-titular + [hidden] + [hidden] + [hidden] + *, .rth-vista > .rth-titular + [hidden] + [hidden] + [hidden] + [hidden] + * { margin-block-start: var(--rth-esp-5); }

/* ---------- Navegación: abajo al pulgar; barra lateral azul a ≥ 1024 ---------- */
.rth-nav {
	position: fixed; inset-inline: 0; bottom: 0; z-index: var(--rth-z-barra);
	background: var(--rth-superficie); border-block-start: var(--rth-borde-ancho) solid var(--rth-linea);
	padding-block-end: env(safe-area-inset-bottom);
}
.rth-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.rth-pestana {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--rth-esp-1);
	min-block-size: var(--rth-alto-nav); padding: var(--rth-esp-1);
	font-size: var(--rth-t-13); font-weight: var(--rth-peso-medio); line-height: var(--rth-lh-apretado);
	color: var(--rth-texto-2); text-decoration: none; text-align: center;
}
.rth-pestana:focus-visible { outline-offset: calc(-1 * var(--rth-foco-ancho)); } /* hacia dentro: abajo no hay sitio para la separación */
.rth-pestana__ico { display: grid; place-items: center; inline-size: var(--rth-pestana-indicador-ancho); block-size: var(--rth-pestana-indicador-alto); border-radius: var(--rth-radio-pastilla); }
.rth-pestana[aria-current="page"] { color: var(--rth-accion-texto); font-weight: var(--rth-peso-fuerte); }
.rth-pestana[aria-current="page"] .rth-pestana__ico { background: var(--rth-accion-fondo); }
.rth-lado { display: none; }
[data-shell="app"] .rth-main { padding-block-end: calc(var(--rth-alto-nav) + env(safe-area-inset-bottom) + var(--rth-esp-5)); }

/* ---------- Contenido ---------- */
.rth-main { padding: var(--rth-esp-5) var(--rth-esp-4) var(--rth-esp-7); }
[data-shell="app"] .rth-main, [data-shell="pagina"] .rth-main { padding-block-start: 0; }
.rth-vista { max-inline-size: var(--rth-ancho-app); margin-inline: auto; }
.rth-h1 { font-size: var(--rth-t-h1); line-height: var(--rth-lh-h1); font-weight: var(--rth-peso-fuerte); text-wrap: balance; overflow-wrap: anywhere; }
.rth-h2 { font-size: var(--rth-t-h2); line-height: var(--rth-lh-titulo); font-weight: var(--rth-peso-fuerte); margin-block: var(--rth-esp-6) var(--rth-esp-3); }
.rth-seccion { font-size: var(--rth-t-h2); line-height: var(--rth-lh-titulo); font-weight: var(--rth-peso-fuerte); margin-block: var(--rth-esp-5) var(--rth-esp-3); }
.rth-titular + .rth-seccion { margin-block-start: var(--rth-esp-5); }
.rth-lead { color: var(--rth-texto-2); max-inline-size: var(--rth-ancho-lectura-ch); margin-block-start: var(--rth-esp-2); }
.rth-meta { font-size: var(--rth-t-14); color: var(--rth-texto-2); }

/* ---------- Hoja de entrada (ACC-01: y fija = barra + 24) ---------- */
.rth-entrada { inline-size: min(100%, var(--rth-ancho-entrada)); margin: 0 auto var(--rth-esp-7); }
.rth-hoja { background: var(--rth-superficie); border: var(--rth-borde-ancho) solid var(--rth-linea); border-radius: var(--rth-radio-hoja); padding: var(--rth-esp-5) var(--rth-esp-4); }
.rth-hoja > * + * { margin-block-start: var(--rth-esp-4); }
.rth-hoja > [hidden]:first-child + *, .rth-hoja > [hidden]:first-child + [hidden] + * { margin-block-start: 0; } /* franjas ocultas al inicio no empujan */
.rth-hoja .rth-h1 { font-size: var(--rth-t-24); }
.rth-divisor { border: 0; border-block-start: var(--rth-borde-ancho) solid var(--rth-linea); }
.rth-hoja > .rth-divisor { margin-block-start: var(--rth-esp-5); }
.rth-ayuda-pie { font-size: var(--rth-t-14); color: var(--rth-texto-2); }
.rth-ayuda-pie a { overflow-wrap: anywhere; }
.rth-puntos { margin: 0; padding-inline-start: var(--rth-esp-5); display: grid; gap: var(--rth-esp-2); color: var(--rth-texto-2); }
.rth-puntos strong { color: var(--rth-texto); }
.rth-enlace-tap { display: inline-flex; align-items: center; min-block-size: var(--rth-tap-min); font-weight: var(--rth-peso-medio); }

/* Campo */
.rth-campo { display: grid; gap: var(--rth-esp-2); }
.rth-campo label { font-weight: var(--rth-peso-medio); }
.rth-input {
	inline-size: 100%; min-block-size: var(--rth-alto-campo); padding: 0 var(--rth-esp-4);
	border: var(--rth-borde-control-ancho) solid var(--rth-borde-control); border-radius: var(--rth-radio-control);
	background: var(--rth-superficie); font-size: var(--rth-t-18);
}
.rth-input:focus-visible { border-color: var(--rth-accion); }
.rth-input[aria-invalid="true"] { border-color: var(--rth-error); }
.rth-input[readonly] { background: var(--rth-superficie-2); border-color: var(--rth-linea); color: var(--rth-texto-2); }
.rth-campo__ayuda { font-size: var(--rth-t-14); color: var(--rth-texto-2); }
.rth-campo__error { display: flex; gap: var(--rth-esp-2); align-items: flex-start; font-size: var(--rth-t-14); font-weight: var(--rth-peso-medio); color: var(--rth-error); }
.rth-codigo {
	min-block-size: var(--rth-alto-codigo); font-size: var(--rth-t-24); font-weight: var(--rth-peso-fuerte); text-align: center;
	letter-spacing: var(--rth-tracking-codigo); text-indent: var(--rth-tracking-codigo); font-variant-numeric: tabular-nums;
}
.rth-correo { font-weight: var(--rth-peso-medio); overflow-wrap: anywhere; }

/* Botones */
.rth-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--rth-esp-2);
	inline-size: 100%; min-block-size: var(--rth-alto-boton); padding: var(--rth-esp-2) var(--rth-esp-5);
	border: var(--rth-borde-control-ancho) solid transparent; border-radius: var(--rth-radio-control);
	font-weight: var(--rth-peso-fuerte); text-decoration: none; text-align: center; cursor: pointer;
	transition: background-color var(--rth-mov-t1) var(--rth-ease), scale var(--rth-mov-t1) var(--rth-ease);
}
.rth-btn--primario { background: var(--rth-accion); color: var(--rth-sobre-accion); }
.rth-btn--primario:focus-visible { box-shadow: inset 0 0 0 var(--rth-foco-interior) var(--rth-foco-sobre-accion); }
.rth-btn--secundario { background: var(--rth-superficie); color: var(--rth-accion-texto); border-color: var(--rth-borde-control); }
.rth-btn--fantasma { background: transparent; color: var(--rth-accion-texto); min-block-size: var(--rth-tap); }
@media (hover: hover) {
	.rth-pestana:hover .rth-pestana__ico { background: var(--rth-superficie-2); }
	.rth-pestana[aria-current="page"]:hover .rth-pestana__ico { background: var(--rth-accion-fondo); }
	.rth-btn--primario:hover { background: var(--rth-accion-hover); }
	.rth-btn--secundario:hover, .rth-btn--fantasma:hover { background: var(--rth-superficie-2); }
	.rth-fila-btn:hover { background: var(--rth-superficie-2); }
}
.rth-btn[aria-disabled="true"] { background: var(--rth-superficie-2); color: var(--rth-texto-3); border-color: transparent; cursor: default; }
.rth-btn--fantasma[aria-disabled="true"] { background: transparent; }
.rth-btn--auto { inline-size: auto; }
.rth-btn:active:not([aria-disabled="true"]) { scale: var(--rth-presion); }
.rth-acciones { display: grid; gap: var(--rth-esp-2); }
.rth-espera { display: inline-block; min-inline-size: var(--rth-espera-ch); text-align: start; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Franja (ACC-06) y banda superior (ACC-09, sin conexión) */
.rth-franja { display: flex; gap: var(--rth-esp-3); align-items: flex-start; padding: var(--rth-esp-3) var(--rth-esp-4); border-radius: var(--rth-radio-control); border-inline-start: var(--rth-orilla-ancho) solid; color: var(--rth-texto); }
.rth-franja > div { flex: 1; min-inline-size: 0; }
.rth-franja .rth-btn { margin-block-start: var(--rth-esp-3); }
.rth-franja--info { background: var(--rth-info-fondo); border-color: var(--rth-info); }
.rth-franja--info .ico { color: var(--rth-info); }
.rth-franja--error { background: var(--rth-error-fondo); border-color: var(--rth-error); }
.rth-franja--error .ico { color: var(--rth-error); }
.rth-franja--espera { background: var(--rth-aviso-fondo); border-color: var(--rth-aviso); }
.rth-franja--espera .ico { color: var(--rth-aviso); }
.rth-vista > .rth-franja { margin-block-start: var(--rth-esp-5); }
.rth-banda { display: flex; flex-wrap: wrap; gap: var(--rth-esp-2) var(--rth-esp-4); align-items: center; padding: var(--rth-esp-3) var(--rth-esp-4); }
.rth-banda p { flex: 1 1 auto; display: flex; gap: var(--rth-esp-2); align-items: flex-start; }
.rth-banda .rth-btn { inline-size: auto; }
.rth-banda--error { background: var(--rth-error-fondo); border-block-end: var(--rth-borde-control-ancho) solid var(--rth-error); }
.rth-banda--sinred { background: var(--rth-superficie-2); border-block-end: var(--rth-borde-ancho) solid var(--rth-linea); font-size: var(--rth-t-14); color: var(--rth-texto-2); }

/* Lista agrupada, fila-botón y opción (Tu cuenta, Este teléfono) */
.rth-lista { list-style: none; margin: 0; padding: 0; border: var(--rth-borde-ancho) solid var(--rth-linea); border-radius: var(--rth-radio-hoja); background: var(--rth-superficie); overflow: hidden; }
.rth-lista > * + * { border-block-start: var(--rth-borde-ancho) solid var(--rth-linea); }
.rth-opcion.rth-lista > * + * { border-block-start: 0; } /* casilla suelta con borde de lista: su texto no es otra fila */
fieldset.rth-lista { padding: 0; margin: 0; min-inline-size: 0; }
.rth-fila { display: flex; align-items: center; gap: var(--rth-esp-3); min-block-size: var(--rth-alto-fila); padding: var(--rth-esp-2) var(--rth-esp-4); }
.rth-fila-btn { inline-size: 100%; background: none; border: 0; text-align: start; cursor: pointer; color: var(--rth-accion-texto); font-weight: var(--rth-peso-medio); text-decoration: none; }
.rth-fila-btn:focus-visible, .rth-opcion:has(input:focus-visible) { outline-offset: calc(-1 * var(--rth-foco-ancho)); }
.rth-fila__texto { flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
.rth-fila__2 { display: block; font-size: var(--rth-t-14); font-weight: var(--rth-peso); color: var(--rth-texto-2); }
.rth-opcion { display: flex; align-items: center; gap: var(--rth-esp-3); min-block-size: var(--rth-alto-fila); padding: var(--rth-esp-2) var(--rth-esp-4); cursor: pointer; }
.rth-opcion input { inline-size: var(--rth-radio-boton); block-size: var(--rth-radio-boton); margin: 0; accent-color: var(--rth-accion); }
.rth-vista > .rth-lista { margin-block-start: var(--rth-esp-4); }
.rth-vista > .rth-titular + .rth-lista { margin-block-start: var(--rth-esp-5); }

/* Diálogo */
.rth-dialogo { border: 0; padding: 0; border-radius: var(--rth-radio-hoja); background: var(--rth-superficie); color: var(--rth-texto); inline-size: min(100% - 2 * var(--rth-esp-4), var(--rth-ancho-dialogo)); box-shadow: var(--rth-sombra-capa); }
.rth-dialogo::backdrop { background: var(--rth-velo); }
.rth-dialogo__cuerpo { padding: var(--rth-esp-5) var(--rth-esp-4); display: grid; gap: var(--rth-esp-4); }
.rth-dialogo__cuerpo h2 { font-size: var(--rth-t-21); line-height: var(--rth-lh-titulo); }
.rth-dialogo--muestra { position: static; display: block; margin: var(--rth-esp-5) auto; }

/* Vacío y esqueleto (Hoy cargando: medidas de lo que sustituye) */
.rth-vacio { display: grid; gap: var(--rth-esp-3); justify-items: start; padding: var(--rth-esp-5) var(--rth-esp-4); background: var(--rth-superficie); border: var(--rth-borde-ancho) solid var(--rth-linea); border-radius: var(--rth-radio-hoja); }
.rth-vacio .rth-btn { inline-size: auto; }
.rth-vacio__t { font-size: var(--rth-t-18); font-weight: var(--rth-peso-fuerte); line-height: var(--rth-lh-titulo); }
.rth-esq { background: var(--rth-esqueleto); border-radius: var(--rth-radio-control); }
.rth-titular .rth-esq { background: var(--rth-barra-texto-2); opacity: var(--rth-esq-titular-opacidad); }
.rth-esq--h1 { block-size: var(--rth-esq-h1); inline-size: var(--rth-esq-h1-ancho); }
.rth-esq--resumen { block-size: var(--rth-esq-resumen); inline-size: var(--rth-esq-resumen-ancho); }
.rth-esq--seccion { block-size: var(--rth-esq-seccion); inline-size: var(--rth-esq-seccion-ancho); margin-block: var(--rth-esp-5) var(--rth-esp-3); }
.rth-esq--bloque-1 { block-size: var(--rth-esq-bloque-1); }
.rth-esq--bloque-2 { block-size: var(--rth-esq-bloque-2); }
.rth-esq--viajes { block-size: var(--rth-esq-viajes); border-radius: var(--rth-radio-hoja); }
.rth-espacio { margin-block-start: var(--rth-esp-5); }
.rth-arranque { min-block-size: var(--rth-alto-barra); }

/* Aviso de privacidad */
.rth-aviso { max-inline-size: var(--rth-ancho-lectura); margin-inline: auto; }
.rth-aviso p { max-inline-size: var(--rth-ancho-texto-ch); color: var(--rth-texto-2); }
.rth-borrador { display: inline-block; padding: var(--rth-esp-1) var(--rth-esp-3); border-radius: var(--rth-radio-control); background: var(--rth-aviso-fondo); color: var(--rth-texto); font-weight: var(--rth-peso-medio); margin-block-end: var(--rth-esp-4); }
.rth-pendiente { color: var(--rth-texto-3); }
.rth-indice { margin-block-start: var(--rth-esp-4); background: var(--rth-superficie); border: var(--rth-borde-ancho) solid var(--rth-linea); border-radius: var(--rth-radio-hoja); }
.rth-indice summary { display: flex; align-items: center; justify-content: space-between; gap: var(--rth-esp-2); min-block-size: var(--rth-tap); padding-inline: var(--rth-esp-4); font-weight: var(--rth-peso-medio); color: var(--rth-accion-texto); cursor: pointer; list-style: none; }
.rth-indice summary::-webkit-details-marker { display: none; }
.rth-indice[open] .rth-indice__abrir, .rth-indice:not([open]) .rth-indice__cerrar { display: none; }
.rth-indice ol { margin: 0; padding: 0 var(--rth-esp-4) var(--rth-esp-3) var(--rth-esp-7); }
.rth-indice a { display: inline-flex; align-items: center; min-block-size: var(--rth-tap-min); }
.rth-aviso .rth-volver { margin-block-start: var(--rth-esp-6); }

/* ========== Fase C: Casa y tareas (fichas en tema.md §9.3) ========== */
/* ---------- Regreso dentro de la banda azul (subpáginas de Casa) ---------- */
.rth-atras {
	justify-self: start; display: inline-flex; align-items: center; gap: var(--rth-esp-1);
	min-block-size: var(--rth-tap); margin-inline-start: calc(-1 * var(--rth-esp-2)); padding-inline: var(--rth-esp-2) var(--rth-esp-3);
	border-radius: var(--rth-radio-control); color: var(--rth-barra-texto); font-weight: var(--rth-peso-medio); text-decoration: none;
}
.rth-atras .ico { inline-size: var(--rth-ico-20); block-size: var(--rth-ico-20); }
.rth-titular__resumen .rth-atras { color: var(--rth-barra-texto); }

/* ---------- Encabezado de sección con su cuenta («6 de 10») ---------- */
.rth-encabezado { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--rth-esp-1) var(--rth-esp-3); margin-block: var(--rth-esp-6) var(--rth-esp-3); }
.rth-encabezado .rth-h2 { margin: 0; }
.rth-vista > .rth-titular + .rth-encabezado, .rth-vista > .rth-titular + [hidden] + .rth-encabezado, .rth-vista > .rth-titular + [hidden] + [hidden] + .rth-encabezado,
.rth-vista > .rth-titular + [hidden] + [hidden] + [hidden] + .rth-encabezado, .rth-vista > .rth-titular + [hidden] + [hidden] + [hidden] + [hidden] + .rth-encabezado,
.rth-vista > .rth-franja + .rth-encabezado { margin-block-start: var(--rth-esp-5); }
.rth-cuenta-sec { font-size: var(--rth-t-14); color: var(--rth-texto-2); font-variant-numeric: tabular-nums; }

/* ---------- Fila de dato: integrante o tarea; toda la fila lleva a su ficha ---------- */
.rth-fila-dato {
	display: flex; align-items: center; gap: var(--rth-esp-3); inline-size: 100%;
	min-block-size: var(--rth-alto-fila); padding: var(--rth-esp-2) var(--rth-esp-4);
	background: none; border: 0; color: var(--rth-texto); text-align: start; text-decoration: none; font: inherit; cursor: pointer;
}
.rth-fila-dato:focus-visible { outline-offset: calc(-1 * var(--rth-foco-ancho)); }
.rth-fila-dato .rth-fila__texto { font-weight: var(--rth-peso-medio); }
.rth-fila-dato__ir { inline-size: var(--rth-ico-20); block-size: var(--rth-ico-20); flex-shrink: 0; color: var(--rth-texto-2); }
div.rth-fila-dato { cursor: default; }
.rth-iman--fila { inline-size: var(--rth-iman-fila); block-size: var(--rth-iman-fila); }
.rth-caja-icono {
	display: inline-grid; place-items: center; flex-shrink: 0; inline-size: var(--rth-iman-fila); block-size: var(--rth-iman-fila);
	border-radius: var(--rth-radio-iman); background: var(--rth-superficie-2); color: var(--rth-texto);
}
.rth-fila-dato[data-archivado] .rth-iman { background: var(--rth-superficie-2); color: var(--rth-texto-2); }
/* Estado dentro de una fila: forma + palabra (UI-08); el color solo va en el ícono */
.rth-estado { display: flex; align-items: flex-start; gap: var(--rth-esp-1); margin-block-start: var(--rth-esp-1); font-size: var(--rth-t-14); font-weight: var(--rth-peso-medio); color: var(--rth-texto); }
.rth-estado .ico { inline-size: var(--rth-ico-20); block-size: var(--rth-ico-20); color: var(--rth-texto-2); }
.rth-estado--aviso .ico { color: var(--rth-aviso); }
.rth-estado--info .ico { color: var(--rth-info); }
@media (hover: hover) {
	a.rth-fila-dato:hover, button.rth-fila-dato:hover { background: var(--rth-superficie-2); }
	.rth-atras:hover { text-decoration: underline; }
	.rth-sino label:hover, .rth-dias label:hover, .rth-matriz__celda:hover, .rth-icono-op:hover { background: var(--rth-superficie-2); }
	.rth-sino label:has(input:checked):hover, .rth-dias label:has(input:checked):hover, .rth-icono-op:has(input:checked):hover { background: var(--rth-accion-fondo); }
}

/* ---------- Lista dentro de una franja («No entran al reparto», riesgos encontrados) ---------- */
.rth-franja__t { font-weight: var(--rth-peso-fuerte); }
.rth-franja__lista { list-style: none; margin: var(--rth-esp-3) 0 0; padding: 0; display: grid; }
.rth-franja__lista > li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--rth-esp-3); row-gap: var(--rth-esp-2); align-items: center; padding-block: var(--rth-esp-3); border-block-start: var(--rth-borde-ancho) solid var(--rth-linea); }
.rth-franja__lista > li > :nth-child(n + 3) { grid-column: 2; justify-self: start; }
.rth-franja__lista .rth-btn { margin: 0; }
.rth-franja__lista:first-child { margin-block-start: 0; } /* sin título encima: la primera fila no lleva raya ni hueco */
.rth-franja__lista:first-child > li:first-child { border-block-start: 0; padding-block-start: 0; }
.rth-franja__quien { overflow-wrap: anywhere; }
.rth-franja__quien strong { display: block; font-weight: var(--rth-peso-medio); }
.rth-franja__quien span { display: block; font-size: var(--rth-t-14); }
.rth-franja .rth-meta { color: var(--rth-texto); }

/* ---------- Grupo de formulario con título visible (fieldset) ---------- */
.rth-grupo { border: 0; margin: 0; padding: 0; min-inline-size: 0; display: grid; gap: var(--rth-esp-2); }
.rth-grupo__t { float: left; inline-size: 100%; padding: 0; margin-block-end: var(--rth-esp-2); font-weight: var(--rth-peso-medio); }
.rth-grupo__t + * { clear: both; }
.rth-form { display: grid; gap: var(--rth-esp-5); }
.rth-form .rth-hoja > * + * { margin-block-start: var(--rth-esp-5); }
.rth-opcion__mas { padding: 0 var(--rth-esp-4) var(--rth-esp-4) calc(var(--rth-esp-4) + var(--rth-radio-boton) + var(--rth-esp-3)); }
.rth-opcion input[type="checkbox"] { inline-size: var(--rth-radio-boton); block-size: var(--rth-radio-boton); margin: 0; flex-shrink: 0; accent-color: var(--rth-accion); }
.rth-opcion:has(input:focus-visible) { outline: var(--rth-foco-ancho) solid var(--rth-foco); }
.rth-opcion[data-no-apto] { cursor: default; color: var(--rth-texto-2); }

/* Campo: pie con ayuda y contador de caracteres; desplegable con su flecha visible */
.rth-campo__pie { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--rth-esp-3); font-size: var(--rth-t-14); color: var(--rth-texto-2); }
.rth-contador { margin-inline-start: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rth-elegir { display: grid; align-items: center; }
.rth-elegir > * { grid-area: 1 / 1; }
.rth-elegir select {
	appearance: none; inline-size: 100%; min-block-size: var(--rth-alto-campo);
	padding-inline: var(--rth-esp-4) calc(var(--rth-esp-4) + var(--rth-ico-24) + var(--rth-esp-2));
	border: var(--rth-borde-control-ancho) solid var(--rth-borde-control); border-radius: var(--rth-radio-control);
	background: var(--rth-superficie); color: var(--rth-texto); font: inherit; font-size: var(--rth-t-18);
}
.rth-elegir select:focus-visible { border-color: var(--rth-accion); }
.rth-elegir select[aria-invalid="true"] { border-color: var(--rth-error); }
.rth-elegir .ico { justify-self: end; margin-inline-end: var(--rth-esp-4); pointer-events: none; color: var(--rth-texto-2); }

/* ---------- Pregunta sí/no sin respuesta marcada (riesgos declarados, §2.3.5) ---------- */
.rth-preguntas { border: var(--rth-borde-ancho) solid var(--rth-linea); border-radius: var(--rth-radio-hoja); background: var(--rth-superficie); padding: 0 var(--rth-esp-4); }
.rth-pregunta { border: 0; margin: 0; padding: var(--rth-esp-4) 0; min-inline-size: 0; }
.rth-pregunta + .rth-pregunta { border-block-start: var(--rth-borde-ancho) solid var(--rth-linea); }
.rth-pregunta legend { float: left; inline-size: 100%; padding: 0; margin-block-end: var(--rth-esp-3); overflow-wrap: anywhere; }
.rth-pregunta legend span { display: block; font-size: var(--rth-t-14); color: var(--rth-texto-2); }
.rth-sino { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rth-esp-2); max-inline-size: var(--rth-ancho-entrada); }
.rth-sino label, .rth-dias label {
	display: flex; align-items: center; gap: var(--rth-esp-3); min-block-size: var(--rth-tap); padding-inline: var(--rth-esp-4);
	border: var(--rth-borde-control-ancho) solid var(--rth-borde-control); border-radius: var(--rth-radio-control);
	background: var(--rth-superficie); font-weight: var(--rth-peso-medio); cursor: pointer;
}
.rth-sino input, .rth-dias input { inline-size: var(--rth-radio-boton); block-size: var(--rth-radio-boton); margin: 0; flex-shrink: 0; accent-color: var(--rth-accion); }
.rth-sino label:has(input:checked), .rth-dias label:has(input:checked) { border-color: var(--rth-accion); background: var(--rth-accion-fondo); color: var(--rth-accion-texto); }
.rth-sino label:has(input:focus-visible), .rth-dias label:has(input:focus-visible), .rth-matriz__celda:has(input:focus-visible), .rth-icono-op:has(input:focus-visible) {
	outline: var(--rth-foco-ancho) solid var(--rth-foco); outline-offset: var(--rth-foco-sep);
}
.rth-pregunta[data-falta] .rth-sino label { border-color: var(--rth-error); }
.rth-pregunta .rth-campo__error { clear: both; margin-block-start: var(--rth-esp-2); }
.rth-guardar { display: grid; gap: var(--rth-esp-2); }
.rth-faltan { font-size: var(--rth-t-14); color: var(--rth-texto-2); font-variant-numeric: tabular-nums; }

/* Días de la semana (casillas): 4 + 3 en el teléfono, 7 en una línea desde 640 */
.rth-dias { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--rth-esp-2); }
.rth-dias label { justify-content: center; padding-inline: var(--rth-esp-2); gap: var(--rth-esp-2); }

/* ---------- Disponibilidad: 7 días × 3 niveles ---------- */
.rth-matriz { border: var(--rth-borde-ancho) solid var(--rth-linea); border-radius: var(--rth-radio-hoja); background: var(--rth-superficie); overflow: hidden; }
.rth-matriz__cab, .rth-matriz__fila { display: grid; grid-template-columns: var(--rth-ancho-dia-ch) repeat(3, minmax(0, 1fr)); align-items: stretch; padding-inline: var(--rth-esp-4) var(--rth-esp-2); }
.rth-matriz__cab { padding-block: var(--rth-esp-2); font-size: var(--rth-t-13); font-weight: var(--rth-peso-medio); line-height: var(--rth-lh-apretado); color: var(--rth-texto-2); text-align: center; }
.rth-matriz__fila { border-block-start: var(--rth-borde-ancho) solid var(--rth-linea); }
.rth-matriz__dia { align-self: center; font-weight: var(--rth-peso-medio); overflow-wrap: anywhere; }
.rth-matriz__celda { display: grid; place-items: center; min-block-size: var(--rth-alto-fila); border-radius: var(--rth-radio-control); cursor: pointer; }
.rth-matriz__celda input { inline-size: var(--rth-radio-boton); block-size: var(--rth-radio-boton); margin: 0; accent-color: var(--rth-accion); }

/* ---------- Selector de ícono (diálogo) ---------- */
.rth-iconos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--rth-esp-2); }
.rth-icono-op {
	display: grid; justify-items: center; align-content: center; gap: var(--rth-esp-1);
	min-block-size: calc(var(--rth-tap) + var(--rth-esp-5)); padding: var(--rth-esp-2) var(--rth-esp-1);
	border: var(--rth-borde-control-ancho) solid var(--rth-borde-control); border-radius: var(--rth-radio-control);
	font-size: var(--rth-t-13); line-height: var(--rth-lh-apretado); text-align: center; overflow-wrap: anywhere; hyphens: auto; cursor: pointer;
}
.rth-icono-op:has(input:checked) { border-color: var(--rth-accion); background: var(--rth-accion-fondo); color: var(--rth-accion-texto); }
.rth-icono-op .ico { inline-size: var(--rth-ico-32); block-size: var(--rth-ico-32); }

/* ---------- Diálogo con lista larga (tarea parecida, ícono): cabecera fija y cuerpo con desplazamiento ---------- */
.rth-dialogo--lista { max-block-size: calc(var(--rth-alto-pantalla-d) - 2 * var(--rth-esp-4)); }
.rth-dialogo--lista[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.rth-dialogo__cab { display: flex; align-items: center; gap: var(--rth-esp-2); padding: var(--rth-esp-2) var(--rth-esp-2) var(--rth-esp-2) var(--rth-esp-4); border-block-end: var(--rth-borde-ancho) solid var(--rth-linea); }
.rth-dialogo__cab h2 { flex: 1; min-inline-size: 0; font-size: var(--rth-t-21); line-height: var(--rth-lh-titulo); }
.rth-dialogo__desliza { overflow: auto; padding: var(--rth-esp-4); display: grid; gap: var(--rth-esp-4); align-content: start; }
.rth-dialogo__pie { padding: var(--rth-esp-3) var(--rth-esp-4); border-block-start: var(--rth-borde-ancho) solid var(--rth-linea); }
.rth-cerrar { display: inline-grid; place-items: center; inline-size: var(--rth-tap); block-size: var(--rth-tap); border: 0; border-radius: var(--rth-radio-control); background: none; color: var(--rth-texto); cursor: pointer; }

/* ---------- Barra de acción pegada al pie (elegir varias del catálogo) ---------- */
.rth-barra-accion {
	/* fija sobre la navegación aunque el contenido sea corto (con sticky se quedaba a media pantalla); el main reserva su alto */
	position: fixed; inset-inline: 0; bottom: calc(var(--rth-alto-nav) + env(safe-area-inset-bottom)); z-index: var(--rth-z-barra);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--rth-esp-2) var(--rth-esp-3);
	margin: 0; padding: var(--rth-esp-3) var(--rth-esp-4);
	background: var(--rth-superficie); border-block-start: var(--rth-borde-ancho) solid var(--rth-linea);
}
.rth-barra-accion .rth-btn { inline-size: auto; }
[data-shell="app"] .rth-main:has(.rth-barra-accion) { padding-block-end: calc(var(--rth-alto-nav) + env(safe-area-inset-bottom) + var(--rth-alto-boton) + 2 * var(--rth-esp-3) + var(--rth-esp-5)); }
.rth-barra-accion .rth-meta { font-variant-numeric: tabular-nums; }
html:has(.rth-barra-accion:not([hidden])) { scroll-padding-block-end: calc(var(--rth-alto-nav) + var(--rth-alto-boton) + var(--rth-esp-5) + var(--rth-esp-2)); }

/* Fila del catálogo: toda la fila es la casilla «Agregar» */
.rth-opcion--tarea { align-items: center; }
.rth-opcion--tarea .rth-fila__texto { font-weight: var(--rth-peso-medio); }
.rth-opcion--tarea input { order: 3; }
.rth-ya { order: 3; display: inline-flex; align-items: center; gap: var(--rth-esp-1); font-size: var(--rth-t-14); color: var(--rth-texto-2); white-space: nowrap; }
.rth-ya .ico { inline-size: var(--rth-ico-20); block-size: var(--rth-ico-20); color: var(--rth-ok); }
.rth-buscar { display: grid; gap: var(--rth-esp-3); }

/* Acción destructiva al pie de una ficha (archivar, borrar): fantasma, nunca roja; confirma con diálogo */
.rth-al-pie { margin-block-start: var(--rth-esp-7); display: grid; gap: var(--rth-esp-2); justify-items: start; }
.rth-al-pie .rth-btn { inline-size: auto; }
.rth-al-pie .rth-btn--fantasma { padding-inline: var(--rth-esp-2); margin-inline-start: calc(-1 * var(--rth-esp-2)); } /* el texto alinea con su apoyo */

@media (min-width: 640px) {
	.rth-dias { grid-template-columns: repeat(7, minmax(0, 1fr)); }
	.rth-iconos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.rth-barra-accion { padding-inline: var(--rth-esp-5); }
}
@media (min-width: 1024px) {
	[data-shell="app"] .rth-main:has(.rth-barra-accion) { padding-block-end: var(--rth-esp-7); }
	[data-shell="app"] .rth-barra-accion { position: sticky; bottom: 0; margin: var(--rth-esp-5) 0 0; border-inline: var(--rth-borde-ancho) solid var(--rth-linea); border-start-start-radius: var(--rth-radio-hoja); border-start-end-radius: var(--rth-radio-hoja); }
	html:has(.rth-barra-accion:not([hidden])) { scroll-padding-block-end: calc(var(--rth-alto-boton) + var(--rth-esp-5) + var(--rth-esp-2)); }
}

/* ---------- Lo elegido (ícono, tarea parecida): caja + texto arriba, botón «Cambiar» debajo, nunca apretado ---------- */
.rth-elegida { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--rth-esp-3); row-gap: var(--rth-esp-3); align-items: center; padding: var(--rth-esp-3) var(--rth-esp-4); border: var(--rth-borde-ancho) solid var(--rth-linea); border-radius: var(--rth-radio-hoja); background: var(--rth-superficie); }
.rth-elegida > .rth-btn { grid-column: 2; justify-self: start; inline-size: auto; }
.rth-elegida .rth-fila__texto { font-weight: var(--rth-peso-medio); }
.rth-hoja > .rth-seccion:first-child, .rth-form > .rth-seccion:first-child { margin-block-start: 0; }

/* Fila de la franja que se arregla con un toque: toda la fila lleva a donde se completa el dato */
.rth-franja__lista > li.rth-franja__li { display: block; padding-block: var(--rth-esp-1); }
.rth-franja__fila {
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--rth-esp-3); align-items: center;
	min-block-size: var(--rth-alto-fila); margin-inline: calc(-1 * var(--rth-esp-2)); padding: var(--rth-esp-2);
	border-radius: var(--rth-radio-control); color: var(--rth-texto); text-decoration: none;
}
.rth-franja__fila:focus-visible { outline-offset: 0; }
.rth-franja__accion { display: block; margin-block-start: var(--rth-esp-1); color: var(--rth-accion-texto); font-weight: var(--rth-peso-medio); }
.rth-franja__fila .rth-fila-dato__ir { color: var(--rth-accion-texto); }
/* El regreso va en su propia caja: a ≥ 1024 la caja toma el ancho de la columna y el enlace conserva su ancho */
.rth-titular__atras { display: flex; }
/* Acción dentro de una fila de dato sin enlace (archivados: «Volver a la casa») */
.rth-fila__texto > .rth-btn { margin-block-start: var(--rth-esp-2); }

/* ---------- Escalas ---------- */
@media (min-width: 640px) {
	.rth-hoja { padding: var(--rth-esp-6); }
	.rth-main { padding-inline: var(--rth-esp-5); }
	.rth-titular { margin-inline: calc(-1 * var(--rth-esp-5)); padding-inline: var(--rth-esp-5); }
}
@media (max-height: 600px) {
	body:not([data-shell="app"]) .rth-main { padding-block-start: var(--rth-esp-2); }
	.rth-entrada .rth-lead { display: none; }
}
@media (min-width: 1024px) {
	[data-shell="app"] { display: grid; grid-template-columns: var(--rth-sidebar) minmax(0, 1fr); }
	[data-shell="app"] > * { grid-column: 2; }
	[data-shell="app"] .rth-barra { display: none; }
	[data-shell="app"] .rth-nav {
		grid-column: 1; grid-row: 1 / span 4; position: sticky; top: 0; block-size: var(--rth-alto-pantalla); block-size: var(--rth-alto-pantalla-d);
		display: flex; flex-direction: column; padding: var(--rth-esp-5) var(--rth-esp-3);
		background: var(--rth-barra-fondo); color: var(--rth-barra-texto);
		border-block-start: 0; border-inline-end: var(--rth-borde-ancho) solid var(--rth-barra-borde);
	}
	[data-shell="app"] .rth-nav :focus-visible { outline-color: var(--rth-foco-barra); }
	[data-shell="app"] .rth-lado { display: block; }
	[data-shell="app"] .rth-lado--marca { padding: 0 var(--rth-esp-2) var(--rth-esp-5); }
	[data-shell="app"] .rth-lado--marca .rth-marca { flex-wrap: wrap; row-gap: 0; }
	[data-shell="app"] .rth-lado--marca .rth-marca__textos { max-block-size: none; row-gap: 0; }
	[data-shell="app"] .rth-lado__casa { display: block; font-size: var(--rth-t-14); font-weight: var(--rth-peso-medio); color: var(--rth-barra-texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	[data-shell="app"] .rth-nav ul { grid-auto-flow: row; gap: var(--rth-esp-1); }
	[data-shell="app"] .rth-pestana { flex-direction: row; justify-content: flex-start; gap: var(--rth-esp-2); min-block-size: var(--rth-tap); padding-inline: var(--rth-esp-1); font-size: var(--rth-t-16); color: var(--rth-barra-texto-2); border-radius: var(--rth-radio-control); }
	[data-shell="app"] .rth-pestana__ico { inline-size: var(--rth-tap-min); block-size: var(--rth-pestana-indicador-alto); }
	[data-shell="app"] .rth-pestana[aria-current="page"] { background: var(--rth-superficie); color: var(--rth-accion-texto); }
	[data-shell="app"] .rth-pestana[aria-current="page"] .rth-pestana__ico { background: transparent; }
	[data-shell="app"] .rth-pestana:hover:not([aria-current]) { color: var(--rth-barra-texto); }
	[data-shell="app"] .rth-pestana:hover .rth-pestana__ico { background: transparent; }
	[data-shell="app"] .rth-lado--pie { margin-block-start: auto; }
	[data-shell="app"] .rth-lado--pie .rth-fila-btn { color: var(--rth-barra-texto); border-radius: var(--rth-radio-control); }
	[data-shell="app"] .rth-lado--pie .rth-fila-btn:hover { background: transparent; text-decoration: underline; }
	[data-shell="app"] .rth-lado--pie .rth-fila__2 { color: var(--rth-barra-texto-2); }
	[data-shell="app"] .rth-lado--pie [aria-current="page"] { background: var(--rth-superficie); color: var(--rth-accion-texto); text-decoration: none; }
	[data-shell="app"] .rth-lado--pie [aria-current="page"] .rth-fila__2 { color: var(--rth-texto-2); }
	[data-shell="app"] .rth-main { padding-inline: var(--rth-esp-6); padding-block-end: var(--rth-esp-7); }
	[data-shell="app"] .rth-main { container-type: inline-size; }
	/* la banda del título ocupa toda la columna, aunque la vista mida 720 */
	[data-shell="app"] .rth-titular { margin-inline: calc((100% - 100cqi) / 2 - var(--rth-esp-6)); padding: var(--rth-esp-6) calc((100cqi - 100%) / 2 + var(--rth-esp-6)) var(--rth-esp-5); }
	[data-shell="app"] .rth-titular > * { inline-size: 100%; max-inline-size: var(--rth-ancho-app); margin-inline: auto; }
}

/* Movimiento: solo con preferencia; con «reduce» todo aparece en su estado final */
@media (prefers-reduced-motion: no-preference) {
	.rth-esq { animation: rth-pulso var(--rth-mov-pulso) var(--rth-ease) infinite alternate; /* indicador de progreso (MOV-10) */ }
	.rth-paso-entra { animation: rth-entra var(--rth-mov-t3) var(--rth-ease-entra) both; }
	@keyframes rth-pulso { to { opacity: var(--rth-pulso-min); } }
	@keyframes rth-entra { from { opacity: 0; translate: 0 var(--rth-entra-desde); } }
}
@media (prefers-reduced-motion: reduce) {
	.rth-btn { transition: none; }
}
