/* ==========================================================================
   Articulo especial "mis nominas reales" (inc/nominas.php + assets/js/nominas.js)
   Solo se carga en las entradas con shortcodes [rem_nomina_*].
   Las animaciones solo se activan si hay JS (clase .rem-js en <html>) y el
   usuario no ha pedido reducir el movimiento.
   ========================================================================== */

.rem-especial,
.rem-destacado {
	--rem-naranja: #e8600a;
	--rem-naranja-osc: #c24e05;
	--rem-negro: #1a1a1a;
	--rem-crema: #fdf3ea;
	--rem-crema-osc: #f8e1cc;
	--rem-borde: #f0d9c6;
	--rem-verde: #16a34a;
	--rem-verde-claro: #4ade80;
}

/* --------------------------------------------------------------------------
   Titulos H2: numero de seccion y subrayado naranja que se dibuja al llegar
   -------------------------------------------------------------------------- */
.rem-especial .entry-content {
	counter-reset: remsec;
}

.rem-especial .entry-content > h2.wp-block-heading[id] {
	counter-increment: remsec;
	position: relative;
	margin-top: 3.2rem;
	padding-bottom: 0.55rem;
	scroll-margin-top: 1.5rem;
}

.rem-especial .entry-content > h2.wp-block-heading[id]::before {
	content: counter(remsec, decimal-leading-zero);
	display: block;
	margin-bottom: 0.15rem;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	color: var(--rem-naranja);
}

.rem-especial .entry-content > h2.wp-block-heading[id]::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 72px;
	height: 4px;
	border-radius: 4px;
	background: var(--rem-naranja);
	transform-origin: left;
}

.rem-js .rem-especial .entry-content > h2.wp-block-heading[id]::after {
	transform: scaleX(0);
	transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s;
}

.rem-js .rem-especial .entry-content > h2.wp-block-heading[id].is-in::after {
	transform: scaleX(1);
}

