/* Centro de ayuda de DocuCheck (estructura heredada de Direxa), en modo lectura. */
.pagina-ayuda { background: var(--papel); }
.barra--ayuda { max-width: none; background: var(--tinta); padding-left: var(--gutter); padding-right: var(--gutter); }
.barra--ayuda nav { margin-left: auto; }

.docs {
  max-width: 88rem; margin: 0 auto; padding: var(--s-6) var(--gutter) var(--s-8);
  display: grid; grid-template-columns: 16.5rem minmax(0, 1fr) 15rem; gap: clamp(var(--s-5), 3.5vw, var(--s-7));
  align-items: start;
}

/* ---------- Índice (izquierda) ---------- */
.indice { position: sticky; top: var(--s-4); max-height: calc(100vh - 2 * var(--s-4)); overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--s-1) 0 0.55rem; scrollbar-width: thin; scrollbar-color: var(--papel-linea) transparent; }
.indice-movil { display: none; }
.indice-buscar input {
  width: 100%; font: 500 0.95rem/1.3 var(--display); color: var(--texto); background: var(--papel-sobre);
  border: 1px solid var(--papel-linea); border-radius: 6px; padding: 0.65rem 0.8rem; min-height: 2.75rem; caret-color: var(--tinta);
}
.indice-buscar input::placeholder { color: #6b7387; }
.indice-vacio { margin-top: var(--s-2); font-size: 0.9rem; color: var(--texto-suave); }
.indice-vacio a { color: var(--tinta); font-weight: 700; }
.indice-grupos { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.indice-grupo > a {
  display: block; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem;
  color: var(--tinta); text-decoration: none; padding-bottom: 0.35rem; border-bottom: 1.5px solid var(--tinta);
}
.indice-grupo ol { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; }
.indice-grupo li a {
  display: block; padding: 0.38rem 0.55rem; margin: 0 0 0 -0.55rem; border-radius: 4px;
  font-size: 0.93rem; line-height: 1.35; color: var(--texto-suave); text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .indice-grupo li a:hover { background: rgba(13, 60, 110, 0.06); color: var(--tinta); } }
.indice-grupo li a[aria-current="location"] { background: var(--tinta); color: var(--papel); font-weight: 600; }

/* ---------- Contenido ---------- */
.contenido { min-width: 0; }
.contenido-cabecera { padding-bottom: var(--s-5); border-bottom: 2px solid var(--tinta); }
.contenido-cabecera h1 { font-weight: 800; font-size: clamp(2.2rem, 1.5rem + 2.2vw, 3.2rem); line-height: 1.05; letter-spacing: -0.025em; color: var(--tinta); }
.contenido-cabecera p { margin-top: var(--s-3); font-size: 1.12rem; color: var(--texto-suave); max-width: 42rem; }
.contenido a { color: var(--tinta); font-weight: 600; }
.tema { padding-top: var(--s-6); }
.tema > h2 {
  font-weight: 800; font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.25rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--tinta);
  max-width: none; scroll-margin-top: var(--s-4);
}
.tema-intro { margin-top: var(--s-3); color: var(--texto-suave); max-width: 44rem; }
.tema article { padding-top: var(--s-5); scroll-margin-top: var(--s-4); max-width: 46rem; }
.tema article + article { margin-top: var(--s-2); }
.tema h3 { font-size: 1.28rem; line-height: 1.25; color: var(--tinta); }
.tema p, .tema li, .tema td { color: #39455f; }
.tema p { margin-top: var(--s-2); }
.tema ul, .tema ol { margin: var(--s-2) 0 0; padding-left: 1.25rem; display: grid; gap: var(--s-1); }
.tema li::marker { color: var(--tinta); font-weight: 700; }
.tema strong { color: var(--texto); }
.tema em { font-style: normal; font-weight: 600; color: var(--texto); }
.tema q { quotes: "«" "»"; color: var(--texto); }
.tema .boton { margin-top: var(--s-4); }
.lista-chequeo { list-style: none; padding-left: 0 !important; }
.lista-chequeo li { position: relative; padding-left: 1.9rem; }
.lista-chequeo li::before { content: ""; position: absolute; left: 0; top: 0.3rem; width: 0.95rem; height: 0.95rem; border: 2px solid var(--tinta); border-radius: 2px; }

.tabla-desplazable { margin-top: var(--s-3); overflow-x: auto; border: 1px solid var(--papel-linea); border-radius: 6px; background: var(--papel-sobre); }
.tabla-desplazable table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tabla-desplazable th, .tabla-desplazable td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--papel-linea); }
.tabla-desplazable thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--tinta); background: rgba(13, 60, 110, 0.05); }
.tabla-desplazable tbody tr:last-child > * { border-bottom: 0; }
.tabla-desplazable th[scope="row"] { font-weight: 600; color: var(--texto); }

