/* Documentos legales en HTML (/legal/<documento>). Mismo lenguaje que la página de venta y el
   ingreso: monocromático (blanco y tinta), tipografía del sistema (el CSP del borde bloquea las
   fuentes externas), sin modo oscuro. Una columna de unos 65 caracteres, pensada para el teléfono. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-sunken: #f5f6f8;
  --ink: #16181c;
  --ink-2: #5b6068;
  --line: #e3e5e9;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: var(--ink); text-underline-offset: .15em; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

.barra { max-width: 48rem; margin: 0 auto; padding: 1rem 1.25rem 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.marca-barra { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.volver { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; color: var(--ink-2); text-decoration: none; }
.volver:hover { color: var(--ink); text-decoration: underline; }

.doc { max-width: 48rem; margin: 0 auto; padding: .5rem 1.25rem 3rem; }
.doc > * { max-width: 65ch; }
.doc > .tabla { max-width: none; }

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.015em; margin: 2.25rem 0 .75rem; text-wrap: balance; }
h1 { font-size: 1.875rem; font-weight: 700; margin-top: .75rem; letter-spacing: -.025em; }
h2 { font-size: 1.375rem; font-weight: 650; padding-top: 1.25rem; border-top: 1px solid var(--line); }
h1 + h2, h1 + p + h2 { border-top: 0; }
h3 { font-size: 1.125rem; font-weight: 650; }
h4 { font-size: 1rem; font-weight: 650; color: var(--ink-2); }

p { margin: 0 0 1rem; }
strong { font-weight: 650; }
ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }
li { margin: .35rem 0; padding-left: .25rem; }
li > ul, li > ol { margin: .35rem 0 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
blockquote { margin: 0 0 1rem; padding: .25rem 0 .25rem 1rem; border-left: 3px solid var(--line); color: var(--ink-2); }
blockquote p:last-child { margin-bottom: 0; }
code { font: .9em var(--mono); background: var(--bg-sunken); border-radius: 6px; padding: .1em .35em; }
pre { background: var(--bg-sunken); border-radius: 12px; padding: 1rem; overflow-x: auto; margin: 0 0 1rem; }
pre code { background: none; padding: 0; }

/* Tablas: en pantalla ancha, una tabla normal; en el teléfono cada fila se apila y cada celda
   muestra el encabezado de su columna (el HTML lo trae en data-label). */
.tabla { margin: 0 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
th { background: var(--bg-sunken); font-weight: 650; }
@media (max-width: 40rem) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 .75rem; overflow: hidden; }
  td { border-bottom: 1px solid var(--line); padding: .6rem .9rem; }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); display: block; font-size: .8125rem; font-weight: 650; color: var(--ink-2); margin-bottom: .1rem; }
  td[data-label=""]::before { display: none; }
}

.pie { max-width: 48rem; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .875rem; }

@media (min-width: 40rem) {
  body { font-size: 1.125rem; }
  h1 { font-size: 2.25rem; }
  .barra, .doc { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media print {
  .barra { display: none; }
  body { font-size: 11pt; }
}
