/* ============================================================
   LEGAL — estilos compartilhados de /politicas/*
   Depende de: lumi-tokens.css, lumi-components.css, institutional.css
   ============================================================ */

.legal-hero {
  padding: var(--space-16) var(--space-6) var(--space-10);
  border-bottom: 1px solid var(--lumi-divider);
}
.legal-hero__inner { max-width: 1280px; margin: 0 auto; }
.legal-kicker {
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  color: var(--lumi-text-tertiary); text-transform: uppercase;
  letter-spacing: 0.08em; margin: 0 0 var(--space-4);
}
.legal-hero__title { font-size: var(--text-4xl); letter-spacing: -0.02em; margin-bottom: var(--space-4); }
.legal-hero__sub { color: var(--lumi-text-secondary); font-size: var(--text-lg); max-width: 720px; margin-bottom: var(--space-6); }
.legal-hero__meta { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: var(--text-sm); color: var(--lumi-text-tertiary); }
.legal-hero__meta strong { color: var(--lumi-text-secondary); font-weight: var(--weight-medium); }

.legal-layout {
  max-width: 1280px; margin: 0 auto; padding: var(--space-12) var(--space-6) var(--space-20);
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-12);
  align-items: start;
}

/* ---------- Sumário lateral ---------- */
.legal-toc { position: sticky; top: var(--space-8); }
.legal-toc__title {
  font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--lumi-text-tertiary);
  text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 var(--space-4);
}
.legal-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); border-left: 1px solid var(--lumi-border); }
.legal-toc__link {
  display: block; padding: var(--space-2) 0 var(--space-2) var(--space-4);
  font-size: var(--text-sm); color: var(--lumi-text-secondary);
  border-left: 2px solid transparent; margin-left: -1px;
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.legal-toc__link:hover { color: var(--lumi-text-primary); }
.legal-toc__link.is-active { color: var(--lumi-primary); border-left-color: var(--lumi-primary); font-weight: var(--weight-medium); }

/* ---------- Corpo do documento ---------- */
.legal-doc { max-width: 760px; color: var(--lumi-text-secondary); font-size: var(--text-base); line-height: var(--leading-relaxed, 1.7); }
.legal-doc section { padding-bottom: var(--space-10); margin-bottom: var(--space-10); border-bottom: 1px solid var(--lumi-divider); scroll-margin-top: var(--space-8); }
.legal-doc section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.legal-doc h2 { font-size: var(--text-2xl); color: var(--lumi-text-primary); letter-spacing: -0.01em; margin: 0 0 var(--space-5); }
.legal-doc h3 { font-size: var(--text-lg); color: var(--lumi-text-primary); margin: var(--space-6) 0 var(--space-3); }
.legal-doc p { margin: 0 0 var(--space-4); }
.legal-doc ul, .legal-doc ol { margin: 0 0 var(--space-4); padding-left: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.legal-doc li { }
.legal-doc strong { color: var(--lumi-text-primary); font-weight: var(--weight-medium); }
.legal-doc a { color: var(--lumi-primary); }
.legal-doc a:hover { text-decoration: underline; }

.legal-callout {
  background: var(--lumi-surface-1); border: 1px solid var(--lumi-border); border-radius: var(--radius-lg);
  padding: var(--space-6); margin: var(--space-2) 0 var(--space-6); font-size: var(--text-sm);
}
.legal-callout--notice { border-left: 3px solid var(--lumi-cyan); }

/* ---------- Tabela (categorias de dados / tipos de cookies) ---------- */
.legal-table-wrap { overflow-x: auto; margin: 0 0 var(--space-6); border: 1px solid var(--lumi-border); border-radius: var(--radius-lg); }
.legal-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 480px; }
.legal-table th, .legal-table td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--lumi-divider); vertical-align: top; }
.legal-table thead th { background: var(--lumi-surface-1); color: var(--lumi-text-primary); font-weight: var(--weight-semibold); }
.legal-table tbody tr:last-child td { border-bottom: 0; }

.legal-contact-card {
  background: var(--lumi-surface-1); border: 1px solid var(--lumi-border); border-radius: var(--radius-lg);
  padding: var(--space-8); margin-top: var(--space-4);
}
.legal-contact-card__title { font-size: var(--text-lg); color: var(--lumi-text-primary); margin: 0 0 var(--space-2); }
.legal-contact-card__value { font-family: var(--font-mono); color: var(--lumi-text-primary); font-size: var(--text-sm); margin: 0 0 var(--space-1); }

/* ---------- Mobile TOC toggle (aparece só em telas pequenas) ---------- */
.legal-toc-mobile { display: none; }

/* ============================================================
   RESPONSIVO — tablet
   ============================================================ */
@media (max-width: 1023px) {
  .legal-layout { grid-template-columns: 1fr; gap: var(--space-8); }
  .legal-toc { position: static; }
}

/* ============================================================
   RESPONSIVO — mobile
   ============================================================ */
@media (max-width: 767px) {
  .legal-hero { padding: var(--space-10) var(--space-4) var(--space-8); }
  .legal-hero__title { font-size: var(--text-3xl); }
  .legal-hero__sub { font-size: var(--text-base); }
  .legal-layout { padding: var(--space-8) var(--space-4) var(--space-14); }

  .legal-toc {
    background: var(--lumi-surface-1); border: 1px solid var(--lumi-border); border-radius: var(--radius-lg);
    padding: var(--space-4);
  }
  .legal-toc__list { border-left: 0; gap: 0; }
  .legal-toc__link { padding: var(--space-2) 0; border-left: 0; padding-left: var(--space-3); border-left: 2px solid transparent; }

  .legal-doc h2 { font-size: var(--text-xl); }
  .legal-table { min-width: 360px; }
}
