/* Diseño de las páginas de normatividad (solo presentación: no cambia textos).
   El contenido lo pinta React, así que todo va por selectores estructurales. */

/* ---------- portada del documento ---------- */
main > section:first-of-type{
  position:relative; overflow:hidden; isolation:isolate;
  border-bottom:0 !important;
  padding:4.5rem 0 4rem !important;
  background:radial-gradient(ellipse 80% 65% at 50% -15%, #dbe8ff, #f8fafc 62%) !important;
}
main > section:first-of-type::before{
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:repeating-linear-gradient(180deg, rgba(15,23,42,.03) 0px, rgba(15,23,42,.03) 1px, transparent 1px, transparent 3px);
  opacity:.6;
}
main > section:first-of-type::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:5rem; z-index:0; pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,0), #ffffff 100%);
}
main > section:first-of-type > div{ position:relative; z-index:1; }

main > section:first-of-type span{
  color:#1d5fd1 !important; letter-spacing:.3em !important; font-size:.72rem !important;
}
main > section:first-of-type h1{
  margin-top:1.1rem !important;
  font-size:clamp(1.7rem, 3.4vw, 2.6rem) !important;
  line-height:1.15 !important; letter-spacing:-.01em !important; color:#0f172a !important;
}
main > section:first-of-type h1 + p{
  margin-top:1rem !important; font-size:1.02rem !important; color:#64748b !important;
}
/* sello del documento */
main > section:first-of-type h1 + p + p{
  display:inline-block; margin-top:1.1rem !important;
  padding:.4rem .9rem; border-radius:999px;
  background:#eef4ff; border:1px solid #bcd4ff; color:#1d5fd1 !important;
  font-size:.68rem !important; letter-spacing:.12em !important; font-weight:700;
}
/* descarga como botón */
main > section:first-of-type a{
  margin-top:1.6rem !important; padding:.85rem 1.6rem; border-radius:.65rem;
  background:#2f7bf0; color:#ffffff !important;
  box-shadow:0 12px 26px -14px rgba(47,123,240,.95);
  transition:background .2s ease, transform .2s ease;
}
main > section:first-of-type a:hover{ background:#1d5fd1; transform:translateY(-2px); }

/* ---------- cuerpo del documento ---------- */
main article{
  max-width:52rem !important;
  padding-top:3.5rem !important; padding-bottom:4.5rem !important;
  color:#334155;
}
main article p{
  font-size:1.02rem !important; line-height:1.8 !important; color:#475569 !important;
}
main article h2{
  position:relative;
  margin-top:3.5rem !important; padding-top:1.5rem;
  font-size:clamp(1.15rem,2.1vw,1.5rem) !important; color:#0f172a !important;
  letter-spacing:-.01em !important; scroll-margin-top:6rem;
}
/* filete de color sobre cada capítulo */
main article h2::before{
  content:""; position:absolute; top:0; left:0; width:3.2rem; height:3px; border-radius:2px;
  background:linear-gradient(90deg,#2f7bf0,#7c3aed);
}
main article h3{
  margin-top:2.25rem !important; font-size:1.02rem !important; color:#1d5fd1 !important;
  scroll-margin-top:6rem;
}

/* ---------- tablas ---------- */
main article table{ font-size:.92rem !important; }
main article > div:has(table){
  border-color:#e8ecf2 !important; border-radius:1rem !important;
  box-shadow:0 1px 2px rgba(15,23,42,.04), 0 14px 30px -26px rgba(15,23,42,.5);
}
main article table td, main article table th{ padding:.85rem 1.1rem !important; }
main article table tr td:first-child{ color:#0f172a !important; font-weight:700; width:38%; }
main article table tr:nth-child(odd) td{ background:#f8fafc; }
main article table tr:hover td{ background:#eef4ff; }

/* ---------- listas de derechos / deberes ---------- */
main article ul > li{
  border:1px solid #e8ecf2 !important; border-left:3px solid #2f7bf0 !important;
  border-radius:.9rem !important; padding:1rem 1.15rem !important;
  background:#ffffff !important;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
main article ul > li:hover{
  transform:translateX(3px);
  border-left-color:#7c3aed !important;
  box-shadow:0 12px 26px -20px rgba(15,23,42,.6);
}
main article ul > li strong{ color:#0f172a !important; }

/* ---------- índice lateral (lo arma normatividad.js con los mismos títulos) ---------- */
.nz-toc{
  display:none; position:fixed; top:7.5rem; left:1.75rem; z-index:30;
  width:15.5rem; max-height:calc(100vh - 12rem); overflow:auto;
  padding:1.1rem 1rem; border-radius:1rem;
  background:rgba(255,255,255,.92); border:1px solid #e8ecf2;
  box-shadow:0 20px 40px -30px rgba(15,23,42,.6); backdrop-filter:blur(8px);
}
.nz-toc-title{
  font-family:'Manrope',sans-serif; font-size:.64rem; font-weight:800;
  letter-spacing:.22em; text-transform:uppercase; color:#94a3b8; margin-bottom:.7rem;
}
.nz-toc a{
  display:block; padding:.4rem .6rem; border-radius:.5rem; border-left:2px solid transparent;
  font-size:.8rem; line-height:1.35; color:#64748b; text-decoration:none;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.nz-toc a:hover{ background:#f1f5f9; color:#1d5fd1; }
.nz-toc a.active{ background:#eef4ff; color:#1d5fd1; border-left-color:#2f7bf0; font-weight:700; }
@media (min-width:1400px){ .nz-toc{ display:block; } }

/* barra de progreso de lectura */
.nz-progress{
  position:fixed; top:0; left:0; height:3px; width:0; z-index:2100;
  background:linear-gradient(90deg,#2f7bf0,#7c3aed);
  transition:width .1s linear;
}
