/* Fuentes alojadas en el propio sitio (sin Google Fonts). */
@font-face { font-family: "Inter"; src: url("/fonts/Inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/fonts/Sora-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/fonts/Sora-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/*
  Lavauto · estilos compartidos de los documentos legales
  Páginas: privacidad.html, terminos.html, terminos-negocios.html, borrar-cuenta.html

  Marca: tinta #070B18 · aqua #00E5FF · azul #2F6BFF · violeta #7B3CFF · nube #F4F6FB
  Tipografía: Sora (títulos) e Inter (texto), con respaldo en fuentes del sistema.

  Nota de redacción (art. 85 LFPC): el texto de las cláusulas usa un solo tamaño de
  letra; no reduzca el tamaño de ninguna cláusula ni la oculte en "letra chica".
*/

:root {
  color-scheme: light dark;

  --ink: #070B18;
  --aqua: #00E5FF;
  --azul: #2F6BFF;
  --violeta: #7B3CFF;
  --nube: #F4F6FB;
  --gradient: linear-gradient(90deg, #00E5FF 0%, #2F6BFF 55%, #7B3CFF 100%);

  /* Tema claro */
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #F6F8FD;
  --text: #070B18;
  --muted: #4A5368;
  --border: #DCE2EE;
  --link: #1F4FD6;          /* azul de marca oscurecido: contraste AA sobre blanco */
  --link-hover: #6A2FE8;    /* violeta oscurecido: contraste AA sobre blanco */
  --accent: #1F4FD6;
  --accent-soft: rgba(47, 107, 255, 0.07);
  --focus: #2F6BFF;
  --step-bg: #070B18;
  --step-fg: #00E5FF;

  /* Marcadores de datos pendientes: fondo amarillo y texto entre corchetes */
  --ph-bg: #FFE45C;
  --ph-text: #070B18;
  --ph-edge: #D9B300;

  --radius: 14px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070B18;
    --surface: #0C1224;
    --surface-2: #111A31;
    --text: #E7EBF5;
    --muted: #A6B0C8;
    --border: #232D47;
    --link: #00E5FF;
    --link-hover: #9DB8FF;
    --accent: #00E5FF;
    --accent-soft: rgba(0, 229, 255, 0.07);
    --focus: #00E5FF;
    --step-bg: #00E5FF;
    --step-fg: #070B18;
    --ph-bg: #FFE45C;
    --ph-text: #070B18;
    --ph-edge: #FFE45C;
  }
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  max-width: none;          /* anula el estilo mínimo de respaldo incluido en cada página */
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

/* ---------- Encabezado de sitio ---------- */

.site-header {
  background: var(--ink);
  color: #FFFFFF;
}

.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--gradient);
}

.site-header .wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand svg {
  flex: none;
  display: block;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-nav a {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #C8D2EA;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.doc-nav a:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: #FFFFFF;
}

.doc-nav a[aria-current="page"] {
  border-color: var(--aqua);
  background: var(--aqua);
  color: var(--ink);
  font-weight: 600;
}

.site-header :focus-visible {
  outline-color: var(--aqua);
}

/* ---------- Documento ---------- */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 24px;
}

.paper {
  padding: clamp(20px, 5vw, 48px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.doc-head {
  margin-bottom: 8px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-family: var(--font-head);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.05rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta strong {
  color: var(--text);
  font-weight: 600;
}

.doc section {
  scroll-margin-top: 16px;
}

.doc h2 {
  margin: 2.3em 0 0.6em;
  font-size: 1.38rem;
}

.doc h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 12px;
  border-radius: 2px;
  background: var(--gradient);
}

.doc h3 {
  margin: 1.6em 0 0.5em;
  font-size: 1.1rem;
}

.doc h4 {
  margin: 1.3em 0 0.4em;
  font-size: 1rem;
}

.doc p {
  margin: 0 0 0.95em;
}

.doc ul,
.doc ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.doc li {
  margin: 0 0 0.45em;
}

.doc li > ul,
.doc li > ol {
  margin-top: 0.45em;
}

.doc .meta {
  margin: 0;
  padding-left: 0;
}

.doc .meta li {
  margin: 0;
}

ol.alpha {
  list-style-type: lower-alpha;
}

ol.roman {
  list-style-type: upper-roman;
}

.num {
  margin-right: 0.3em;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.doc dl {
  margin: 0 0 1em;
}

.doc dt {
  margin-top: 0.85em;
  font-weight: 600;
}

.doc dd {
  margin: 0.15em 0 0;
}

hr {
  height: 1px;
  margin: 2em 0;
  border: 0;
  background: var(--border);
}

/* ---------- Índice ---------- */

.toc {
  margin: 28px 0 8px;
  padding: 18px 20px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.toc-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc ol,
.toc ul {
  margin: 0;
  padding-left: 1.6em;
  columns: 2 250px;
  column-gap: 32px;
}

/* Índice sin numeración automática (cuando el texto ya trae el número de cláusula) */
.toc ul {
  padding-left: 0;
  list-style: none;
}

.toc li {
  margin: 0 0 6px;
  padding-left: 2px;
  break-inside: avoid;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* ---------- Recuadros ---------- */

.keybox {
  margin: 26px 0 8px;
  padding: clamp(18px, 4vw, 28px);
  border: 2px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--gradient) border-box;
}

.keybox h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.keybox .keybox-note {
  color: var(--muted);
}

.keybox > :last-child,
.keybox dl > dd:last-child {
  margin-bottom: 0;
}

.callout {
  margin: 1.4em 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--azul);
  border-radius: 12px;
  background: var(--accent-soft);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-title {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-weight: 600;
}

/* ---------- Marcadores de datos pendientes ---------- */

.ph {
  padding: 0.05em 0.35em;
  border-radius: 4px;
  background: var(--ph-bg);
  box-shadow: inset 0 -1px 0 var(--ph-edge);
  color: var(--ph-text);
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Elementos de interfaz citados en el texto ---------- */

.ui {
  padding: 0.05em 0.45em;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Tablas ---------- */

.table-wrap {
  margin: 1.1em 0 1.5em;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--surface-2);
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 600;
}

tbody tr:last-child > * {
  border-bottom: 0;
}

td > :last-child {
  margin-bottom: 0;
}

/* Tablas que se apilan en pantallas angostas (cada celda lleva data-label) */
@media (max-width: 560px) {
  table.stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  table.stack tr {
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
  }

  table.stack tbody tr:last-child {
    border-bottom: 0;
  }

  table.stack td {
    display: block;
    padding: 6px 14px;
    border: 0;
  }

  table.stack td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
  }
}

/* ---------- Pasos numerados ---------- */

ol.steps {
  margin: 0 0 1.2em;
  padding-left: 0;
  list-style: none;
  counter-reset: paso;
}

ol.steps > li {
  position: relative;
  min-height: 32px;
  margin-bottom: 14px;
  padding-left: 46px;
  counter-increment: paso;
}

ol.steps > li::before {
  content: counter(paso);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--step-bg);
  color: var(--step-fg);
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
}

/* ---------- Pie de página ---------- */

.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 20px 48px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 10px;
}

.site-footer p {
  margin: 0 0 6px;
}

/* ---------- Pantallas angostas ---------- */

@media (max-width: 600px) {
  body {
    font-size: 1rem;
    line-height: 1.65;
  }

  main {
    padding: 18px 16px 20px;
  }

  .site-header .wrap {
    padding: 12px 16px;
  }

  .doc-nav a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .paper {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .toc ol,
  .toc ul {
    columns: 1;
  }

  .site-footer {
    padding: 8px 16px 40px;
  }
}

/* ---------- Impresión ---------- */

@media print {
  :root {
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --surface-2: #FFFFFF;
    --text: #000000;
    --muted: #333333;
    --border: #BBBBBB;
    --link: #000000;
    --link-hover: #000000;
    --accent: #000000;
    --accent-soft: transparent;
  }

  body {
    background: #FFFFFF;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  .site-header,
  .skip-link,
  .toc,
  .site-footer nav {
    display: none !important;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .paper {
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .keybox {
    border: 1px solid #000000;
    background: #FFFFFF;
  }

  .doc h2::before {
    display: none;
  }

  h2,
  h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  a {
    color: #000000;
    text-decoration: none;
  }

  .ph {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .table-wrap {
    overflow: visible;
  }
}

/* La marca regresa a la página principal. */
a.brand { color: inherit; text-decoration: none; }
a.brand:hover { opacity: .85; }
