/*
  Estilos das páginas legais. Partilhados pelas três (privacidade, termos, subcontratação),
  ao contrário da index.html que é auto-suficiente: aqui um ficheiro comum evita ter a mesma
  paleta copiada três vezes.

  O tema segue as mesmas regras da restante casa: sistema por omissão, escolha explícita ganha.
*/
:root {
  color-scheme: light dark;
  --bg: #fbfaf8;
  --surface: #ffffff;
  --sunken: #f4f2ee;
  --border: #e5e2dc;
  --text: #191714;
  --muted: #6d6860;
  --accent: #1c5947;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16171a;
    --surface: #1e2023;
    --sunken: #23262a;
    --border: #31343a;
    --text: #eceae6;
    --muted: #9a968e;
    --accent: #74c4a5;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16171a;
  --surface: #1e2023;
  --sunken: #23262a;
  --border: #31343a;
  --text: #eceae6;
  --muted: #9a968e;
  --accent: #74c4a5;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.brand {
  font-family: "Segoe UI Variable Display", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 660;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2rem;
}

h1, h2, h3 {
  font-family: "Segoe UI Variable Display", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 640; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; font-weight: 620; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.02rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }

p, li { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }

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

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
  background: var(--sunken);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

.updated { color: var(--muted); font-size: 0.92rem; margin-bottom: 2rem; }

/* Bloco de dados por preencher: propositadamente visível, para não passar despercebido. */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.94rem;
  margin-bottom: 1.5rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

th { font-weight: 600; }

/* Tabelas largas rolam dentro da própria caixa, em vez de esticarem a página. */
.scroll { overflow-x: auto; }

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

footer a { color: var(--muted); }
