/* Páginas legales que arma el servidor (paginaLegal() en src/legal/textos.ts): aviso de privacidad del conjunto,
   términos del servicio y páginas de estado («en preparación»). Va después de marca.css. */

body { min-height: 100dvh; display: flex; flex-direction: column; }

.barra-legal {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 8px max(16px, env(safe-area-inset-left));
  padding-top: max(8px, env(safe-area-inset-top));
  background: var(--md-sys-color-surface-container);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.nombre-conjunto {
  min-width: 0;
  font-size: var(--md-sys-typescale-title-medium-size);
  line-height: var(--md-sys-typescale-title-medium-line-height);
  letter-spacing: var(--md-sys-typescale-title-medium-tracking);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legal {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.legal h1 {
  font-size: var(--md-sys-typescale-headline-medium-size);
  line-height: var(--md-sys-typescale-headline-medium-line-height);
  margin-bottom: 4px;
}
.legal h2 {
  font-size: var(--md-sys-typescale-title-large-size);
  line-height: var(--md-sys-typescale-title-large-line-height);
  margin-top: 20px;
}
.legal h3 { font-size: var(--md-sys-typescale-title-medium-size); margin-top: 12px; }
.legal section { display: flex; flex-direction: column; gap: 10px; }
.legal p, .legal li {
  font-size: var(--md-sys-typescale-body-large-size);
  line-height: var(--md-sys-typescale-body-large-line-height);
  color: var(--md-sys-color-on-surface-variant);
}
.legal p strong, .legal li strong { color: var(--md-sys-color-on-surface); font-weight: 500; }
.legal ul, .legal ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.legal .secundario { font-size: var(--md-sys-typescale-body-medium-size); line-height: var(--md-sys-typescale-body-medium-line-height); }
.legal .nota {
  padding: 12px 16px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-warning-container);
  color: var(--md-sys-color-on-warning-container);
  font-size: var(--md-sys-typescale-body-medium-size);
}
.legal a:not(.boton) { color: var(--md-sys-color-primary); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

.pie-marca {
  display: flex;
  justify-content: center;
  padding: 20px 16px max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

@media (min-width: 600px) {
  .barra-legal { padding-inline: 24px; }
  .legal { padding: 48px 24px 64px; }
  .legal h1 { font-size: var(--md-sys-typescale-headline-large-size); line-height: var(--md-sys-typescale-headline-large-line-height); }
}

@media print {
  .barra-legal { position: static; background: none; }
  .barra-legal .boton, .pie-marca { display: none; }
  .legal p, .legal li { color: #000; }
}