/* Componentes: entran desde abajo al llegar a ellos */
.rem-js .rem-anim {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rem-js .rem-anim.is-in {
	opacity: 1;
	transform: none;
}

/* --------------------------------------------------------------------------
   Pestanas de mes (sincronizadas en toda la pagina)
   -------------------------------------------------------------------------- */
.rem-mes-tabs {
	display: none;
	gap: 0.3rem;
	padding: 0.25rem;
	background: #f5f5f4;
	border-radius: 999px;
}

.rem-js .rem-mes-tabs {
	display: inline-flex;
}

.rem-mes-tabs button {
	padding: 0.35rem 0.95rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #57534e;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.rem-mes-tabs button:hover,
.rem-mes-tabs button:focus-visible {
	color: var(--rem-naranja-osc);
}

.rem-mes-tabs button[aria-pressed="true"] {
	background: var(--rem-naranja);
	color: #fff;
	box-shadow: 0 2px 8px rgba(232, 96, 10, 0.35);
}

.rem-mes-panel[hidden] {
	display: none !important;
}

.rem-js .rem-mes-panel.is-cambio {
	animation: rem-cambio 0.45s ease;
}

@keyframes rem-cambio {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

/* Cabecera comun de los componentes claros */
.rem-flujo__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem 1rem;
	margin-bottom: 1rem;
}

.rem-flujo__title {
	margin: 0 !important;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 1.45rem;
	font-weight: 800;
	line-height: 1.2;
	color: var(--rem-negro);
}

.rem-flujo__title span {
	font-size: 0.95rem;
	font-weight: 600;
	color: #78716c;
}

/* --------------------------------------------------------------------------
   1. Portada: lo que dice la app frente a lo que cobre
   -------------------------------------------------------------------------- */
.rem-portada {
	position: relative;
	overflow: hidden;
	margin: 0 0 2rem;
	padding: 1.4rem 1.5rem 0;
	background: #1a1a1a;
	border-radius: 18px;
	color: #f5f5f4;
	box-shadow: 0 14px 34px rgba(26, 26, 26, 0.22);
}

.rem-portada::before {
	content: "";
	position: absolute;
	top: -90px;
	right: -90px;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(232, 96, 10, 0.32), rgba(232, 96, 10, 0) 70%);
	pointer-events: none;
}

.rem-portada__top {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem 1rem;
	margin-bottom: 1.1rem;
}

.rem-portada .rem-portada__eyebrow {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fdba74;
}

.rem-portada .rem-mes-tabs {
	background: #2b2724;
}

.rem-portada .rem-mes-tabs button {
	color: #d6d3d1;
}

.rem-portada__cifras {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: 1rem;
	align-items: end;
}

.rem-portada__label {
	display: block;
	margin-bottom: 0.2rem;
	font-size: 0.82rem;
	color: #a8a29e;
}

.rem-portada__tachado {
	position: relative;
	display: inline-block;
	font-family: "Barlow Condensed", sans-serif;
	font-size: clamp(1.7rem, 4.5vw, 2.3rem);
	font-weight: 800;
	line-height: 1.1;
	color: #a8a29e;
}

.rem-portada__tachado::after {
	content: "";
	position: absolute;
	left: -4%;
	top: 52%;
	width: 108%;
	height: 4px;
	border-radius: 4px;
	background: var(--rem-naranja);
	transform: rotate(-6deg);
	transform-origin: left;
}

.rem-js .rem-portada__tachado::after {
	transform: rotate(-6deg) scaleX(0);
	transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s;
}

.rem-js .is-play .rem-portada__tachado::after {
	transform: rotate(-6deg) scaleX(1);
}

.rem-portada__real {
	text-align: right;
}

.rem-portada__big {
	display: block;
	font-family: "Barlow Condensed", sans-serif;
	font-size: clamp(2.6rem, 9vw, 3.9rem);
	font-weight: 800;
	line-height: 1;
	color: var(--rem-verde-claro);
	text-shadow: 0 0 28px rgba(74, 222, 128, 0.25);
	font-variant-numeric: tabular-nums;
}

.rem-portada__chips {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.5rem;
	margin: 1.2rem 0 0.6rem !important;
	padding: 0 !important;
	list-style: none;
}

.rem-portada__chips li {
	margin: 0;
	padding: 0.55rem 0.7rem;
	background: #26211d;
	border: 1px solid #3a3735;
	border-radius: 12px;
}

.rem-portada__chips li > span {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #a8a29e;
}

.rem-portada__chips strong {
	font-size: 1.05rem;
	color: #fff;
	font-variant-numeric: tabular-nums;
}

.rem-portada .rem-portada__periodo {
	margin: 0;
	font-size: 0.76rem;
	color: #78716c;
}

/* Carretera con la moto: las rayas se mueven, la moto bota un poco */
.rem-portada__carretera {
	position: relative;
	height: 74px;
	margin: 0.6rem -1.5rem 0;
}

.rem-portada__carretera::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 46px;
	bottom: 0;
	background: #2b2724;
}

.rem-portada__carretera::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 58px;
	height: 4px;
	background: repeating-linear-gradient(90deg, #e8600a 0 26px, transparent 26px 52px);
	background-size: 52px 4px;
}

.rem-portada__carretera img {
	position: absolute;
	z-index: 1;
	left: 18%;
	bottom: 14px;
	width: 92px;
	height: auto;
}

.rem-js .rem-portada__carretera::after {
	animation: rem-rayas 0.9s linear infinite;
	animation-play-state: paused;
}

.rem-js .rem-portada__carretera img {
	animation: rem-botar 0.5s ease-in-out infinite alternate, rem-llegar 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
	animation-play-state: paused;
}

/* Solo se mueve mientras esta en pantalla (la clase la pone nominas.js) */
.rem-js .rem-portada__carretera.is-visible::after,
.rem-js .rem-portada__carretera.is-visible img {
	animation-play-state: running;
}

@keyframes rem-rayas {
	to { background-position: 52px 0; }
}

@keyframes rem-botar {
	to { transform: translateY(-2px) rotate(-0.6deg); }
}

@keyframes rem-llegar {
	from { left: 110%; }
}

