/* Folia · movimiento del rediseño D (B-26).
   Solo transform y opacity (más el subrayado, que es transform). Todo termina en el estado normal de la página:
   las animaciones usan `backwards`, así que si no corren el contenido ya está en su sitio. Se apaga con
   `prefers-reduced-motion: reduce`. */
@media (prefers-reduced-motion:no-preference){
  :root{--suave:cubic-bezier(.2,.7,.2,1);--rebote:cubic-bezier(.3,1.5,.5,1)}
  @keyframes subir{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
  @keyframes aparecer{from{opacity:0}to{opacity:1}}
  @keyframes crecerx{from{transform:scaleX(0)}to{transform:scaleX(1)}}
  @keyframes crecery{from{transform:scaleY(0)}to{transform:scaleY(1)}}
  @keyframes brotar{from{opacity:0;transform:scale(.6)}to{opacity:1;transform:none}}
  @keyframes latir{0%,100%{opacity:.08;transform:scale(1)}50%{opacity:.3;transform:scale(1)}}
  @keyframes mecer{0%,100%{transform:rotate(-8deg) translateY(0)}50%{transform:rotate(-2deg) translateY(-7px)}}
  @keyframes derivar{0%,100%{transform:rotate(-8deg) translate(0,0)}50%{transform:rotate(-6deg) translate(-14px,10px)}}

  /* Entrada de página: título, datos, filtros, tabla y pasos llegan en cascada */
  .appmain{animation:aparecer .35s ease backwards}
  .appmain h1{animation:subir .6s var(--suave) backwards}
  .appmain .sub,.appmain .clave,.appmain .migas{animation:subir .6s var(--suave) .06s backwards}
  .appmain form[role="search"],.appmain .fchips,.appmain .s11-fila{animation:subir .6s var(--suave) .12s backwards}
  .appmain .alert{animation:subir .5s var(--suave) backwards}
  .tablewrap tbody tr{animation:subir .5s var(--suave) backwards}
  .stats .stat,.list .item{animation:subir .5s var(--suave) backwards}
.tablewrap tbody tr:nth-child(1){animation-delay:0.20s}
.tablewrap tbody tr:nth-child(2){animation-delay:0.24s}
.tablewrap tbody tr:nth-child(3){animation-delay:0.28s}
.tablewrap tbody tr:nth-child(4){animation-delay:0.32s}
.tablewrap tbody tr:nth-child(5){animation-delay:0.36s}
.tablewrap tbody tr:nth-child(6){animation-delay:0.40s}
.tablewrap tbody tr:nth-child(7){animation-delay:0.44s}
.tablewrap tbody tr:nth-child(8){animation-delay:0.48s}
.tablewrap tbody tr:nth-child(9){animation-delay:0.52s}
.tablewrap tbody tr:nth-child(10){animation-delay:0.56s}
.tablewrap tbody tr:nth-child(11){animation-delay:0.60s}
.tablewrap tbody tr:nth-child(12){animation-delay:0.64s}
.stats .stat:nth-child(1){animation-delay:0.17s}
.stats .stat:nth-child(2){animation-delay:0.22s}
.stats .stat:nth-child(3){animation-delay:0.27s}
.stats .stat:nth-child(4){animation-delay:0.32s}
.stats .stat:nth-child(5){animation-delay:0.37s}
.stats .stat:nth-child(6){animation-delay:0.42s}
.stats .stat:nth-child(7){animation-delay:0.47s}
.stats .stat:nth-child(8){animation-delay:0.52s}
.list .item:nth-child(1){animation-delay:0.17s}
.list .item:nth-child(2){animation-delay:0.22s}
.list .item:nth-child(3){animation-delay:0.27s}
.list .item:nth-child(4){animation-delay:0.32s}
.list .item:nth-child(5){animation-delay:0.37s}
.list .item:nth-child(6){animation-delay:0.42s}
.list .item:nth-child(7){animation-delay:0.47s}
.list .item:nth-child(8){animation-delay:0.52s}

  /* Portada del proyecto */
  .det19 .hd>*{animation:subir .6s var(--suave) backwards}
  .det19 .hd>.clave{animation-delay:.02s}.det19 .hd>h1{animation-delay:.06s}.det19 .hd>.sub{animation-delay:.12s}
  .det19 .hd>.id{animation-delay:.16s}.det19 .hd>.montos{animation-delay:.2s}.det19 .hd>.creado{animation-delay:.24s}
  .det19 .hd>.avs{animation-delay:.14s}.det19 .hd>.avn{animation-delay:.62s}.det19 .hd>.ecur{animation-delay:.7s}
  .avs .avance .pct b{animation:subir .7s var(--suave) .3s backwards}
  .bar>i{transform-origin:left;animation:crecerx .9s var(--suave) .3s backwards}
  .folios i.h::after,.folios i.c::after{content:"";position:absolute;inset:0;transform-origin:left}
  .folios i.h::after{background:var(--acc);animation:crecerx .4s var(--suave) backwards}
  .folios i.c::after{background:var(--acc);opacity:.12;animation:latir 2.6s ease-in-out 1.4s infinite}
.folios i:nth-child(1)::after{animation-delay:0.42s}
.folios i:nth-child(2)::after{animation-delay:0.49s}
.folios i:nth-child(3)::after{animation-delay:0.56s}
.folios i:nth-child(4)::after{animation-delay:0.63s}
.folios i:nth-child(5)::after{animation-delay:0.70s}
.folios i:nth-child(6)::after{animation-delay:0.77s}
.folios i:nth-child(7)::after{animation-delay:0.84s}
.folios i:nth-child(8)::after{animation-delay:0.91s}
.folios i:nth-child(9)::after{animation-delay:0.98s}
.folios i:nth-child(10)::after{animation-delay:1.05s}
.folios i:nth-child(11)::after{animation-delay:1.12s}

  /* Hilo del checklist: la línea baja, los marcadores brotan, cada paso sube */
  .det19 .chk19>.chk-cab{animation:subir .6s var(--suave) .3s backwards}
  .det19 .paso{animation:subir .55s var(--suave) backwards}
  .det19 .paso::before{transform-origin:top;animation:crecery .7s var(--suave) backwards}
  .det19 .paso-n{animation:brotar .5s var(--rebote) backwards}
.det19 .paso:nth-child(1){animation-delay:0.46s}
.det19 .paso:nth-child(2){animation-delay:0.52s}
.det19 .paso:nth-child(3){animation-delay:0.58s}
.det19 .paso:nth-child(4){animation-delay:0.64s}
.det19 .paso:nth-child(5){animation-delay:0.70s}
.det19 .paso:nth-child(6){animation-delay:0.76s}
.det19 .paso:nth-child(7){animation-delay:0.82s}
.det19 .paso:nth-child(8){animation-delay:0.88s}
.det19 .paso:nth-child(9){animation-delay:0.94s}
.det19 .paso:nth-child(10){animation-delay:1.00s}
.det19 .paso:nth-child(11){animation-delay:1.06s}
.det19 .paso:nth-child(1)::before,.det19 .paso:nth-child(1) .paso-n{animation-delay:0.56s}
.det19 .paso:nth-child(2)::before,.det19 .paso:nth-child(2) .paso-n{animation-delay:0.62s}
.det19 .paso:nth-child(3)::before,.det19 .paso:nth-child(3) .paso-n{animation-delay:0.68s}
.det19 .paso:nth-child(4)::before,.det19 .paso:nth-child(4) .paso-n{animation-delay:0.74s}
.det19 .paso:nth-child(5)::before,.det19 .paso:nth-child(5) .paso-n{animation-delay:0.80s}
.det19 .paso:nth-child(6)::before,.det19 .paso:nth-child(6) .paso-n{animation-delay:0.86s}
.det19 .paso:nth-child(7)::before,.det19 .paso:nth-child(7) .paso-n{animation-delay:0.92s}
.det19 .paso:nth-child(8)::before,.det19 .paso:nth-child(8) .paso-n{animation-delay:0.98s}
.det19 .paso:nth-child(9)::before,.det19 .paso:nth-child(9) .paso-n{animation-delay:1.04s}
.det19 .paso:nth-child(10)::before,.det19 .paso:nth-child(10) .paso-n{animation-delay:1.10s}
.det19 .paso:nth-child(11)::before,.det19 .paso:nth-child(11) .paso-n{animation-delay:1.16s}

  /* Acceso */
  .auth .brandmark::before{animation:mecer 9s ease-in-out infinite}
  .auth .brandmark::after{animation:derivar 18s ease-in-out infinite}
  .auth .brandmark b{animation:subir .8s var(--suave) .1s backwards}
  .auth .brandmark small{animation:subir .8s var(--suave) .25s backwards}
  .auth .panel h1{animation:subir .7s var(--suave) .15s backwards}
  .auth .panel .sub{animation:subir .7s var(--suave) .22s backwards}
  .auth .field{animation:subir .7s var(--suave) backwards}
  .auth .field:nth-of-type(1){animation-delay:.3s}.auth .field:nth-of-type(2){animation-delay:.38s}
  .auth .btn{animation:subir .7s var(--suave) .46s backwards}

  /* Cambios que hace htmx: lo nuevo aparece con suavidad */
  #s11-resultados,#s14-resultados,[id$="-resultados"]{animation:aparecer .3s ease backwards}
  .dialogo-fondo{animation:aparecer .2s ease backwards}
  .dialogo{animation:brotar .35s var(--rebote) backwards}
  .ib .n:not([hidden]){animation:brotar .45s var(--rebote) backwards}

  /* Respuesta al tacto y al puntero */
  .appbar nav a::after,.fchips a::after{transition:transform .28s var(--suave),background-color .2s ease}
  .appbar nav a,.fchips a,.row-link b,.paso-a,.ib,.me{transition:color .18s ease,background-color .18s ease,border-color .18s ease}
  .btn{transition:background-color .18s ease,color .18s ease,transform .12s ease}
  .btn:active{transform:scale(.97)}
  .tablewrap tbody tr{transition:background-color .2s ease}
  .input,select.input{transition:border-color .18s ease,box-shadow .18s ease}
  .stat,.item{transition:transform .25s var(--suave),border-color .2s ease}
  .stat:hover,.item:hover{transform:translateY(-2px);border-color:var(--control)}

}

/* S33 «Propiedades» (B-38): las tarjetas llegan en cascada y la foto se acerca un poco al pasar el cursor. */
@media (prefers-reduced-motion:no-preference){
  #s33 .tarjeta{animation:subir .6s var(--suave) backwards}
  #s33 .rejilla li:nth-child(1) .tarjeta{animation-delay:.12s}
  #s33 .rejilla li:nth-child(2) .tarjeta{animation-delay:.18s}
  #s33 .rejilla li:nth-child(3) .tarjeta{animation-delay:.24s}
  #s33 .rejilla li:nth-child(4) .tarjeta{animation-delay:.30s}
  #s33 .rejilla li:nth-child(5) .tarjeta{animation-delay:.36s}
  #s33 .rejilla li:nth-child(6) .tarjeta{animation-delay:.42s}
  #s33 .foto img{transition:transform .6s var(--suave)}
  #s33 .tarjeta:hover .foto img{transform:scale(1.035)}
  #s33 .galeria,#s33 .resumen,#s33 .zona{animation:subir .6s var(--suave) .12s backwards}
  #s33 .resumen{animation-delay:.2s}
  #s33 .zona{animation-delay:.28s}
}
