/* Documentos legales de BP Estudio: hoja compartida, sin recursos externos. */

:root {
  color-scheme: light dark;
  --tinta: #17212d;
  --tinta-suave: #4a5868;
  --papel: #f9fafc;
  --superficie: #ffffff;
  --borde: #d8dee7;
  --acento: #1f5c8f;
  --acento-fondo: #e8f0f8;
  --aviso-fondo: #fff6e0;
  --aviso-borde: #c98a00;
  --aviso-tinta: #5a3d00;
  --marca: #fff2b3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tinta: #f2f6fb;
    --tinta-suave: #b4c0cf;
    --papel: #0d141e;
    --superficie: #141e2b;
    --borde: #2b3848;
    --acento: #8ec5ff;
    --acento-fondo: #16273a;
    --aviso-fondo: #2d2412;
    --aviso-borde: #d9a93a;
    --aviso-tinta: #f5deaa;
    --marca: #4a3f10;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a {
  color: var(--acento);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 3px solid var(--acento);
  outline-offset: 2px;
  border-radius: 2px;
}

.saltar {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--superficie);
  border: 2px solid var(--acento);
  z-index: 10;
}

.saltar:focus {
  left: 1rem;
  top: 1rem;
}

/* Cabecera y pie */

.cabecera,
.pie {
  border-color: var(--borde);
  border-style: solid;
  border-width: 0;
}

.cabecera {
  border-bottom-width: 1px;
  background: var(--superficie);
}

.pie {
  border-top-width: 1px;
  margin-top: 3rem;
  color: var(--tinta-suave);
  font-size: 0.9375rem;
}

.contenedor {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem;
}

.marca {
  display: inline-block;
  font-weight: 700;
  color: var(--tinta);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.marca span {
  color: var(--acento);
}

.docs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}

.docs a[aria-current="page"] {
  color: var(--tinta);
  font-weight: 600;
  text-decoration: none;
}

/* Contenido */

main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 0;
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--tinta);
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.375rem);
  margin: 1.25rem 0 0.5rem;
}

h2 {
  font-size: 1.375rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--borde);
}

h3 {
  font-size: 1.125rem;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.35rem;
}

section[id],
h2[id],
h3[id] {
  scroll-margin-top: 1rem;
}

.meta {
  color: var(--tinta-suave);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.aviso {
  margin: 0 0 1.5rem;
  padding: 0.875rem 1rem;
  border: 2px solid var(--aviso-borde);
  border-left-width: 6px;
  border-radius: 8px;
  background: var(--aviso-fondo);
  color: var(--aviso-tinta);
}

.aviso strong {
  display: block;
  font-size: 1.0625rem;
}

.aviso p {
  margin: 0.25rem 0 0;
}

.nota {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  background: var(--acento-fondo);
  border-left: 4px solid var(--acento);
}

.indice {
  padding: 1rem 1.25rem;
  border: 1px solid var(--borde);
  border-radius: 8px;
  background: var(--superficie);
}

.indice h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
  font-size: 1.0625rem;
}

.indice ol {
  margin: 0;
  padding-left: 1.5rem;
}

.indice li {
  margin-bottom: 0.2rem;
}

.resumen {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background: var(--acento-fondo);
}

.resumen h2 {
  margin-top: 0;
  padding-top: 0;
  border: 0;
}

.resumen ul {
  margin-bottom: 0;
}

.pasos li {
  margin-bottom: 0.75rem;
}

/* Marcadores que el titular debe completar antes de publicar */
.dato {
  background: var(--marca);
  padding: 0 0.2em;
  border-radius: 3px;
  font-weight: 600;
}

/* Tablas */

.tabla {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--borde);
  border-radius: 8px;
  background: var(--superficie);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

caption {
  text-align: left;
  font-weight: 600;
  padding: 0.75rem 1rem 0.25rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--borde);
}

thead th {
  background: var(--acento-fondo);
}

tbody th {
  font-weight: 600;
}

/* En pantallas estrechas cada fila se lee como una ficha */
@media (max-width: 40rem) {
  .tabla--fichas table,
  .tabla--fichas tbody,
  .tabla--fichas tr,
  .tabla--fichas th,
  .tabla--fichas td,
  .tabla--fichas caption {
    display: block;
  }

  .tabla--fichas thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .tabla--fichas tr {
    border-top: 1px solid var(--borde);
    padding: 0.5rem 0;
  }

  .tabla--fichas th,
  .tabla--fichas td {
    border: 0;
    padding: 0.25rem 1rem;
  }

  .tabla--fichas td::before {
    content: attr(data-etiqueta) ": ";
    font-weight: 600;
    color: var(--tinta-suave);
  }
}

