/* =============================================================
   DeedToGo — Legal pages (Terms · Privacy · Cookies · Data Disclaimer)
   + intersticial de aceptación, pie legal y avisos de consentimiento.

   Se carga SOLO donde hace falta, vía LegalHelper#legal_stylesheet_tag
   (content_for :head, data-turbo-track="dynamic": Turbo la agrega al entrar
   y la quita al salir, sin full reload).

   Reglas de la casa que este archivo respeta (las vigilan los guards):
   · Colores SOLO por tokens existentes de application.css (sin :root propio):
     ya tienen sus dos gemelos oscuros, así que el modo oscuro sale gratis.
   · Tamaños SOLO var(--type-*); tracking positivo solo 0.1em.
   · Verde como TINTA = --accent-text; sobre navy toda tinta es --on-navy.
   · Sin opacity sobre texto: lo que se oculta usa visibility.
   ============================================================= */

/* ── Utilidades ─────────────────────────────────────────────── */
/* Anillo de foco en superficies CLARAS: #43B573 (el anillo global) da 2.6:1 sobre blanco
   y 2.4:1 sobre --surface-0, debajo del 3:1 de WCAG 1.4.11. Mismo criterio que
   .dtg-dialog__btn / .load-error__btn / .ctb-unlock-btn. SOLO superficies claras:
   .legal-gate y .legal-footer--navy van sobre navy, donde --ink-1 sería navy sobre navy;
   ahí queda el anillo global (6.5:1). :where() = especificidad 0: gana al global por
   orden de carga y pierde contra los anillos propios de cada componente. */
:where(.legal-page, .legal-gate__card, .legal-footer--light, .auth-page__form-wrap, .auth-legal-note, .legal-card) :focus-visible,
.legal-consent-link:focus-visible { outline-color: var(--ink-1); }

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

/* Enlaces de consentimiento (registro, intersticial, aviso de Google). */
.legal-consent-link {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.legal-consent-link:hover { color: var(--ink-1); }

/* Aviso bajo "Continue with Google" (sign-in y sign-up). */
.auth-legal-note {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: var(--type-xs);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ── Página de documento ───────────────────────────────────── */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-0);
  color: var(--ink-1);
  font-family: var(--font-sans);
}

.legal-skip {
  position: absolute;
  left: 16px;
  top: -200px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--surface-1);
  color: var(--ink-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--type-ui);
  font-weight: 600;
  line-height: 1.3;
}
.legal-skip:focus { top: 12px; }

/* Cabecera: logo + acción, y debajo las pestañas de documentos. */
.legal-topbar {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}
.legal-topbar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.legal-brand { display: inline-flex; line-height: 0; }
.legal-brand svg { height: 28px; width: auto; max-width: 100%; display: block; }
/* El cuadrito del lockup se invierte en oscuro (mismos tokens que el header de la app). */
.legal-brand .dtg-mark-tile { fill: var(--logo-tile); }
.legal-brand .dtg-mark-d    { fill: var(--logo-tile-ink); }

.legal-topbar__action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--type-ui);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-1);
  white-space: nowrap;
}
.legal-topbar__action:hover { color: var(--accent-text); border-color: var(--border-strong); }

/* Pestañas: 2×2 en el teléfono (las tiras no deslizan), fila en pantallas anchas. */
.legal-tabs { border-top: 1px solid var(--border); }
.legal-tabs__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.legal-tabs__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  text-align: center;
  font-size: var(--type-ui);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
}
.legal-tabs__tab:hover { color: var(--ink-1); }
.legal-tabs__tab[aria-current="page"] {
  color: var(--ink-1);
  border-bottom-color: var(--accent-text);
}

/* Cuerpo: columna de lectura + índice fijo a la izquierda en pantallas anchas. */
.legal-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "doc";
}
.legal-doc {
  grid-area: doc;
  min-width: 0;
  max-width: 68ch;
  font-size: var(--type-lg);
  overflow-wrap: anywhere;
}

.legal-doc__title {
  margin: 0 0 10px;
  font-size: var(--type-h1);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink-1);
  overflow-wrap: normal;
}
.legal-doc__meta {
  margin: 0;
  font-size: var(--type-sm);
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-3);
}
.legal-doc__lang-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--type-md);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-2);
}
.legal-doc__lang-notice .icon { flex: 0 0 auto; margin-top: 1px; color: var(--ink-3); }

