/*
 * Foglio di stile condiviso per tutte le pagine legali (public/legal/*.html).
 * Applicato a runtime da lib/legalService.js — non modifica il testo dei documenti.
 * Palette e tipografia coerenti con il resto dell'ecosistema (landing/admin).
 */

:root {
  --legal-brand: #6366f1;
  --legal-brand-dark: #4338ca;
  --legal-ink: #0f172a;
  --legal-muted: #64748b;
  --legal-border: #e2e8f0;
  --legal-surface: #f8fafc;
}

html,
body {
  background: var(--legal-surface) !important;
  color: var(--legal-ink) !important;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.65 !important;
}

h1,
h2,
h3 {
  font-family: 'Syne', 'DM Sans', sans-serif !important;
  color: var(--legal-ink) !important;
  letter-spacing: -0.01em;
}

a {
  color: var(--legal-brand-dark) !important;
}

.meta {
  color: var(--legal-muted) !important;
}

.legal-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.legal-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #07080d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-shell-brand {
  font-family: 'Syne', 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff !important;
  text-decoration: none;
}

.legal-shell-back {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  white-space: nowrap;
}

.legal-shell-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.legal-shell-content {
  flex: 1;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  box-sizing: border-box;
}

.legal-shell-content > *:first-child {
  margin-top: 0;
}

.legal-shell-footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--legal-muted);
  border-top: 1px solid var(--legal-border);
  background: #ffffff;
}

.legal-shell-footer a {
  font-weight: 600;
}

@media (max-width: 560px) {
  .legal-shell-header {
    flex-wrap: wrap;
  }
  .legal-shell-content {
    padding: 1.75rem 1.1rem 2.5rem;
  }
}
