/* GSTAX IA · gstax.cl/gstax-ia/ */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --fondo: #F3F5F7;
  --superficie: #FFFFFF;
  --grafito: #0E1116;
  --grafito-2: #171B22;
  --grafito-3: #232934;
  --texto: #0E1116;
  --texto-2: #47505C;
  --texto-3: #5A6472;
  --sobre-oscuro: #E7EBF0;
  --sobre-oscuro-2: #A9B3C1;
  --regla: #DCE1E6;
  --regla-suave: #EEF1F4;
  --regla-oscura: #2A313C;
  --azul: #2F5BEA;
  --azul-hover: #2349C9;
  --azul-suave: #E6ECFD;
  --azul-claro: #8FA9F5;
  --verde: #157F5B;
  --verde-suave: #E2F3EC;
  --rojo: #B42318;
  --ambar-suave: #FBF1DD;
  --ambar: #8A5A00;

  --fuente: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --datos: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-asentar: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-cajon: cubic-bezier(0.32, 0.72, 0, 1);

  --gutter: clamp(20px, 4vw, 48px);
  --ancho: 1200px;
  --seccion: clamp(80px, 9vw, 128px);
  --barra-h: 76px;
  --radio: 14px;
  --radio-grande: 20px;
  --sombra: 0 1px 2px rgba(14, 17, 22, 0.06), 0 12px 32px -12px rgba(14, 17, 22, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--barra-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font-family: var(--fuente); font-size: 1.0625rem; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; caret-color: var(--azul);
}
img, picture, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p, li { text-wrap: pretty; }
address { font-style: normal; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
::selection { background: var(--azul); color: #fff; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; border-radius: 6px; }
svg { width: 1em; height: 1em; flex: none; }
html { scrollbar-color: #A9B3C1 var(--fondo); }

.saltar { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--grafito); color: #fff; }
.saltar:focus { top: 12px; }
.contenedor { width: 100%; max-width: calc(var(--ancho) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* píldoras */
.pildora {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 0.9375rem; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.pildora:active { transform: scale(0.97); }
.pildora--grande { min-height: 52px; padding: 0 26px; font-size: 1rem; }
.pildora--azul { background: var(--azul); border-color: var(--azul); color: #fff; }
.pildora--linea { background: var(--superficie); border-color: #C9D0D8; color: var(--grafito); }
.pildora--linea-clara { background: transparent; border-color: rgba(255,255,255,0.4); color: #fff; }
.pildora--blanca { background: #fff; border-color: #fff; color: var(--grafito); }
.pildora--falsa { min-height: 36px; padding: 0 16px; font-size: 0.875rem; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .pildora--azul:hover { background: var(--azul-hover); border-color: var(--azul-hover); }
  .pildora--linea:hover { border-color: var(--grafito); }
  .pildora--linea-clara:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
  .pildora--blanca:hover { background: var(--fondo); }
}

/* barra */
.barra { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.94); border-bottom: 1px solid var(--regla); }
@supports (backdrop-filter: blur(8px)) { .barra { background: rgba(255,255,255,0.86); backdrop-filter: saturate(1.4) blur(12px); } }
.barra__fila { display: flex; align-items: center; gap: 24px; min-height: var(--barra-h); max-width: calc(1320px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.barra__marca img { height: 40px; width: auto; }
.barra__nav { display: flex; gap: 4px; margin-inline: auto; }
.barra__nav a { padding: 10px 12px; border-radius: 999px; font-size: 0.9375rem; color: var(--texto-2); text-decoration: none; transition: color 200ms ease, background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .barra__nav a:hover { color: var(--grafito); background: var(--fondo); } }
.barra__acciones { display: flex; align-items: center; gap: 10px; }
.enlace-firma { display: inline-flex; align-items: center; gap: 4px; padding: 10px 8px; font-size: 0.9375rem; color: var(--texto-2); text-decoration: none; }
.enlace-firma svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .enlace-firma:hover { color: var(--grafito); text-decoration: underline; } }
.barra__menu { display: none; align-items: center; gap: 8px; min-height: 44px; margin-left: auto; padding: 0 6px 0 14px; background: none; border: 0; cursor: pointer; font-weight: 500; }
.barra__menu svg { width: 24px; height: 24px; }

.menu-ia { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--grafito); color: #fff; display: none; flex-direction: column; }
.menu-ia[open] { display: flex; animation: menu-entra 300ms var(--ease-cajon) both; }
.menu-ia::backdrop { background: rgba(14,17,22,0.5); }
@keyframes menu-entra { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.menu-ia__barra { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding-inline: var(--gutter); border-bottom: 1px solid var(--regla-oscura); }
.menu-ia__barra img { height: 34px; width: auto; }
.menu-ia__cerrar { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 14px; background: none; border: 0; color: #fff; cursor: pointer; font-weight: 500; }
.menu-ia__cerrar svg { width: 24px; height: 24px; }
.menu-ia nav { flex: 1; overflow-y: auto; padding: 8px var(--gutter); }
.menu-ia nav a { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--regla-oscura); color: #fff; text-decoration: none; font-size: 1.5rem; font-weight: 400; }
.menu-ia nav a svg { width: 20px; height: 20px; color: var(--azul-claro); }
.menu-ia__pie { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 20px var(--gutter) max(24px, env(safe-area-inset-bottom)); }

/* portada */
.portada { padding-top: clamp(40px, 4.5vw, 64px); overflow: hidden; }
.portada__texto { display: flex; flex-direction: column; align-items: center; text-align: center; }
.portada__marca { width: 100%; display: flex; justify-content: center; }
.portada__marca img { width: clamp(340px, 36.5vw, 524px); max-width: 100%; height: auto; }
.portada__bajada { margin-top: clamp(22px, 2.4vw, 32px); max-width: 24ch; font-size: clamp(2rem, 1.2rem + 3vw, 3.75rem); line-height: 1.06; letter-spacing: -0.03em; font-weight: 300; text-wrap: balance; }
.portada__descripcion { margin-top: 20px; max-width: 60ch; font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0938rem); line-height: 1.65; color: var(--texto-2); }
.estado { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 16px; border-radius: 999px; background: var(--superficie); border: 1px solid var(--regla); font-size: 0.9375rem; color: var(--texto-2); text-align: left; }
.estado__punto { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); flex: none; }
.portada__botones { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.escena { position: relative; margin-top: clamp(36px, 4vw, 52px); padding-bottom: 8px; max-width: calc(1120px + 2 * var(--gutter)); }
.notebook { position: relative; }
.notebook__pantalla { background: var(--grafito); border-radius: 20px 20px 0 0; padding: 12px 12px 0; box-shadow: 0 30px 60px -24px rgba(14,17,22,0.35); }
.notebook__base { height: 16px; margin: 0 -24px; border-radius: 0 0 16px 16px; background: #C9CED6; border-top: 1px solid #B6BCC6; }
.nota-ejemplo { margin-top: 12px; font-size: 0.8125rem; color: var(--texto-3); text-align: center; }
.nota-ejemplo--tablero { text-align: left; }
.nota-ejemplo--claro { color: var(--texto-3); text-align: left; margin-top: 10px; }

/* aplicación (maqueta) */
.app { display: flex; min-height: 440px; background: var(--fondo); border-radius: 10px 10px 0 0; overflow: hidden; text-align: left; font-family: var(--datos); font-size: 13px; line-height: 1.45; color: var(--texto); }
.app__lateral { flex: 0 0 196px; display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; background: var(--superficie); border-right: 1px solid var(--regla); }
.app__logo { padding: 2px 8px 14px; }
.app__logo img { height: 22px; width: auto; }
.app__lateral span { padding: 8px 10px; border-radius: 8px; color: var(--texto-2); }
.app__lateral .activo { background: var(--azul-suave); color: var(--azul-hover); font-weight: 600; }
.app__cuerpo { flex: 1; min-width: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.app__cabeza, .nomina__cabeza { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.app__titulo { font-family: var(--fuente); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.app__sub { font-size: 12px; color: var(--texto-3); }
.app__fila { display: grid; grid-template-columns: 1fr 1.15fr; gap: 12px; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-family: var(--datos); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip--ok { background: var(--verde-suave); color: var(--verde); }
.chip--info { background: var(--azul-suave); color: var(--azul-hover); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpis--cuatro { grid-template-columns: repeat(4, 1fr); }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--superficie); border: 1px solid var(--regla); border-radius: 12px; font-family: var(--datos); }
.kpi span { font-size: 11.5px; color: var(--texto-3); }
.kpi b { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi small { font-size: 11.5px; color: var(--texto-3); }
.pos { color: inherit; }

.tarjeta { background: var(--superficie); border: 1px solid var(--regla); border-radius: 12px; padding: 14px; min-width: 0; font-family: var(--datos); }
.tarjeta--tabla { padding: 0; overflow: hidden; }
.tarjeta__titulo { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.tarjeta__titulo small { font-weight: 400; color: var(--texto-3); }
.barras { margin-top: 12px; height: 132px; display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid var(--regla); }
.barras i { flex: 1; height: var(--h); background: #C9D5F8; border-radius: 4px 4px 0 0; }
.barras i.actual { background: var(--azul); }
.barras__meses { display: flex; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--texto-3); }
.barras__meses span { flex: 1; text-align: center; }
.barras__meses .actual { color: var(--grafito); font-weight: 700; }

.tabla { width: 100%; border-collapse: collapse; font-family: var(--datos); font-size: 13px; }
.tabla th { padding: 9px 12px; text-align: left; font-size: 11.5px; font-weight: 600; color: var(--texto-3); background: #F8F9FB; border-bottom: 1px solid var(--regla); }
.tabla td { padding: 9px 12px; border-bottom: 1px solid var(--regla-suave); }
.tabla .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla tr.total td { font-weight: 700; border-top: 1px solid var(--regla); border-bottom: 0; }
.tabla tr.subtotal td { font-weight: 600; background: #F8F9FB; }

/* celular */
.celular { position: absolute; right: calc(var(--gutter) - 104px); bottom: -36px; width: 216px; padding: 9px; border-radius: 34px; background: var(--grafito-2); box-shadow: 0 30px 50px -20px rgba(14,17,22,0.45); }
.celular__pantalla { display: flex; flex-direction: column; gap: 9px; min-height: 392px; padding: 24px 12px 14px; border-radius: 26px; background: var(--fondo); font-family: var(--datos); text-align: left; }
.cel__sub { font-size: 11.5px; color: var(--texto-3); }
.cel__titulo { font-family: var(--fuente); font-size: 18px; font-weight: 600; margin-top: -4px; }
.kpi--chico { padding: 10px 12px; }
.kpi--chico b { font-size: 16px; }
.cel__aviso { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--superficie); border: 1px solid var(--regla); font-size: 12.5px; font-weight: 600; }
.cel__ok { display: inline-flex; justify-content: center; align-items: center; min-height: 34px; border-radius: 999px; background: var(--azul); color: #fff; font-weight: 600; }

/* bloques */
.bloque { padding-block: var(--seccion); }
.bloque--oscuro { background: var(--grafito); color: var(--sobre-oscuro); }
.bloque--gris { background: #E9ECF0; }
.bloque__fila { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.bloque__fila--invertida { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
.titulo { font-size: clamp(2rem, 1.4rem + 2vw, 3.125rem); line-height: 1.08; letter-spacing: -0.025em; font-weight: 400; text-wrap: balance; }
.titulo .num { color: var(--azul); font-weight: 300; }
.bloque--oscuro .titulo { color: #fff; }
.bloque--oscuro .titulo .num { color: var(--azul-claro); }
.intro { margin-top: 20px; font-size: 1.125rem; color: var(--texto-2); }
.bloque--oscuro .intro { color: var(--sobre-oscuro-2); }
.lista { margin-top: 24px; }
.lista li { position: relative; padding: 15px 0 15px 30px; border-top: 1px solid var(--regla); color: var(--texto-2); }
.lista li::before { content: ""; position: absolute; left: 2px; top: calc(15px + 0.5em); width: 12px; height: 7px; border-left: 1.6px solid var(--azul); border-bottom: 1.6px solid var(--azul); transform: rotate(-45deg); }
.bloque--oscuro .lista li { border-top-color: var(--regla-oscura); color: var(--sobre-oscuro); }
.bloque--oscuro .lista li::before { border-color: var(--azul-claro); }

/* tablero con pestañas */
.tablero { position: sticky; top: calc(var(--barra-h) + 24px); padding: 16px; background: var(--superficie); border: 1px solid var(--regla); border-radius: var(--radio-grande); box-shadow: var(--sombra); }
.tablero__pestanas { display: flex; gap: 4px; padding: 4px; background: var(--fondo); border-radius: 999px; }
.tablero__pestanas [role="tab"] { flex: 1; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--texto-2); font-weight: 500; font-size: 0.9375rem; cursor: pointer; transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease; }
.tablero__pestanas [role="tab"][aria-selected="true"] { background: var(--superficie); color: var(--grafito); box-shadow: 0 1px 2px rgba(14,17,22,0.1), 0 0 0 1px var(--regla); }
@media (hover: hover) and (pointer: fine) { .tablero__pestanas [role="tab"][aria-selected="false"]:hover { color: var(--grafito); } }
.tablero__panel { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; font-family: var(--datos); }
.js .tablero__panel:not(.es-activo) { display: none; }
.tablero__panel.entra { animation: panel-entra 240ms var(--ease-out) both; }
@keyframes panel-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tablero__panel:focus-visible { outline-offset: 4px; }
.tablero__cabeza { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--texto-3); }
.tablero__ayuda { color: var(--azul-hover); }
.tabla--eerr { border-top: 1px solid var(--regla); }
.tabla--eerr tr.abre button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font-size: 13px; color: var(--grafito); }
.tabla--eerr tr.abre button svg { width: 14px; height: 14px; color: var(--texto-3); transition: transform 200ms var(--ease-out); }
.tabla--eerr tr.abre button[aria-expanded="true"] svg { transform: rotate(90deg); color: var(--azul); }
@media (hover: hover) and (pointer: fine) { .tabla--eerr tr.abre:hover td { background: #F8F9FB; } .tabla--eerr tr.abre button:hover { color: var(--azul-hover); } }
.tabla--eerr tr.detalle td { padding: 4px 12px 10px 32px; background: #F8F9FB; }
.tabla--eerr tr.detalle ul { border-left: 2px solid var(--azul-suave); padding-left: 12px; }
.tabla--eerr tr.detalle li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 12.5px; color: var(--texto-2); }
.tabla--eerr tr.detalle li .n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla--eerr tr.detalle:not([hidden]) td { animation: detalle-entra 220ms var(--ease-out) both; }
@keyframes detalle-entra { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.balance { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.balance .tabla { border-top: 1px solid var(--regla); }
.linea-caja { width: 100%; height: auto; margin-top: 8px; font-family: var(--datos); }

/* nómina */
.nomina { position: sticky; top: calc(var(--barra-h) + 24px); padding: 18px; background: var(--superficie); color: var(--grafito); border-radius: var(--radio-grande); font-family: var(--datos); font-size: 13px; box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6); }
.nomina__saldo { margin: 16px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nomina__saldo div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--fondo); }
.nomina__saldo span { font-size: 11.5px; color: var(--texto-3); }
.nomina__saldo b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nomina .tabla { border-top: 1px solid var(--regla); }
.nomina .tabla td:first-child { white-space: nowrap; }
.nomina tr.detenido td { background: var(--ambar-suave); color: var(--ambar); }
.nomina tr.detenido td.n { text-decoration: line-through; }
.nomina__pie { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* pasos: una secuencia sobre una línea */
.pasos { margin-top: clamp(40px, 4.5vw, 64px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; border-top: 1px solid var(--regla); }
.pasos li { position: relative; padding-top: 28px; }
.pasos li::before { content: ""; position: absolute; left: 0; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--fondo); border: 1.5px solid var(--grafito); }
.pasos p { color: var(--texto-2); max-width: 30ch; }
.pasos strong { display: block; margin-bottom: 6px; font-size: 1.25rem; font-weight: 500; color: var(--grafito); letter-spacing: -0.01em; }

/* seguridad: lista con reglas finas */
.seguro { margin-top: clamp(36px, 4vw, 56px); display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 5vw, 72px); }
.seguro li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 22px 0; border-top: 1px solid #CDD3DA; }
.seguro svg { width: 20px; height: 20px; margin-top: 4px; color: var(--azul); }
.seguro p { color: var(--texto-2); max-width: 52ch; }
.seguro strong { display: block; margin-bottom: 4px; font-size: 1.1875rem; font-weight: 500; color: var(--grafito); }

/* llamado */
.llamado { padding-block: 0 var(--seccion); background: #E9ECF0; }
.llamado__caja { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; padding: clamp(36px, 5vw, 64px) clamp(24px, 5vw, 64px); border-radius: 28px; background: var(--grafito); color: #fff; }
.llamado__caja p { flex: 1 1 480px; min-width: 0; font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.25rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 300; }
.llamado__botones { display: flex; flex-wrap: wrap; gap: 12px; }
.llamado :focus-visible { outline-color: #fff; }

/* pie */
.pie { background: var(--fondo); border-top: 1px solid var(--regla); color: var(--texto-3); font-size: 0.9375rem; }
.pie__fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding-block: 40px 24px; }
.pie__marca img { height: 36px; width: auto; }
.pie__enlaces { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pie__enlaces a, .pie address a { color: var(--grafito); text-decoration: none; }
.pie__enlaces a:hover, .pie address a:hover { text-decoration: underline; }
.pie__legal { padding-bottom: 28px; font-size: 0.8125rem; }

/* ===== movimiento ===== */
@media (prefers-reduced-motion: no-preference) {
  .js .portada__marca { animation: aparece 700ms var(--ease-out) both; }
  .js .portada .aparece { animation: aparece 800ms var(--ease-out) both; }
  .js .portada__bajada { animation-delay: 80ms !important; }
  .js .portada__descripcion { animation-delay: 160ms !important; }
  .js .portada .estado { animation-delay: 220ms !important; }
  .js .portada__botones { animation-delay: 280ms !important; }
  .js .notebook { animation: sube 1100ms var(--ease-asentar) 300ms both; }
  .js .celular { animation: sube 1100ms var(--ease-asentar) 520ms both; }

  .js.revelar .rv { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
  .js.revelar .rv.dentro { opacity: 1; transform: none; }
}
@keyframes aparece { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sube { from { opacity: 0; transform: translateY(48px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tablero__panel.entra, .tabla--eerr tr.detalle:not([hidden]) td, .menu-ia[open] { animation: none; }
  .pildora:active { transform: none; }
}

/* ===== adaptación ===== */
@media (min-width: 861px) { .app__cuerpo { padding-right: 132px; } }
@media (max-width: 1320px) {
  .celular { right: calc(var(--gutter) - 24px); }
  .app__cuerpo { padding-right: 168px; }
}
@media (max-width: 1180px) {
  .barra__nav { display: none; }
  .barra__acciones { margin-left: auto; }
  .pasos { gap: 0 24px; }
}
@media (max-width: 1023px) {
  .bloque__fila, .bloque__fila--invertida { grid-template-columns: minmax(0, 1fr); }
  .tablero, .nomina { min-width: 0; }
  .tablero { position: static; }
  .celular { right: 0; width: 196px; }
  .nomina { position: static; }
  .app__lateral { flex-basis: 160px; }
}
@media (max-width: 860px) {
  :root { --barra-h: 64px; }
  .barra__acciones { display: none; }
  .barra__menu { display: inline-flex; }
  .barra__marca img { height: 34px; }
  .app__lateral { display: none; }
  .celular { display: none; }
}
@media (max-width: 640px) {
  .portada__bajada { max-width: none; }
  .portada__botones { flex-direction: column; align-self: stretch; }
  .estado { border-radius: 14px; }
  .notebook__pantalla { padding: 8px 8px 0; border-radius: 14px 14px 0 0; }
  .notebook__base { margin: 0 -10px; height: 10px; }
  .app { min-height: 0; }
  .app__cuerpo { padding: 14px 12px; }
  .app__fila { grid-template-columns: 1fr; }
  .tarjeta--tabla { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi:nth-child(3) { grid-column: 1 / -1; }
  .kpis--cuatro { grid-template-columns: 1fr 1fr; }
  .kpis--cuatro .kpi:nth-child(3) { grid-column: auto; }
  .tablero { padding: 10px; }
  .tablero__pestanas [role="tab"] { flex: 1; padding: 0 8px; font-size: 0.875rem; white-space: nowrap; }
  .tablero__pestanas .largo { display: none; }
  .tablero__panel { min-width: 0; overflow-x: auto; }
  .tablero .tabla { font-size: 12px; }
  .tablero .tabla td, .tablero .tabla th { padding: 8px 6px; }
  .tablero .tabla td:first-child, .tablero .tabla th:first-child { padding-left: 0; }
  .tablero .tabla td:last-child, .tablero .tabla th:last-child { padding-right: 0; }
  .balance { grid-template-columns: 1fr; }
  .tabla td, .tabla th { padding: 8px 10px; }
  .tabla--eerr tr.detalle td { padding-left: 14px; }
  .nomina { padding: 12px; }
  .nomina__saldo { grid-template-columns: 1fr 1fr; }
  .nomina__saldo div:last-child { grid-column: 1 / -1; }
  .pasos { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--regla); margin-left: 4px; }
  .pasos li { padding: 0 0 28px 24px; }
  .pasos li::before { left: -5px; top: 6px; }
  .seguro { grid-template-columns: 1fr; }
  .menu-ia__pie { grid-template-columns: 1fr; }
}