/* "In short" — resumen en lenguaje llano. */
.legal-summary {
  margin: 28px 0 0;
  padding: 18px 20px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
}
.legal-summary__title {
  margin: 0 0 8px;
  font-size: var(--type-eyebrow);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--accent-text);
}
.legal-summary__body p {
  margin: 0 0 10px;
  font-size: var(--type-lg);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-1);
}
.legal-summary__body p:last-child { margin-bottom: 0; }
.legal-summary__note {
  margin: 12px 0 0;
  font-size: var(--type-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-3);
}

/* Índice — mismo contenido en dos envases: <details> en el teléfono, columna fija
   en escritorio. Solo uno se muestra (display:none lo saca del árbol accesible). */
.legal-toc__list { list-style: none; margin: 0; padding: 0; }
.legal-toc__item + .legal-toc__item { margin-top: 2px; }
.legal-toc__link {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--type-md);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-2);
}
.legal-toc__link:hover { background: var(--surface-2); color: var(--ink-1); }
.legal-toc__num {
  flex: 0 0 auto;
  min-width: 1.6em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.legal-toc--inline {
  margin: 24px 0 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.legal-toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
  font-size: var(--type-md);
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-1);
}
.legal-toc__summary::-webkit-details-marker { display: none; }
.legal-toc__summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  margin-top: -4px;
}
.legal-toc--inline[open] .legal-toc__summary::after { transform: rotate(-135deg); margin-top: 4px; }
.legal-toc--inline .legal-toc__list { padding: 0 8px 12px; }
/* En el teléfono el índice es una lista táctil: 44px por enlace (18px de texto + 26). */
.legal-toc--inline .legal-toc__link { padding: 13px 8px; }

.legal-toc--side { display: none; grid-area: toc; }
.legal-toc__title {
  margin: 0 0 8px;
  padding: 0 8px;
  font-size: var(--type-eyebrow);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Secciones numeradas. */
.legal-doc__body { margin-top: 8px; }
.legal-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 16px;
}
.legal-section__heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  font-size: var(--type-h4);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink-1);
  overflow-wrap: normal;
}
.legal-section__num {
  flex: 0 0 auto;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
.legal-section__anchor {
  visibility: hidden;
  margin-left: auto;
  padding: 0 4px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
}
.legal-section__heading:hover .legal-section__anchor,
.legal-section:target .legal-section__anchor { visibility: visible; }

/* El Data Disclaimer no tiene secciones: un solo encabezado sin número. */
.legal-doc__heading {
  margin: 28px 0 14px;
  font-size: var(--type-h4);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink-1);
}

.legal-doc__p,
.legal-doc__list li {
  font-size: var(--type-lg);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-2);
}
.legal-doc__p { margin: 0 0 14px; }
.legal-doc__h3 {
  margin: 22px 0 8px;
  font-size: var(--type-lg);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-1);
}
.legal-doc__list { margin: 0 0 14px; padding-left: 1.25em; }
.legal-doc__list li { margin-bottom: 6px; }
.legal-doc__list li::marker { color: var(--ink-3); }

.legal-doc__callout {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--rule-section);
  border-radius: var(--radius-sm);
}
.legal-doc__callout p {
  margin: 0;
  font-size: var(--type-lg);
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink-1);
}

.legal-doc__body a,
.legal-summary a,
.legal-doc__contact a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.legal-doc__body a:hover,
.legal-summary a:hover,
.legal-doc__contact a:hover { color: var(--ink-1); }
.legal-doc__body .legal-section__anchor { color: var(--ink-3); text-decoration: none; }
/* "Back to top" es navegación, no un enlace de texto: sin el verde subrayado del contacto. */
.legal-doc__contact .legal-backtotop { color: var(--ink-1); text-decoration: none; }
.legal-doc__contact .legal-backtotop:hover { color: var(--accent-text); }
.legal-doc strong { font-weight: 700; color: var(--ink-1); }

/* Tablas: scrollean DENTRO de su caja, nunca la página. */
.legal-doc__table-wrap {
  margin: 16px 0 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}
