/* Termos e Privacidade: sobre /landing/landing.css (mesmos tokens, só tema claro). */
.legal-head {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0 2.5rem;
}

.legal-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.legal-head .version {
  margin: 0.6rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.legal {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3rem;
  padding: 3rem 0 4rem;
}

.toc {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  font-size: 0.92rem;
}

.toc strong {
  display: block;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.toc li + li {
  margin-top: 0.35rem;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--green);
}

.legal article {
  max-width: 44rem;
}

.legal article > p:first-child {
  margin-top: 0;
}

.legal h2 {
  font-size: 1.35rem;
  color: var(--navy);
  margin: 2.5rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
}

.legal p,
.legal li {
  color: var(--ink);
}

.legal ul {
  padding-left: 1.2rem;
}

.legal li + li {
  margin-top: 0.4rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0.5rem 0 1rem;
}

.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.legal th {
  color: var(--navy);
}

.table-scroll {
  overflow-x: auto;
}

@media (max-width: 860px) {
  .legal {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .toc {
    position: static;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--white);
  }
}

/* Índice que acompanha a leitura (toc.js): trilho fino, marcador dourado na seção atual e entrada em sequência. */
.toc ol.spy {
  position: relative;
  padding-left: 2.1rem;
}

.toc ol.spy::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.toc-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition:
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    height 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.toc a {
  transition: color 0.25s ease;
}

.toc a[aria-current] {
  color: var(--navy);
  font-weight: 600;
}

@keyframes toc-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.toc li {
  animation: toc-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.toc li:nth-child(2) { animation-delay: 40ms; }
.toc li:nth-child(3) { animation-delay: 80ms; }
.toc li:nth-child(4) { animation-delay: 120ms; }
.toc li:nth-child(5) { animation-delay: 160ms; }
.toc li:nth-child(6) { animation-delay: 200ms; }
.toc li:nth-child(7) { animation-delay: 240ms; }
.toc li:nth-child(8) { animation-delay: 280ms; }
.toc li:nth-child(9) { animation-delay: 320ms; }
.toc li:nth-child(10) { animation-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  .toc li {
    animation: none;
  }

  .toc-marker,
  .toc a {
    transition: none;
  }
}