@media (max-width: 600px) {
	.rem-portada {
		padding: 1.1rem 1rem 0;
	}

	.rem-portada__cifras {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}

	.rem-portada__real {
		text-align: left;
	}

	.rem-portada__chips {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rem-portada__carretera {
		margin: 0.6rem -1rem 0;
	}

	.rem-portada__carretera img {
		width: 76px;
	}
}

/* --------------------------------------------------------------------------
   1b. Destacado de la portada (enlaza al articulo)
   -------------------------------------------------------------------------- */
.rem-destacado {
	position: relative;
	overflow: hidden;
	max-width: 1040px !important;
	margin: 2.25rem auto 0.5rem;
	padding: 1.8rem 2rem 0;
	background: #1a1a1a;
	border-radius: 20px;
	color: #f5f5f4;
	box-shadow: 0 16px 36px rgba(26, 26, 26, 0.22);
}

.rem-destacado::before {
	content: "";
	position: absolute;
	top: -110px;
	left: -80px;
	width: 300px;
	height: 300px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(232, 96, 10, 0.3), rgba(232, 96, 10, 0) 70%);
	pointer-events: none;
}

.rem-destacado__cols {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 1.5rem 2.5rem;
	align-items: center;
}

.rem-destacado .rem-destacado__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.7rem;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fdba74;
}

.rem-destacado__eyebrow span {
	padding: 0.2rem 0.6rem;
	background: var(--rem-naranja, #e8600a);
	border-radius: 999px;
	color: #fff;
	letter-spacing: 0.08em;
}

.rem-js .rem-destacado__eyebrow span {
	animation: rem-latido 2.4s ease-in-out infinite;
}

@keyframes rem-latido {
	0%, 100% { box-shadow: 0 0 0 0 rgba(232, 96, 10, 0.55); }
	50% { box-shadow: 0 0 0 7px rgba(232, 96, 10, 0); }
}

.rem-destacado .rem-destacado__title {
	margin: 0 0 0.7rem;
	font-family: "Barlow Condensed", sans-serif;
	font-size: clamp(1.7rem, 3.4vw, 2.35rem);
	font-weight: 800;
	line-height: 1.12;
	color: #fff;
}

.rem-destacado__title a {
	color: inherit;
	text-decoration: none;
}

.rem-destacado__title a:hover,
.rem-destacado__title a:focus-visible {
	color: #fdba74;
}

.rem-destacado .rem-destacado__lead {
	margin: 0 0 1.2rem;
	color: #d6d3d1;
	font-size: 1rem;
	line-height: 1.55;
}

.rem-destacado .rem-destacado__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.7rem 1.3rem;
	background: #e8600a;
	border-radius: 10px;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}

.rem-destacado .rem-destacado__btn:hover,
.rem-destacado .rem-destacado__btn:focus-visible {
	background: #c24e05;
	color: #fff;
	transform: translateY(-2px);
}

.rem-destacado__btn span {
	transition: transform 0.2s ease;
}

.rem-destacado__btn:hover span {
	transform: translateX(4px);
}

.rem-destacado__cifras {
	padding: 1.1rem 1.2rem;
	background: #26211d;
	border: 1px solid #3a3735;
	border-radius: 16px;
}

.rem-destacado .rem-destacado__mes {
	margin: 0 0 0.6rem;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #a8a29e;
}

.rem-destacado__fila + .rem-destacado__fila {
	margin-top: 0.7rem;
}

.rem-destacado .rem-portada__big {
	font-size: clamp(2.3rem, 6vw, 3.1rem);
}

.rem-destacado .rem-destacado__nota {
	margin: 0.8rem 0 0;
	font-size: 0.82rem;
	color: #a8a29e;
}

.rem-destacado .rem-portada__carretera {
	margin: 1.4rem -2rem 0;
}

@media (max-width: 781px) {
	.rem-destacado {
		padding: 1.3rem 1.1rem 0;
	}

	.rem-destacado__cols {
		grid-template-columns: 1fr;
	}

	.rem-destacado .rem-portada__carretera {
		margin: 1.2rem -1.1rem 0;
	}
}

/* --------------------------------------------------------------------------
   2. Indice
   -------------------------------------------------------------------------- */
.rem-indice {
	margin: 1.5rem 0 2rem;
	padding: 1rem 1.1rem;
	background: var(--rem-crema);
	border: 1px solid var(--rem-borde);
	border-radius: 14px;
}

.rem-indice:not(.is-lleno) {
	display: none;
}

.rem-indice .rem-indice__title {
	margin: 0 0 0.6rem;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rem-naranja-osc);
}

