/* ============================================================
   Aristo: páginas legais (Política de Privacidade / Termos)
   Documento editorial de leitura, na identidade Aristo:
   azul #0473e3, navy #041633, fonte Inter. Coluna de leitura
   estreita, hierarquia por numeração de seção, sem box de IA.
   Autossuficiente com: globals + styleguide + chrome-shared +
   footer-shared + este.
   ============================================================ */

.pg {
  --blue: #0473e3;
  --blue-deep: #0361c1;
  --navy: #041633;
  --ink: #0b1b3a;
  --text: #3a4a63;
  --muted: #5a6b7f;
  --line: #e6edf5;
  --line-2: #eef3f9;
  --mist: #f3f7fc;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background-color: #ffffff;
  font-family: "Inter", Helvetica, sans-serif;
  color: var(--ink);
  overflow-x: hidden;
}
.pg * { box-sizing: border-box; }
.pg img { max-width: 100%; }

.pg-main { width: 100%; display: flex; flex-direction: column; align-items: center; }
.pg-wrap { width: 100%; max-width: 1220px; padding: 0 40px; }

/* ---------- Faixa de topo com o cabeçalho do documento ---------- */
.legal-top {
  width: 100%;
  background:
    radial-gradient(1200px 320px at 20% -40%, rgba(4, 115, 227, 0.08), transparent 70%),
    var(--mist);
  border-bottom: 1px solid var(--line);
}
.legal-top .pg-wrap {
  padding-top: 40px;
  padding-bottom: 40px;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 22px;
}
.legal-back svg { width: 16px; height: 16px; }
.legal-back:hover { color: var(--navy); }
.legal-eyebrow {
  display: inline-block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.legal-title {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 22ch;
}
.legal-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.legal-meta strong { color: var(--ink); font-weight: 600; }

/* ---------- Corpo do documento ---------- */
.legal-body { padding-top: 44px; padding-bottom: 88px; }
.legal {
  max-width: 760px;
  margin: 0 auto;
}
.legal-intro {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  font-weight: 500;
  margin: 0 0 8px;
  text-wrap: pretty;
}

/* abas: Privacidade / Cookies */
/* o reset (article{display:block}) é CSS de autor e vence o [hidden] do UA;
   reforçamos o ocultamento do painel inativo com especificidade suficiente */
.legal[hidden] { display: none; }
.legal-tabs {
  display: flex;
  gap: 4px;
  max-width: 760px;
  margin: 0 auto 26px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 130px;
}
.legal-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 12px 4px;
  margin-right: 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.legal-tab:last-child { margin-right: 0; }
.legal-tab:hover { color: var(--navy); }
.legal-tab[aria-selected="true"] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.legal-tab:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* índice (nesta página) */
.legal-toc {
  margin: 28px 0 40px;
  padding: 18px 22px;
  border-left: 3px solid var(--blue);
  background: var(--mist);
  border-radius: 0 12px 12px 0;
}
.legal-toc h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
}
.legal-toc li { margin: 0 0 8px; break-inside: avoid; }
.legal-toc a {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
.legal-toc a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

/* seções */
.legal-sec { margin: 0 0 38px; scroll-margin-top: 130px; }
.legal-sec h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.legal-sec h2 .n {
  color: var(--blue);
  font-weight: 800;
  margin-right: 10px;
}
.legal-sec h3 {
  margin: 22px 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}
.legal p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  text-wrap: pretty;
}
.legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--blue-deep); }
.legal strong { color: var(--ink); font-weight: 600; }

.legal ul { margin: 0 0 14px; padding: 0; list-style: none; }
.legal ul li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  text-wrap: pretty;
}
.legal ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--blue);
}
.legal ul li strong { color: var(--ink); }

/* tabela finalidade/base legal e origem/dados */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 18px;
  font-size: 15px;
}
.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border: 1px solid var(--line);
  line-height: 1.6;
}
.legal-table thead th {
  background: var(--navy);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.legal-table tbody tr:nth-child(even) td { background: var(--line-2); }
.legal-table td:first-child { color: var(--ink); font-weight: 600; width: 44%; }
.legal-table td:last-child { color: var(--text); }

.legal-contact {
  margin-top: 6px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--mist);
}
.legal-contact p { margin: 0; }

.legal-updated {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .pg-wrap { padding: 0 24px; }
  .legal-toc ol { columns: 1; }
  .legal-body { padding-bottom: 64px; }
}
@media (max-width: 600px) {
  .legal-table { display: block; overflow-x: auto; white-space: nowrap; }
  .legal-table td:first-child { width: auto; }
}
