/* The legal pages (privacy, terms, account deletion, security): one look,
   both languages in the page. Without JavaScript both are shown; with it,
   legal.js sets data-lang on <html> and only that language shows. */
:root {
  --bg: #0F0F11;
  --surface: #18181B;
  --border: rgba(255, 255, 255, 0.08);
  --text: #E4E4E7;
  --text-muted: #A1A1AA;
  --accent: #60A5FA;
  --warn: rgba(248, 113, 113, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 760px; margin: 0 auto; padding: 48px 16px 80px; }

header { text-align: center; margin-bottom: 24px; }
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 600; font-size: 14px;
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 16px;
}
.brand a { color: inherit; }
h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.meta { color: var(--text-muted); font-size: 13px; }

.lang-toggle {
  display: flex; justify-content: center; gap: 4px;
  margin: 24px auto 32px; padding: 4px; width: fit-content;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.lang-toggle a {
  color: var(--text-muted); padding: 6px 16px; font-size: 13px; border-radius: 999px;
}
.lang-toggle a[aria-current="true"] { background: var(--accent); color: var(--bg); font-weight: 600; }
.lang-toggle a:hover { text-decoration: none; }

section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; margin-bottom: 16px;
}
h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
h3 { font-size: 15px; font-weight: 700; margin: 16px 0 8px; color: var(--text); }
p { color: var(--text-muted); margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 20px; color: var(--text-muted); margin-bottom: 12px; }
li { margin-bottom: 6px; }
li:last-child { margin-bottom: 0; }
strong { color: var(--text); }
code {
  background: rgba(96, 165, 250, 0.1); color: var(--accent);
  padding: 2px 6px; border-radius: 4px; font-size: 13px;
  font-family: "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere;
}
a { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; }

.callout {
  background: rgba(96, 165, 250, 0.08); border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 12px; padding: 14px 16px; margin: 12px 0; color: var(--text); font-size: 14px;
}
.callout.warn { background: rgba(248, 113, 113, 0.08); border-color: var(--warn); }

/* Tables become stacked cards on a phone. */
.table-wrap { overflow-x: auto; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--text-muted); }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-top: 1px solid var(--border); }
th { color: var(--text); font-weight: 600; }
@media (max-width: 600px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-top: 1px solid var(--border); padding: 8px 0; }
  td { border: none; padding: 4px 0; }
  td[data-label]::before { content: attr(data-label) ": "; color: var(--text); font-weight: 600; }
}

.lang-block + .lang-block { margin-top: 40px; }
html[data-lang="it"] .lang-en,
html[data-lang="en"] .lang-it,
html[data-lang] .lang-sep { display: none !important; }

footer { text-align: center; margin-top: 40px; color: var(--text-muted); font-size: 12px; }
footer p { color: var(--text-muted); margin-bottom: 8px; }
footer a { color: var(--text-muted); text-decoration: underline; }