.rem-indice ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.rem-indice li {
	margin: 0;
}

.rem-indice a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.75rem 0.35rem 0.4rem;
	background: #fff;
	border: 1px solid var(--rem-borde);
	border-radius: 999px;
	color: var(--rem-negro);
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rem-indice a b {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: var(--rem-negro);
	color: #fff;
	font-size: 0.72rem;
}

.rem-indice a:hover,
.rem-indice a:focus-visible,
.rem-indice a.is-actual {
	transform: translateY(-1px);
	border-color: var(--rem-naranja);
	color: var(--rem-naranja-osc);
}

.rem-indice a.is-actual b {
	background: var(--rem-naranja);
}

/* --------------------------------------------------------------------------
   3. Tabla comparativa
   -------------------------------------------------------------------------- */
.rem-tabla-wrap {
	margin: 1.5rem 0;
	overflow-x: auto;
	border: 1px solid #e7e5e4;
	border-radius: 14px;
}

.rem-tabla {
	width: 100%;
	margin: 0 !important;
	border-collapse: collapse;
	font-size: 0.95rem;
	font-variant-numeric: tabular-nums;
}

.rem-tabla th,
.rem-tabla td {
	padding: 0.6rem 0.9rem;
	border: 0;
	border-bottom: 1px solid #f0eeec;
	text-align: right;
	white-space: nowrap;
}

.rem-tabla th[scope="row"] {
	text-align: left;
	font-weight: 500;
	white-space: normal;
}

.rem-tabla thead th {
	background: var(--rem-negro);
	color: #fff;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.rem-tabla thead th:first-child {
	text-align: left;
}

.rem-tabla tbody tr:nth-child(even) {
	background: #fafaf9;
}

.rem-tabla tr.is-total th,
.rem-tabla tr.is-total td {
	border-top: 2px solid var(--rem-negro);
	font-weight: 800;
}

.rem-tabla tr.is-resta td {
	color: #b91c1c;
}

.rem-tabla tr.is-cobrado th,
.rem-tabla tr.is-cobrado td {
	background: #ecfdf3;
	color: #15803d;
	font-weight: 800;
	font-size: 1.05rem;
}

.rem-tabla tr.is-app th,
.rem-tabla tr.is-app td {
	color: #78716c;
	font-size: 0.88rem;
	border-bottom: 0;
}

/* --------------------------------------------------------------------------
   4. Barras apiladas (flujo y desglose)
   -------------------------------------------------------------------------- */
.rem-flujo,
.rem-desglose,
.rem-retos,
.rem-movil,
.rem-hora {
	margin: 1.75rem 0;
	padding: 1.3rem 1.3rem 1.2rem;
	background: #fff;
	border: 1px solid #e7e5e4;
	border-radius: 18px;
	box-shadow: 0 6px 22px rgba(26, 26, 26, 0.06);
}

.rem-barra {
	display: flex;
	height: 34px;
	overflow: hidden;
	background: #f5f5f4;
	border-radius: 10px;
}

.rem-barra.is-alta {
	height: 42px;
}

.rem-barra__seg {
	flex: 0 0 var(--v);
	background: var(--c);
	box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.85);
}

