/* ============================================================
   OroTaxi · Política de Privacidad y Términos y Condiciones
   Documento legal público. Diseño sobrio: papel blanco, texto
   negro, un solo acento. Pensado para leerse en el móvil desde
   el enlace de Google Play / App Store y para imprimirse.
   ============================================================ */

:root {
  /* Documento de papel: se declara explícitamente para que los navegadores
     con tema oscuro automático no inviertan los colores y dejen el
     encabezado en negro con el texto ilegible. */
  color-scheme: light;

  --paper: #ffffff;
  --bg: #f6f6f4;
  --text: #1a1a1a;
  --muted: #5f6368;
  --line: #dcdcd8;
  --line-soft: #ececea;
  --accent: #8a5a00; /* ocre oscuro · AA sobre blanco */
  --gold: #d4a017;

  --ff: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-size: 16.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: #6d4700;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--text);
  color: #fff;
  padding: 10px 16px;
  font-weight: 600;
}

.skip:focus {
  left: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 22px;
}

/* ---------- Cabecera ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.topbar::after {
  content: '';
  display: block;
  height: 3px;
  background: var(--gold);
}

.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 30px;
  height: 30px;
}

.brand b {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand span {
  color: var(--muted);
  font-weight: 400;
}

.topnav {
  display: flex;
  gap: 18px;
  font-size: 0.87rem;
}

.topnav a {
  color: #333333;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 0;
}

.topnav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- Encabezado del documento ---------- */

.pagehead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 34px;
}

.pagehead h1 {
  font-size: clamp(1.5rem, 3.6vw, 2.05rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-weight: 700;
  max-width: 26ch;
}

.pagehead p {
  color: var(--muted);
  margin: 0;
  max-width: 68ch;
}

.pagehead .updated {
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

.pagehead .updated b {
  color: var(--text);
}

/* ---------- Cuerpo: índice + documento ---------- */

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding: 36px 0 72px;
}

/* El índice es una tarjeta opaca dentro de su propia columna de la rejilla:
   nunca se superpone al documento. Es compacto a propósito para que quepa
   entero en pantalla y no atrape la rueda del ratón con un scroll interno. */
.toc {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 16px 14px;
  font-size: 0.78rem;
}

.toc h2 {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 700;
}

.toc h2 + ul {
  margin-bottom: 16px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 3px 0 3px 10px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--text);
  text-decoration: none;
  line-height: 1.34;
}

.toc a:hover {
  color: var(--accent);
  border-left-color: var(--gold);
}

.toc ul:last-child {
  margin-bottom: 0;
}

.doc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 44px 52px 56px;
}

/* Título de cada uno de los dos documentos */
.doc h2.doctitle {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 6px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--text);
  scroll-margin-top: 84px;
}

.doc .docintro {
  color: var(--muted);
  margin: 14px 0 30px;
}

.doc h3 {
  font-size: 1.03rem;
  font-weight: 700;
  margin: 34px 0 10px;
  scroll-margin-top: 84px;
}

.doc h4 {
  font-size: 0.97rem;
  font-weight: 700;
  margin: 22px 0 8px;
  color: #2b2b2b;
}

.doc p {
  margin: 0 0 13px;
  text-align: left;
}

.doc ul,
.doc ol {
  margin: 0 0 15px;
  padding-left: 24px;
}

.doc li {
  margin-bottom: 7px;
}

.doc li::marker {
  color: var(--muted);
}

.doc ol.letters {
  list-style: lower-latin;
}

.doc strong {
  font-weight: 650;
}

.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 52px 0 44px;
}

/* Definiciones (partes del contrato) */
.doc dl {
  margin: 0 0 16px;
}

.doc dt {
  font-weight: 700;
  margin-top: 14px;
}

.doc dd {
  margin: 2px 0 0;
}

/* Nota destacada, sin color de fondo fuerte */
.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: #fbfaf7;
  padding: 14px 18px;
  margin: 0 0 18px;
}

.note p:last-child {
  margin-bottom: 0;
}

.note b {
  font-weight: 700;
}

/* Tablas simples */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 18px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 0.93rem;
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

th {
  background: #f4f4f1;
  font-weight: 700;
}

/* Ficha del responsable */
.card-data {
  border: 1px solid var(--line);
  background: #fbfaf7;
  padding: 20px 22px;
  margin: 0 0 16px;
}

.card-data dl {
  display: grid;
  grid-template-columns: minmax(130px, auto) 1fr;
  gap: 6px 18px;
  margin: 0;
}

.card-data dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.card-data dd {
  margin: 0;
}

/* ---------- Pie ---------- */

.foot {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 26px 0 34px;
  font-size: 0.87rem;
  color: var(--muted);
}

.foot__in {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
}

.foot a {
  color: var(--muted);
  font-weight: 600;
}

.totop {
  display: inline-block;
  margin-top: 30px;
  font-size: 0.87rem;
  font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 26px;
  }

  /* Sin columna lateral: el índice pasa a ser un bloque normal al inicio,
     sin sticky ni scroll propio, para que no tape nada al desplazarse. */
  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 18px 20px;
    font-size: 0.86rem;
  }

  .toc a {
    padding: 5px 0 5px 10px;
    line-height: 1.45;
  }

  .doc {
    padding: 28px 22px 36px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding-inline: 16px;
  }

  .topbar__in {
    min-height: 54px;
  }

  .topnav {
    gap: 14px;
    font-size: 0.82rem;
  }

  .card-data dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .card-data dd {
    margin-bottom: 10px;
  }
}

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

@media print {
  .topbar,
  .toc,
  .foot,
  .skip,
  .totop {
    display: none !important;
  }

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

  .layout {
    display: block;
    padding: 0;
  }

  .doc,
  .pagehead {
    border: 0;
    padding: 0;
  }

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

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