/* =====================================================================
   page-legal.css — politica-de-privacidade.html only.
   Interior "document" page: the blog/transações masthead register
   (cream, compact), then a sticky table of contents beside a text
   measure. Type, colour, radii and motion come from tokens/base/components.
   ===================================================================== */

/* cream page: the header floats over paper, so the nav recolours to ink
   (the same block the other cream-hero pages carry) */
.site-header:not(.site-header--solid) .nav-links a { color: var(--ink-muted); opacity: 1; }
.site-header:not(.site-header--solid) .nav-links a:hover,
.site-header:not(.site-header--solid) .nav-links a.is-active { color: var(--ink); opacity: 1; }
.site-header:not(.site-header--solid) .nav-cta.btn--ghost { border-color: var(--line); color: var(--ink); }
.site-header:not(.site-header--solid) .nav-cta.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.site-header:not(.site-header--solid) .nav-toggle span { background: var(--ink); }

/* ---- masthead: same object as the blog's .cnt-top ---- */
.cnt-top {
  background: var(--paper);
  padding-top: calc(var(--header-h) + clamp(2.4rem, 5vw, 4.5rem));
  padding-bottom: 0;
}
.cnt-top__head {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: end;
  padding-bottom: clamp(1.8rem, 3vw, 2.6rem);
  border-bottom: 1px solid var(--line);
}
.cnt-top__head h1 { font-size: var(--fs-page-title); line-height: 1.02; letter-spacing: -0.015em; margin: 0; }
.cnt-top__lede {
  font-family: var(--sans); font-size: var(--fs-lead); line-height: 1.45;
  color: var(--ink-muted); max-width: 46ch; margin: 0 0 0.35rem;
}
@media (max-width: 760px) { .cnt-top__head { grid-template-columns: 1fr; align-items: start; gap: 1.1rem; } }
@media (prefers-reduced-motion: no-preference) { .cnt-top > .container { animation: heroSettle 0.9s var(--ease-out) both; } }

/* ---- body: sticky contents rail + text measure ---- */
.lgl { background: var(--paper); padding-top: var(--section-y-sm); }
.lgl__grid {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.lgl__toc { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.lgl__toc-label {
  margin: 0 0 0.8rem;
  font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}
.lgl__toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; border-left: 1px solid var(--line); }
.lgl__toc a {
  display: block; padding: 0.15rem 0 0.15rem 0.9rem; margin-left: -1px;
  border-left: 1px solid transparent;
  font-family: var(--sans); font-size: var(--fs-small); color: var(--ink-muted);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.lgl__toc a:hover { color: var(--ink); border-left-color: var(--accent); }

.lgl__body { max-width: 68ch; min-width: 0; }
.lgl__intro {
  font-family: var(--sans); font-size: var(--fs-lead); line-height: 1.5;
  color: var(--ink); margin: 0 0 2.2rem; text-wrap: pretty;
}
.lgl__body h2 {
  font-family: var(--display); font-weight: 400;
  font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -0.015em;
  color: var(--ink); margin: clamp(2.2rem, 4vw, 3rem) 0 0.9rem;
  scroll-margin-top: calc(var(--header-h) + 1.2rem);
}
.lgl__body p, .lgl__body li {
  font-family: var(--sans); font-size: var(--fs-body); line-height: 1.65;
  color: var(--ink-muted); text-wrap: pretty;
}
.lgl__body p { margin: 0 0 1rem; }
.lgl__body b { color: var(--ink); font-weight: 600; }
.lgl__body ul { margin: 0 0 1.1rem; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.lgl__body li::marker { color: var(--accent); }
.lgl__body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.lgl__body a:hover { text-decoration-color: var(--accent); }
.lgl__contact { padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2); }

/* the cookie table: hairline rows, never boxed; scrolls inside its own wrap on phones */
.lgl__table-wrap { overflow-x: auto; margin: 0.4rem 0 1.2rem; -webkit-overflow-scrolling: touch; }
.lgl__table { width: 100%; min-width: 560px; border-collapse: collapse; font-family: var(--sans); font-size: var(--fs-small); line-height: 1.5; }
.lgl__table th, .lgl__table td { text-align: left; vertical-align: top; padding: 0.75rem 0.9rem 0.75rem 0; border-top: 1px solid var(--line); }
.lgl__table th { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); border-top: 0; padding-top: 0; }
.lgl__table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.lgl__table td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.lgl__table td { color: var(--ink-muted); }

@media (max-width: 900px) {
  /* minmax(0,…) so the 560px cookie table scrolls inside its wrap instead of widening the page */
  .lgl__grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .lgl__toc { position: static; }
  .lgl__toc ol { border-left: 0; flex-direction: row; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
  .lgl__toc a { padding: 0.2rem 0; border-left: 0; margin: 0; }
}

/* switcher summary must match the nav links over the light masthead (same fix as
   page-blog.css / page-transacoes.css; without it "PT" was cream on cream) */
.site-header:not(.site-header--solid) .lang-switch > summary { color: var(--ink-muted); }
.site-header:not(.site-header--solid) .lang-switch > summary:hover,
.site-header:not(.site-header--solid) .lang-switch[open] > summary { color: var(--ink); }