.rem-js .rem-barra__seg {
	flex-basis: 0;
	transition: flex-basis 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rem-js .rem-mes-panel.is-play .rem-barra__seg {
	flex-basis: var(--v);
}

.rem-js .rem-barra__seg:nth-child(2) { transition-delay: 0.12s; }
.rem-js .rem-barra__seg:nth-child(3) { transition-delay: 0.24s; }
.rem-js .rem-barra__seg:nth-child(4) { transition-delay: 0.36s; }
.rem-js .rem-barra__seg:nth-child(5) { transition-delay: 0.48s; }
.rem-js .rem-barra__seg:nth-child(6) { transition-delay: 0.6s; }
.rem-js .rem-barra__seg:nth-child(7) { transition-delay: 0.72s; }
.rem-js .rem-barra__seg:nth-child(8) { transition-delay: 0.84s; }

/* Flujo: del bruto al bolsillo */
.rem-flujo .rem-flujo__bruto {
	margin: 0 0 0.5rem;
	font-size: 0.92rem;
	color: #57534e;
}

.rem-flujo__pasos {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.65rem;
	margin: 1rem 0 0 !important;
	padding: 0 !important;
	list-style: none;
}

.rem-flujo__paso {
	position: relative;
	margin: 0;
	padding: 0.8rem 0.85rem 0.85rem;
	background: #fafaf9;
	border: 1px solid #ece9e6;
	border-top: 4px solid var(--c);
	border-radius: 12px;
}

.rem-js .rem-flujo__paso {
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.45s ease, transform 0.45s ease;
}

.rem-js .is-play .rem-flujo__paso {
	opacity: 1;
	transform: none;
}

.rem-js .is-play .rem-flujo__paso:nth-child(2) { transition-delay: 0.35s; }
.rem-js .is-play .rem-flujo__paso:nth-child(3) { transition-delay: 0.7s; }
.rem-js .is-play .rem-flujo__paso:nth-child(4) { transition-delay: 1.05s; }

.rem-flujo__nombre {
	display: block;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #57534e;
}

.rem-flujo__cifra {
	display: block;
	margin: 0.15rem 0 0.35rem;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 1.55rem;
	line-height: 1.1;
	color: var(--c);
	font-variant-numeric: tabular-nums;
}

.rem-flujo__paso.is-ret .rem-flujo__cifra {
	color: #57534e;
}

.rem-flujo__paso.is-efectivo .rem-flujo__cifra,
.rem-flujo__paso.is-antic .rem-flujo__cifra {
	color: var(--rem-naranja-osc);
}

.rem-flujo__texto {
	display: block;
	font-size: 0.84rem;
	line-height: 1.45;
	color: #44403c;
}

.rem-flujo .rem-flujo__suma {
	margin: 1rem 0 0;
	padding: 0.75rem 0.9rem;
	background: #ecfdf3;
	border-radius: 12px;
	font-size: 0.95rem;
	color: #166534;
	font-variant-numeric: tabular-nums;
}

.rem-flujo__suma strong {
	font-size: 1.2rem;
	color: #15803d;
}

.rem-flujo__suma em {
	font-style: normal;
}

@media (max-width: 760px) {
	.rem-flujo__pasos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 420px) {
	.rem-flujo__pasos {
		grid-template-columns: 1fr;
	}
}

/* Desglose del bruto */
.rem-desglose__lista {
	display: grid;
	gap: 0.15rem;
	margin: 1rem 0 0 !important;
	padding: 0 !important;
	list-style: none;
}

.rem-desglose__lista li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.15rem 1rem;
	margin: 0;
	padding: 0.55rem 0.2rem;
	border-bottom: 1px solid #f0eeec;
}

.rem-desglose__nombre {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 0.5rem;
	font-weight: 700;
	line-height: 1.35;
}

