/* ============================================================
   LEGAL (split from addons.css)
   ============================================================ */

/* =============================================================
   LEGAL PAGES (termos, anti-spam, privacidade, cookies)
   ============================================================= */

.legal-page { background: var(--bg); color: var(--text); }

/* Hero - note: navbar is fixed (~92px), so we add top padding to clear it */
.legal-hero {
  background: linear-gradient(180deg, var(--green-light) 0%, var(--bg) 100%);
  padding: 152px 0 56px;
  border-bottom: 1px solid var(--border);
}
.legal-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--green);
  background: rgba(23,141,114,.10);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 16px;
}
.legal-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1; font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 0 0 16px;
}
.legal-updated {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-muted);
  margin: 0;
}
.legal-updated svg { color: var(--green); }
.legal-updated strong { color: var(--text); font-weight: 700; }

/* Tabs - stick below the fixed navbar */
.legal-tabs {
  position: sticky; top: 73px; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.legal-tabs .container {
  display: flex; gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.legal-tabs .container::-webkit-scrollbar { display: none; }
.legal-tabs a {
  display: inline-flex; align-items: center;
  flex-shrink: 0;
  padding: 18px 16px;
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.legal-tabs a:hover { color: var(--text); }
.legal-tabs a.is-active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* Body grid */
.legal-body { padding: 56px 0 80px; }
.legal-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
}

/* TOC (sticky sidebar) - below navbar + tabs */
.legal-toc {
  position: sticky;
  top: 152px;
  align-self: start;
}
.legal-toc-inner {
  padding: 4px 0;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.legal-toc-inner h3 {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px;
  padding-left: 12px;
}
.legal-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.legal-toc li { margin: 0; }
.legal-toc a {
  display: flex; gap: 8px;
  padding: 8px 12px;
  font-size: 13px; line-height: 1.45;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.legal-toc a:hover { color: var(--text); background: var(--bg-soft); }
.legal-toc a.is-active {
  color: var(--green); font-weight: 600;
  border-left-color: var(--green);
  background: var(--green-light);
}
.legal-toc-num {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 24px;
}
.legal-toc a.is-active .legal-toc-num { color: var(--green); }
.legal-toc-text { flex: 1; }
.legal-toc-empty {
  font-size: 13px; color: var(--text-muted); padding: 8px 12px;
}

/* Content article */
.legal-content {
  max-width: 760px;
  min-width: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}
.legal-content section {
  padding-top: 24px;
  margin-bottom: 16px;
}
.legal-content section + section {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding-top: 40px;
}
.legal-content h2 {
  font-size: 28px; font-weight: 800;
  line-height: 1.25; letter-spacing: -.01em;
  color: var(--text);
  margin: 0 0 20px;
  display: flex; gap: 14px; align-items: baseline;
  scroll-margin-top: 170px;
}
.legal-content h3 {
  font-size: 19px; font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 32px 0 12px;
  display: flex; gap: 10px; align-items: baseline;
  scroll-margin-top: 170px;
}
.legal-content h4 {
  font-size: 17px; font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
  display: flex; gap: 8px; align-items: baseline;
}
.legal-content p {
  margin: 0 0 16px;
  color: var(--text);
}
.legal-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  word-break: break-word;
}
.legal-content a:hover { color: var(--green-dark); }
.legal-content ul, .legal-content ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.legal-content li {
  margin-bottom: 8px;
}
.legal-content li::marker { color: var(--green); }
.legal-content strong { font-weight: 700; color: var(--text); }
.legal-content em { font-style: italic; }

/* Tables (used on privacidade) */
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.legal-content th, .legal-content td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.legal-content th {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  letter-spacing: .02em;
}
.legal-content tr:last-child td { border-bottom: none; }
.legal-content td { color: var(--text-muted); }

/* Numerals */
.legal-num {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 32px;
  padding: 0 10px;
  background: var(--green-light);
  color: var(--green);
  font-size: 15px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
  align-self: center;
}
.legal-num--sm {
  min-width: 36px; height: 26px;
  font-size: 13px;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.legal-num--xs {
  min-width: 30px; height: 22px;
  font-size: 12px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* CTA */
.legal-cta {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.legal-cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.legal-cta h2 {
  font-size: 24px; font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
}
.legal-cta p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* Responsive */
@media (max-width: 960px) {
  .legal-tabs { position: static; }
  .legal-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .legal-toc {
    position: static;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--bg-soft);
  }
  .legal-toc-inner { max-height: none; }
  .legal-toc ul { border-left: none; }
  .legal-toc a { padding: 6px 8px; border-left: none; border-radius: 6px; margin-left: 0; }
  .legal-toc a.is-active { border-left: none; }
}

@media (max-width: 640px) {
  .legal-hero { padding: 136px 0 32px; }
  .legal-hero h1 { font-size: 28px; }
  .legal-body { padding: 32px 0 56px; }
  .legal-content { font-size: 15.5px; }
  .legal-content h2 { font-size: 22px; gap: 10px; }
  .legal-content h3 { font-size: 17px; }
  .legal-num { min-width: 38px; height: 28px; font-size: 13px; }
  .legal-num--sm { min-width: 32px; height: 24px; font-size: 12px; }
  .legal-cta { padding: 32px 0; }
  .legal-cta-inner { flex-direction: column; align-items: flex-start; }
  .legal-cta h2 { font-size: 20px; }
}


