/* ──────────────────────────────────────────────────────────────────────
   Páginas legais do DetBox (/plugin-detbox/termos/ e /privacidade/).
   CSS próprio e pequeno de propósito: não herda o style.css da LP.
   Fundo claro, uma coluna de até 760 px, acento roxo do DetBox V2.
   A Montserrat é servida daqui (sem Google Fonts) para a página não
   carregar nada de terceiros.
   ────────────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --accent: #9333ea;
  --accent-dark: #7e22ce;
  --accent-soft: #f3e8ff;
  --text: #1f1f24;
  --muted: #5b5b66;
  --line: #e9e6f0;
  --head-bg: #faf7fe;
  --col: 760px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1.25rem;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

/* ── Cabeçalho ── */
.legal-header {
  padding: 2rem 1.25rem 0;
  text-align: center;
}
.legal-logo { display: inline-block; border-radius: 16px; }
.legal-logo img { display: block; width: 112px; height: 112px; }
.legal-logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ── Documento ── */
.legal {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0.25rem 1.25rem 3rem;
}

.legal-doc h1 {
  margin: 0.5rem 0 0.9rem;
  font-size: clamp(1.6rem, 4.6vw, 2.15rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-align: center;
}

/* Versão e data em destaque logo abaixo do título. */
.legal-doc .doc-version {
  display: table;
  margin: 0 auto 2.25rem;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #6b21a8;
  font-size: 0.9rem;
  font-weight: 600;
}

.legal-doc h2 {
  margin: 2.25rem 0 0.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
}
.legal-doc h2 a { color: inherit; text-decoration: none; }
/* O "#" é só visual (::after não entra no texto da página). */
.legal-doc h2 a:hover::after,
.legal-doc h2 a:focus-visible::after { content: " #"; color: var(--accent); }
.legal-doc h2:target { color: var(--accent-dark); }

.legal-doc p { margin: 0 0 1rem; }
.legal-doc ol, .legal-doc ul { margin: 0 0 1.1rem; padding-left: 1.5rem; }
.legal-doc li { margin: 0.4rem 0; padding-left: 0.2rem; }
.legal-doc li::marker { color: var(--accent); font-weight: 700; }
.legal-doc strong { font-weight: 700; }

.legal-doc a { color: var(--accent-dark); text-underline-offset: 2px; }
.legal-doc a:hover { color: var(--accent); }

/* ── Tabelas: rolagem horizontal no celular ── */
.table-wrap {
  margin: 1.1rem 0 1.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}
/* Abaixo disso a coluna espreme o texto: a tabela rola em vez de quebrar. */
.legal-doc table.cols-3 { min-width: 640px; }
.legal-doc table.cols-2 { min-width: 420px; }
.legal-doc th, .legal-doc td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.legal-doc th { background: var(--head-bg); font-weight: 700; color: #3b0764; }
.legal-doc tbody tr:last-child td { border-bottom: 0; }

/* ── Rodapé com os links cruzados ── */
.legal-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1.25rem 2.5rem;
  text-align: center;
  font-size: 0.9rem;
}
.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.75rem;
  color: var(--muted);
}
.legal-footer a { color: var(--muted); text-decoration: none; }
.legal-footer a:hover { color: var(--accent-dark); text-decoration: underline; }
.legal-footer a[aria-current="page"] { color: var(--text); font-weight: 600; }
/* Empresa + parceira: mesmo visual do rodapé do guia e da troca de plano. */
.legal-company { color: var(--text); }
.footer-partner { font-weight: 700; font-size: 0.85em; margin-left: 0.75em; white-space: nowrap; }

@media (max-width: 600px) {
  body { font-size: 0.97rem; }
  .legal-header { padding-top: 1.5rem; }
  .legal-logo img { width: 88px; height: 88px; }
  .legal-doc h2 { font-size: 1.1rem; }
  /* Celular: empresa numa linha, links na seguinte, sem "·" sobrando na quebra. */
  .legal-footer nav { gap: 0.4rem 1.1rem; }
  .legal-footer .sep { display: none; }
  .legal-company { flex-basis: 100%; }
}