.figura { margin: var(--s-4) 0 0; background: var(--papel-sobre); padding: 8px; border-radius: 6px; box-shadow: 0 16px 34px -26px rgba(13, 60, 110, 0.6), 0 1px 3px rgba(13, 60, 110, 0.18); }
.figura img { border-radius: 3px; border: 1px solid var(--papel-linea); }

/* ---------- Navegación (derecha) ---------- */
.navegacion { position: sticky; top: var(--s-4); }
.navegacion-titulo { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; color: var(--tinta); }
.navegacion-lista { list-style: none; margin: var(--s-2) 0 0; padding: 0 0 0 0.75rem; display: grid; gap: 0.15rem; position: relative; }
.navegacion-lista::before { content: ""; position: absolute; left: 0; top: 0.2rem; bottom: 0.2rem; width: 1px; background: var(--papel-linea); }
.navegacion-lista a { display: block; padding: 0.3rem 0; font-size: 0.9rem; line-height: 1.35; color: var(--texto-suave); text-decoration: none; position: relative; }
.navegacion-lista a:hover { color: var(--tinta); }
.navegacion-lista a[aria-current="location"] { color: var(--tinta); font-weight: 700; }
.navegacion-lista a[aria-current="location"]::before { content: ""; position: absolute; left: -0.75rem; top: 0.45rem; width: 5px; height: 5px; margin-left: -2px; border-radius: 50%; background: var(--ambar); box-shadow: 0 0 0 2px var(--papel); }
.navegacion-pasos { display: grid; gap: var(--s-1); margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--papel-linea); }
.navegacion-pasos a { display: grid; text-decoration: none; padding: 0.45rem 0; }
.navegacion-pasos span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texto-suave); }
.navegacion-pasos strong { color: var(--tinta); font-size: 0.95rem; }
.navegacion-ayuda { margin-top: var(--s-4); padding: var(--s-3); background: var(--tinta); color: var(--papel); border-radius: 6px; display: grid; gap: var(--s-1); }
.navegacion-ayuda p { font-size: 0.9rem; color: var(--sobre-tinta); }
.navegacion-ayuda strong { color: var(--papel); }
.navegacion-ayuda .boton { margin-top: var(--s-1); justify-self: start; }

/* ---------- Pie ---------- */
.pagina-ayuda .pie { background: var(--tinta); position: relative; }
/* Perforación del pliego: une la página de lectura con el mundo de la landing. */
.barra--ayuda { position: relative; }
.barra--ayuda::after, .pagina-ayuda .pie::before {
  content: ""; position: absolute; left: 0; right: 0; height: 12px;
  background: radial-gradient(circle at 50% 50%, var(--papel) 4.5px, transparent 5px) 0 0 / 18px 12px repeat-x;
}
.barra--ayuda::after { bottom: -6px; }
.pagina-ayuda .pie::before { top: -6px; background-image: radial-gradient(circle at 50% 50%, var(--tinta) 4.5px, transparent 5px); }

/* ---------- Responsive ---------- */
@media (max-width: 30rem) { .barra--ayuda .marca-texto small { display: none; } }
@media (max-width: 72rem) {
  .docs { grid-template-columns: 15rem minmax(0, 1fr); }
  .navegacion { display: none; }
}
@media (max-width: 52rem) {
  .docs { grid-template-columns: 1fr; padding-top: var(--s-4); }
  .indice { position: static; max-height: none; overflow: visible; padding: 0; }
  .indice-movil { display: block; }
  .indice-movil > summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    font-weight: 700; color: var(--tinta); background: var(--papel-sobre); border: 1px solid var(--papel-linea); border-radius: 6px; padding: 0.8rem 1rem; min-height: 3rem;
  }
  .indice-movil > summary::-webkit-details-marker { display: none; }
  .indice-movil > summary::after { content: ""; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--tinta); border-bottom: 2px solid var(--tinta); transform: rotate(45deg) translateY(-3px); transition: transform 200ms var(--ease-out); }
  .indice-movil[open] > summary::after { transform: rotate(-135deg); }
  .js .indice-cuerpo { display: none; }
  .js .indice-movil[open] + .indice-cuerpo { display: block; padding-top: var(--s-3); }
}