.legal-doc__table-wrap:focus-visible { outline: 2px solid var(--ink-1); outline-offset: 2px; }
.legal-doc__table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: var(--type-md);
  line-height: 1.5;
  overflow-wrap: normal;
}
.legal-doc__table th {
  padding: 10px 12px;
  text-align: left;
  vertical-align: bottom;
  font-weight: 700;
  color: var(--ink-1);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.legal-doc__table td {
  padding: 10px 12px;
  vertical-align: top;
  font-weight: 400;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
  overflow-wrap: break-word;
}
.legal-doc__table tr:last-child td { border-bottom: 0; }
/* Teléfono: 520px no entran en ~356 y la columna "Type" de la tabla de cookies quedaba
   entera fuera de vista, sin ninguna señal visible de scroll. Cada fila se apila como
   tarjeta etiqueta/valor; la etiqueta sale del data-label que pone LegalHelper#legal_table
   (los roles explícitos de la tabla conservan la semantica con display:block). */
@media (max-width: 559.98px) {
  .legal-doc__table-wrap { overflow-x: visible; }
  .legal-doc__table { min-width: 0; }
  .legal-doc__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .legal-doc__table,
  .legal-doc__table tbody,
  .legal-doc__table tr,
  .legal-doc__table td { display: block; }
  .legal-doc__table tr { padding: 6px 0; border-bottom: 1px solid var(--border); }
  .legal-doc__table tr:last-child { border-bottom: 0; }
  .legal-doc__table td { padding: 4px 12px; border-bottom: 0; }
  .legal-doc__table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    color: var(--ink-1);
  }
}

.legal-doc__unavailable {
  margin: 28px 0 0;
  padding: 14px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--type-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-2);
}

/* Pie del documento: contacto + volver arriba. */
.legal-doc__contact {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-section);
}
.legal-doc__contact-title {
  margin: 0 0 6px;
  font-size: var(--type-lg);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-1);
}
.legal-doc__contact p {
  margin: 0;
  font-size: var(--type-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-2);
}
.legal-backtotop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 12px;
  font-size: var(--type-ui);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-1);
}
.legal-backtotop:hover { color: var(--accent-text); }

@media (min-width: 640px) {
  .legal-topbar__inner { padding: 14px 24px; }
  .legal-tabs__inner { display: flex; gap: 4px; padding: 0 24px; }
  .legal-tabs__tab { justify-content: flex-start; padding: 10px 12px; }
  .legal-main { padding: 40px 24px 56px; }
  .legal-doc__title { font-size: var(--type-display); letter-spacing: -0.03em; }
}

@media (min-width: 1024px) {
  .legal-layout--toc {
    grid-template-columns: 232px minmax(0, 1fr);
    grid-template-areas: "toc doc";
    column-gap: 56px;
  }
  .legal-toc--side {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    /* Un índice de 20+ entradas scrollea solo: la barra clásica de Windows (17px gris)
       pesaba más que el propio índice. */
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
  }
  .legal-toc--inline { display: none; }
}

/* ── Pie legal compartido (auth, intersticiales, documentos) ─── */
.legal-footer { width: 100%; }
.legal-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 28px;
  text-align: center;
}
.legal-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 14px;
}
.legal-footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: var(--type-sm);
  font-weight: 600;
  line-height: 1.5;
}
.legal-footer__copy {
  margin: 4px 0 0;
  font-size: var(--type-sm);
  font-weight: 400;
  line-height: 1.5;
}
.legal-footer--light a { color: var(--ink-2); }
.legal-footer--light a:hover { color: var(--accent-text); }
.legal-footer--light .legal-footer__copy { color: var(--ink-3); }
.legal-footer--navy a,
.legal-footer--navy .legal-footer__copy { color: var(--on-navy); }
.legal-footer--navy a:hover { text-decoration: underline; }
.legal-page .legal-footer { border-top: 1px solid var(--border); background: var(--surface-1); }
/* Dentro del form-wrap de auth: va pegado a la tarjeta, sin su propio gutter. */
.auth-page__form-wrap .legal-footer__inner { padding: 8px 0 0; }

/* ── Intersticial de aceptación (pages/terms_required) ───────── */
.legal-gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--surface-navy);
  font-family: var(--font-sans);
}
.legal-gate__brand { line-height: 0; margin-bottom: 24px; }
.legal-gate__brand svg { height: 40px; width: auto; display: block; }
/* El mismo lockup en pages/subscription_required (que conserva sus estilos inline):
   sin este tope el SVG se pinta a su ancho nativo de 742px. */
