/* P10 cierre: anclas despejadas y CTA en el flujo de lectura. Recursos v1 intactos. */
main.juris-documento [id] {
  scroll-margin-top: calc(var(--st-juris-nav-height, 7rem) + 1rem);
}
main.juris-documento:not([data-st-juris-ux-ready]) .accordion-collapse {
  display: block !important;
  height: auto !important;
}
main.juris-documento .st-juris-consulta {
  margin-block: 1.25rem;
}
main.juris-documento .st-juris-consulta :is(.st-cta-desktop, .st-cta-mobile) {
  opacity: 1; /* CTA visible from first paint and without JavaScript. */
  position: relative;
  inset: auto;
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  z-index: auto;
  transform: none;
}
body.st-cta-pad:has(main.juris-documento .st-juris-consulta) main.juris-documento {
  padding-bottom: 1.5rem !important;
}

/* Complemento focal ROOT de cierre P10: legibilidad de fichas técnicas.
   Aplicar después de v1 y conservar HTML, caption, th scope, td y fuente. */
main.juris-documento .juris-ficha-datos th {
  min-width: 8.5rem;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}
@media (max-width: 35rem) {
  main.juris-documento .juris-ficha-datos :is(table, tbody, tr, th, td) {
    display: block;
    width: auto;
  }
  main.juris-documento .juris-ficha-datos th {
    padding-bottom: 0;
    border-bottom: 0;
  }
  main.juris-documento .juris-ficha-datos td {
    padding-top: .125rem;
  }
}

/* Etiquetas heredadas: primera celda td con strong en tablas de dos columnas.
   Se conserva el marcado y la semántica accesible existente. */
main.juris-documento .juris-ficha-datos tr > td:first-child:has(> strong):not(:last-child) {
  min-width: 8.5rem;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}
@media (max-width: 48rem) {
  main.juris-documento .juris-ficha-datos table:has(tr > td:first-child > strong),
  main.juris-documento .juris-ficha-datos table:has(tr > td:first-child > strong) :is(tbody, tr, td) {
    display: block;
    width: auto;
  }
  main.juris-documento .juris-ficha-datos tr > td:first-child:has(> strong):not(:last-child) {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

/* Preserve the reserved button space; without JS, no inactive close control is shown. */
main.juris-documento:not([data-st-juris-ux-ready]) .st-juris-consulta
  :is(#stCtaCloseDesktop, #stCtaCloseMobile) {
  visibility: hidden;
}