.rem-desglose__nombre i {
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
	border-radius: 4px;
	background: var(--c);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.rem-desglose__nombre small {
	flex-basis: 100%;
	padding-left: 1.25rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: #78716c;
}

.rem-desglose__cifra {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.rem-desglose__cifra strong {
	display: block;
}

.rem-desglose__cifra small {
	font-size: 0.78rem;
	color: #78716c;
}

.rem-desglose__mini {
	grid-column: 1 / -1;
	height: 4px;
	margin-left: 1.25rem;
	overflow: hidden;
	background: #f5f5f4;
	border-radius: 4px;
}

.rem-desglose__mini span {
	display: block;
	width: var(--v);
	height: 100%;
	background: var(--c);
	border-radius: 4px;
}

.rem-js .rem-desglose__mini span {
	width: 0;
	transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}

.rem-js .rem-mes-panel.is-play .rem-desglose__mini span {
	width: var(--v);
}

.rem-desglose .rem-desglose__total {
	margin: 0.8rem 0 0;
	text-align: right;
	font-size: 1rem;
}

/* --------------------------------------------------------------------------
   5. Retos semanales
   -------------------------------------------------------------------------- */
.rem-retos__grafico {
	position: relative;
	height: 250px;
	margin: 1.2rem 0 0.4rem;
	padding-left: 0;
}

.rem-retos__linea {
	position: absolute;
	left: 0;
	right: 0;
	bottom: calc(46px + (250px - 46px - 22px) * var(--y) / 100);
	border-top: 2px dashed #f0d9c6;
	pointer-events: none;
}

.rem-retos__linea em {
	position: absolute;
	right: 0;
	bottom: -1.05rem;
	width: 70px;
	padding-left: 0.4rem;
	background: #fff;
	font-size: 0.7rem;
	font-style: normal;
	font-weight: 600;
	line-height: 1.15;
	color: #78716c;
}

.rem-retos__linea em b {
	display: block;
	font-size: 0.9rem;
	color: var(--rem-naranja-osc);
}

.rem-retos__cols {
	position: absolute;
	inset: 0;
	display: grid;
	right: 74px;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 0.5rem;
	padding-top: 22px;
}

.rem-retos__col {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	min-width: 0;
}

.rem-retos__barra {
	position: relative;
	display: block;
	width: 70%;
	max-width: 44px;
	height: calc((250px - 46px - 22px) * var(--h) / 100);
	background: linear-gradient(180deg, #e8600a, #c24e05);
	border-radius: 8px 8px 3px 3px;
	transform-origin: bottom;
}

.rem-retos__col:nth-child(-n+4) .rem-retos__barra {
	background: linear-gradient(180deg, #57534e, #1a1a1a);
}

.rem-retos__barra b {
	position: absolute;
	left: 50%;
	bottom: 100%;
	transform: translate(-50%, -3px);
	font-size: 0.78rem;
	white-space: nowrap;
	color: var(--rem-negro);
}

.rem-js .rem-retos__barra {
	transform: scaleY(0);
	transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
	transition-delay: calc(var(--i) * 0.09s);
}

.rem-js .rem-retos__barra b {
	opacity: 0;
	transition: opacity 0.3s ease;
	transition-delay: calc(0.6s + var(--i) * 0.09s);
}

.rem-js .rem-retos.is-in .rem-retos__barra {
	transform: none;
}

.rem-js .rem-retos.is-in .rem-retos__barra b {
	opacity: 1;
}

.rem-retos__sem {
	display: block;
	height: 46px;
	padding-top: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
}

.rem-retos__barra b i,
.rem-retos__sem i {
	font-style: normal;
}

.rem-retos__sem small {
	display: block;
	font-weight: 500;
	color: #78716c;
}

.rem-retos__resumen {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0.6rem 0 0 !important;
	padding: 0 !important;
	list-style: none;
}

.rem-retos__resumen li {
	flex: 1 1 180px;
	margin: 0;
	padding: 0.6rem 0.85rem;
	background: var(--rem-crema);
	border-radius: 12px;
}

.rem-retos__resumen li:first-child {
	background: #f5f5f4;
	border-left: 4px solid #1a1a1a;
}

.rem-retos__resumen li:last-child {
	border-left: 4px solid var(--rem-naranja);
}

.rem-retos__resumen li > span {
	display: block;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #57534e;
}

.rem-retos__resumen strong {
	margin-right: 0.4rem;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 1.5rem;
}

.rem-retos__resumen small {
	color: var(--rem-naranja-osc);
	font-weight: 700;
}

@media (max-width: 600px) {
	.rem-retos__grafico {
		height: 230px;
	}

	.rem-retos__linea {
		bottom: calc(46px + (230px - 46px - 22px) * var(--y) / 100);
	}

	.rem-retos__barra {
		width: 82%;
		height: calc((230px - 46px - 22px) * var(--h) / 100);
	}

	.rem-retos__cols {
		gap: 0.2rem;
	}

	.rem-retos__barra b {
		font-size: 0.68rem;
	}

	.rem-retos__sem {
		font-size: 0.7rem;
	}

	.rem-retos__barra b i,
	.rem-retos__sem i,
	.rem-retos__sem small {
		display: none;
	}

	.rem-retos__cols {
		right: 52px;
	}

	.rem-retos__linea em {
		width: 50px;
		font-size: 0.6rem;
	}

	.rem-retos__linea em b {
		font-size: 0.75rem;
	}
}

/* --------------------------------------------------------------------------
   6. Capturas recortadas, un mes al lado del otro
   -------------------------------------------------------------------------- */
.rem-capturas {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

.rem-capturas__item {
	margin: 0;
	padding: 0.5rem 0.5rem 0;
	background: #0d0d0d;
	border-radius: 16px;
	box-shadow: 0 8px 22px rgba(26, 26, 26, 0.18);
	transition: transform 0.25s ease;
}

.rem-capturas__item:hover {
	transform: translateY(-3px) rotate(-0.4deg);
}

.rem-capturas__item:nth-child(2):hover {
	transform: translateY(-3px) rotate(0.4deg);
}

.rem-capturas__item img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 11px;
}

.rem-capturas__item figcaption {
	padding: 0.45rem 0 0.55rem;
	color: #d6d3d1;
	font-size: 0.82rem;
	font-weight: 700;
	text-align: center;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

@media (max-width: 520px) {
	.rem-capturas {
		grid-template-columns: 1fr;
		max-width: 360px;
		margin-left: auto;
		margin-right: auto;
	}
}

/* --------------------------------------------------------------------------
   7. La nomina dentro de un movil
   -------------------------------------------------------------------------- */
.rem-movil__wrap {
	display: grid;
	grid-template-columns: 290px minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
}

.rem-movil__phone {
	position: relative;
	padding: 12px;
	background: #0d0d0d;
	border: 2px solid #3a3735;
	border-radius: 38px;
	box-shadow: 0 18px 40px rgba(26, 26, 26, 0.28), inset 0 0 0 2px #26211d;
}

.rem-movil__phone::before {
	content: "";
	position: absolute;
	z-index: 2;
	top: 20px;
	left: 50%;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	border-radius: 50%;
	background: #1a1a1a;
	box-shadow: 0 0 0 2px #26211d;
}

.rem-movil__screen {
	height: 540px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #000;
	border-radius: 28px;
	scrollbar-width: thin;
	scrollbar-color: #e8600a #000;
}

.rem-movil__screen:focus-visible {
	outline: 3px solid var(--rem-naranja);
	outline-offset: 3px;
}

.rem-movil__screen img {
	display: block;
	width: 100%;
	height: auto;
	padding-top: 22px;
	border-radius: 0;
}

.rem-movil__hint {
	position: absolute;
	left: 50%;
	bottom: 26px;
	padding: 0.35rem 0.8rem;
	background: var(--rem-naranja);
	border-radius: 999px;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
	transform: translateX(-50%);
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.rem-js .rem-movil__hint {
	animation: rem-hint 1.4s ease-in-out infinite;
}

.rem-movil__phone.is-usado .rem-movil__hint {
	opacity: 0;
	animation: none;
}

@keyframes rem-hint {
	50% { transform: translate(-50%, -6px); }
}

.rem-movil__marcas {
	display: grid;
	gap: 0.45rem;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	counter-reset: none;
}

.rem-movil__marcas li {
	margin: 0;
}

.rem-movil__marcas button {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	width: 100%;
	padding: 0.6rem 0.75rem;
	background: #fafaf9;
	border: 1px solid #ece9e6;
	border-radius: 12px;
	color: var(--rem-negro);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rem-movil__marcas button:hover,
.rem-movil__marcas button:focus-visible {
	border-color: var(--rem-naranja);
	transform: translateX(3px);
}

.rem-movil__marcas button.is-on {
	background: var(--rem-crema);
	border-color: var(--rem-naranja);
}

.rem-movil__marcas b {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 50%;
	background: var(--rem-negro);
	color: #fff;
	font-size: 0.8rem;
	transition: background 0.2s ease;
}

.rem-movil__marcas button.is-on b {
	background: var(--rem-naranja);
}

.rem-movil__marcas button > span {
	font-weight: 700;
	line-height: 1.3;
}

.rem-movil__marcas small {
	display: block;
	font-size: 0.82rem;
	font-weight: 500;
	color: #78716c;
}

.rem-movil .rem-movil__link {
	margin: 0.9rem 0 0;
	font-size: 0.85rem;
	text-align: center;
}

@media (max-width: 700px) {
	.rem-movil__wrap {
		grid-template-columns: 1fr;
		justify-items: center;
	}

	.rem-movil__phone {
		width: min(290px, 100%);
	}

	.rem-movil__screen {
		height: 480px;
	}

	.rem-movil__marcas {
		width: 100%;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rem-movil__marcas small {
		display: none;
	}

	.rem-movil__marcas button {
		align-items: center;
		gap: 0.45rem;
		padding: 0.5rem 0.55rem;
	}

	.rem-movil__marcas b {
		width: 1.5rem;
		height: 1.5rem;
		font-size: 0.72rem;
	}

	.rem-movil__marcas button > span {
		font-size: 0.86rem;
		overflow-wrap: normal;
		word-break: normal;
		hyphens: none;
	}

	.rem-movil,
	.rem-flujo,
	.rem-desglose,
	.rem-retos,
	.rem-hora {
		padding: 1.1rem 0.9rem 1rem;
	}
}

/* --------------------------------------------------------------------------
   8. Cuanto queda por hora
   -------------------------------------------------------------------------- */
.rem-hora__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.65rem;
	margin: 1rem 0 0 !important;
	padding: 0 !important;
	list-style: none;
}

.rem-hora__grid li {
	margin: 0;
	padding: 0.85rem 0.9rem;
	background: #fafaf9;
	border: 1px solid #ece9e6;
	border-radius: 14px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rem-hora__grid li:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(26, 26, 26, 0.08);
}

.rem-hora__grid li.is-destacado {
	background: #1a1a1a;
	border-color: #1a1a1a;
	color: #f5f5f4;
}

.rem-hora__grid strong {
	display: block;
	white-space: nowrap;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 1.9rem;
	line-height: 1.1;
	color: var(--rem-naranja-osc);
	font-variant-numeric: tabular-nums;
}

.rem-hora__grid li.is-destacado strong {
	color: var(--rem-verde-claro);
}

.rem-hora__grid li > span {
	display: block;
	font-weight: 700;
}

.rem-hora__grid small {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.8rem;
	line-height: 1.35;
	color: #78716c;
}

.rem-hora__grid li.is-destacado small {
	color: #a8a29e;
}

@media (max-width: 640px) {
	.rem-hora__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5rem;
	}

	.rem-hora__grid li {
		padding: 0.7rem 0.7rem;
	}

	.rem-hora__grid strong {
		font-size: 1.45rem;
	}
}

/* --------------------------------------------------------------------------
   9. Barra de lectura: la moto avanza hasta el punto de entrega
   -------------------------------------------------------------------------- */
.rem-ruta {
	position: fixed;
	z-index: 60;
	left: 0;
	right: 0;
	bottom: 0;
	height: 6px;
	background: #2b2724;
	pointer-events: none;
}

.rem-ruta__hecho {
	height: 100%;
	width: 100%;
	background: linear-gradient(90deg, #c24e05, #e8600a);
	transform: scaleX(var(--p, 0));
	transform-origin: left;
}

.rem-ruta__moto {
	position: absolute;
	left: 0;
	bottom: 4px;
	width: 54px;
	height: auto;
	transform: translateX(var(--x, 0px)) scaleX(-1);
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}

.rem-ruta__destino {
	position: absolute;
	right: 6px;
	bottom: 6px;
	line-height: 0;
	transition: transform 0.3s ease;
}

.rem-ruta__ok {
	position: absolute;
	right: 4px;
	bottom: 34px;
	padding: 0.2rem 0.6rem;
	background: var(--rem-verde);
	border-radius: 999px;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 800;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.rem-ruta.is-entregado .rem-ruta__ok {
	opacity: 1;
	transform: none;
}

.rem-ruta.is-entregado .rem-ruta__destino {
	transform: scale(1.15);
}

.rem-ruta:not(.is-activa) {
	display: none;
}

@media (max-width: 600px) {
	.rem-ruta__moto {
		width: 44px;
	}
}

@media print {
	.rem-js .rem-anim {
		opacity: 1 !important;
		transform: none !important;
	}

	.rem-ruta,
	.rem-mes-tabs,
	.rem-movil__hint {
		display: none !important;
	}
}

/* --------------------------------------------------------------------------
   Movimiento reducido: todo se ve quieto y completo
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.rem-especial *,
	.rem-especial *::before,
	.rem-especial *::after {
		animation: none !important;
		transition: none !important;
	}

	.rem-js .rem-anim {
		opacity: 1;
		transform: none;
	}
}
