/* The privacy and terms pages: the site's paper and ink, one readable column. */

:root {
  --paper: #f4f1ea;
  --ink: #161513;
  --ink-2: #3a3833;
  --graphite: #6d6a62;
  --rule: #d9d3c5;
  --accent: #2446d8;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12110f;
    --ink: #f1ede4;
    --ink-2: #d4cfc4;
    --graphite: #9a958a;
    --rule: #2e2c27;
    --accent: #7d93ff;
    color-scheme: dark;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 16px/1.65 var(--sans);
}

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 72px;
}

.legal h1,
.legal h2 {
  color: var(--ink);
  line-height: 1.25;
}

.legal h1 { font-size: 2rem; margin: 0.4em 0 0.2em; }
.legal h2 { font-size: 1.15rem; margin: 2em 0 0.5em; }
/* Inline links get a taller hit area; padding on inline boxes leaves the lines alone. */
.legal a { color: var(--accent); padding: 11px 0; }
.legal code { font: 0.9em var(--mono); overflow-wrap: anywhere; }
.legal hr { border: 0; border-top: 1px solid var(--rule); margin: 56px 0; }
.legal__back,
.legal__meta { color: var(--graphite); font-size: 0.9rem; }

/* The PT/EN switch. Without JavaScript both sections stay on the page, one
   after the other, and the switch is just two inert letters — so it only
   appears once `legal.js` has taken charge of showing one section. */
.legal__lang { display: none; }
.js .legal__lang { display: inline-flex; gap: 2px; vertical-align: middle; }

.legal__lang button {
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--graphite);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 7px 9px;
  cursor: pointer;
}

.legal__lang button:hover { color: var(--ink); }

.legal__lang button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

/* A section hidden by the switch: `hidden` alone loses to `display: block`
   further up in some browsers' default sheets. */
.legal [hidden] { display: none !important; }

/* Comparison tables: full width, and on a phone the wrapper scrolls, not the
   page; the table keeps its own display so screen readers still see a table. */
.legal .table-scroll { overflow-x: auto; margin: 1em 0; }
.legal .table-scroll:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.legal .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.legal th, .legal td { text-align: left; padding: 0.5em 0.75em; border-bottom: 1px solid rgba(127, 127, 127, 0.25); vertical-align: top; }
.legal thead th { font-weight: 600; }