@media print {
  .cabecera nav,
  .saltar {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a {
    color: #000;
  }

  .aviso,
  .indice,
  .resumen,
  .tabla,
  .nota {
    border: 1px solid #000;
    background: #fff;
    color: #000;
  }
}

/* Identidad editorial de Biblioteca Pastoral. El documento conserva su
   lectura lineal y no depende de imágenes, scripts ni fuentes externas. */
:root {
  color-scheme: light;
  --tinta: #172b37;
  --tinta-suave: #526470;
  --papel: #f5f4ef;
  --superficie: #fffefb;
  --borde: #d9dfdc;
  --acento: #185d69;
  --acento-fondo: #e9f1ef;
  --marca: #efe4cd;
}

body {
  min-width: 320px;
  background: var(--papel);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.72;
}

.cabecera {
  position: relative;
  overflow: hidden;
  color: #eef7f3;
  background: #142d39;
  border: 0;
}
.cabecera::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: #ca9b59;
}
.cabecera .contenedor {
  max-width: 72rem;
  padding: 1.15rem clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}
.cabecera .marca {
  margin: 0;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}
.cabecera .marca span { color: #d9bd88; }
.docs ul { gap: 0.45rem; }
.docs li { margin: 0; }
.docs a {
  display: inline-block;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  color: #dce9e7;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.35;
}
.docs a:hover,
.docs a[aria-current='page'] {
  color: #142d39;
  background: #e9e1ce;
}

main {
  max-width: 72rem;
  padding: clamp(1.5rem, 4vw, 3.25rem) clamp(1.25rem, 4vw, 3rem) 4rem;
}
.legal-hero {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid #d7deda;
  border-radius: 12px;
  background: #fffefb;
  box-shadow: 0 16px 40px -32px #102e3b6b;
}
.legal-eyebrow {
  margin-bottom: 0.55rem;
  color: #8c6532;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.legal-hero h1 {
  max-width: 18ch;
  margin: 0 0 0.75rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.1rem, 5vw, 4.25rem);
  font-weight: 500;
  letter-spacing: -0.048em;
  line-height: 1.07;
}
.legal-hero .meta { margin: 0; }
main > .resumen,
main > .nota,
main > .legal-hero + p { margin-top: 2rem; }
main > .resumen,
main > .indice,
main > section:not(.resumen),
main > p,
main > .tabla { max-width: 50rem; }
main > section:not(.resumen) {
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--borde);
}
main > section:not(.resumen) h2 {
  margin-top: 0;
  padding: 0;
  border: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}
main > section:not(.resumen) h3 {
  font-size: 1.02rem;
  font-weight: 700;
}
main > p { font-size: 1.05rem; }
.resumen,
.nota {
  border-left: 4px solid #af8550;
  border-radius: 0 8px 8px 0;
  background: #e9f1ef;
}
.resumen { padding: 1.3rem 1.55rem; }
.resumen h2,
.indice h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
}
.indice {
  margin: 2rem 0 2.75rem;
  padding: 1.3rem 1.55rem;
  border-radius: 8px;
  box-shadow: none;
}
.indice ol { columns: 2; column-gap: 2rem; }
.indice li { break-inside: avoid; padding-right: 0.35rem; }
.indice a { text-decoration-color: #91acae; }
.tabla { border-radius: 8px; }
thead th { background: #e9f1ef; }
.pie {
  margin-top: 0;
  background: #142d39;
  color: #cbdad7;
  border: 0;
}
.pie .contenedor { max-width: 72rem; padding: 2rem clamp(1.25rem, 4vw, 3rem); }
.pie a { color: #f1dbc0; }

@media (max-width: 42rem) {
  .cabecera .contenedor { align-items: flex-start; }
  .docs ul { gap: 0.15rem; }
  .docs a { padding: 0.42rem 0.5rem; }
  .indice ol { columns: 1; }
  .legal-hero { padding: 1.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .docs a { transition: background-color 150ms ease, color 150ms ease; }
}
@media print {
  .cabecera, .pie { background: #fff; color: #000; }
  .cabecera .marca, .cabecera .marca span { color: #000; }
  .legal-hero { border: 0; box-shadow: none; padding: 0; }
  main { padding: 0; }
  main > section:not(.resumen) { break-inside: avoid; }
}
main a { overflow-wrap: anywhere; }