.legal-gate-logo { height: 40px; width: auto; max-width: 100%; display: inline-block; }
.legal-gate__card {
  width: 100%;
  max-width: 560px;
  padding: 28px 20px 22px;
  background: var(--surface-1);
  border: 1px solid var(--elevation-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.legal-gate__eyebrow {
  margin: 0 0 6px;
  font-size: var(--type-eyebrow);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--accent-text);
}
.legal-gate__title {
  margin: 0 0 8px;
  font-size: var(--type-h2);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  color: var(--ink-1);
}
.legal-gate__lead {
  margin: 0 0 18px;
  font-size: var(--type-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-2);
}
.legal-gate__notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--warning-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--on-warning-soft);
}
.legal-gate__notice .icon { flex: 0 0 auto; margin-top: 1px; }
.legal-gate__notice p {
  margin: 0;
  font-size: var(--type-md);
  font-weight: 600;
  line-height: 1.45;
  color: var(--on-warning-soft);
}

.legal-gate__docs {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.legal-gate__doc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}
.legal-gate__doc + .legal-gate__doc { border-top: 1px solid var(--border); }
.legal-gate__doc-icon { flex: 0 0 auto; line-height: 0; color: var(--ink-3); }
.legal-gate__doc-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.legal-gate__doc-title {
  font-size: var(--type-md);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-1);
}
.legal-gate__doc-desc {
  font-size: var(--type-sm);
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-3);
}
.legal-gate__doc-read {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--type-ui);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-1);
  white-space: nowrap;
}
.legal-gate__doc-read:hover { color: var(--accent-text); border-color: var(--border-strong); }

.legal-gate__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--type-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-1);
}
.legal-gate__consent.is-invalid { border-color: var(--danger); }
.legal-gate__check {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.legal-gate__receipt {
  margin: 8px 0 16px;
  font-size: var(--type-xs);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-3);
}
.legal-gate__signout { margin-top: 10px; text-align: center; }
.legal-gate__signout a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: var(--type-ui);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-3);
}
.legal-gate__signout a:hover { color: var(--ink-1); }

@media (min-width: 640px) {
  .legal-gate__card { padding: 36px 36px 26px; }
}

/* ── Tarjeta "Legal & privacy" de Ajustes (research/settings/_legal_card) ── */
.legal-card__facts { margin: 0; display: grid; gap: 14px; }
.legal-card__fact { display: grid; gap: 2px; }
.legal-card__fact dt {
  font-size: var(--type-ui);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-3);
}
.legal-card__fact dd {
  margin: 0;
  font-size: var(--type-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-1);
}
.legal-card__outdated {
  display: block;
  margin-top: 4px;
  font-size: var(--type-sm);
  line-height: 1.5;
  color: var(--ink-2);
}
.legal-card__docs {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.legal-card a {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.legal-card a:hover { color: var(--ink-1); }
.legal-card__requests {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: var(--type-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-2);
}
@media (min-width: 640px) {
  .legal-card__fact { grid-template-columns: 180px minmax(0, 1fr); gap: 12px; align-items: baseline; }
}

/* ── Impresión: solo el documento, en tinta de marca invariante ── */
@media print {
  .legal-skip,
  .legal-topbar,
  .legal-toc,
  .legal-backtotop,
  .legal-footer,
  .legal-section__anchor { display: none !important; }

  .legal-page { background: none; }
  .legal-main { max-width: none; padding: 0; }
  .legal-layout { display: block; }
  .legal-doc { max-width: none; color: var(--brand-navy); }
  /* En tema oscuro las tintas son claras: sobre papel blanco no se leerían. */
  .legal-doc * { color: inherit !important; background: none !important; }
  .legal-summary,
  .legal-doc__callout,
  .legal-doc__table-wrap { border-color: var(--brand-navy) !important; }
  .legal-doc__table-wrap { overflow: visible; }
  .legal-doc__table { min-width: 0; }
  .legal-section { break-inside: auto; }
  .legal-section__heading,
  .legal-doc__h3 { break-after: avoid; }
}
