/* Magin · páginas de texto (privacidade.html)
   Leitura longa: coluna estreita, índice fixo ao lado no computador. Cores e tipos do design system. */

.doc {
  background: var(--bg);
}

.doc-skip {
  position: absolute;
  z-index: 100;
  top: -60px;
  left: 16px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
}

.doc-skip:focus {
  top: 12px;
}

.doc-top {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(150%);
}

.doc-top__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.doc-top__bar img {
  width: auto;
  height: 28px;
}

.doc-page {
  padding: 64px 0 96px;
}

.doc-head {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 48px;
}

.doc-head .h1 {
  font-size: clamp(36px, 6vw, 56px);
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  align-items: start;
  gap: 64px;
}

.doc-toc {
  position: sticky;
  top: 96px;
}

.doc-toc__title {
  margin: 0 0 10px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doc-toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.doc-toc li {
  counter-increment: toc;
}

.doc-toc a {
  display: flex;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

.doc-toc a::before {
  content: counter(toc);
  min-width: 1.2em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.doc-toc a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.doc-body {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.doc-body section,
.doc-body h3[id] {
  scroll-margin-top: 88px;
}

.doc-body section + section {
  margin-top: 44px;
}

.doc-body h2 {
  margin: 0 0 12px;
  color: var(--text);
  font: 600 24px / 1.25 var(--font-display);
  letter-spacing: -0.015em;
}

.doc-body h3 {
  margin: 22px 0 6px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.doc-body p,
.doc-body ul {
  margin: 0 0 14px;
}

.doc-body ul {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.doc-body strong {
  color: var(--text);
}

.doc-body a {
  color: var(--primary-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--violet-200);
  text-underline-offset: 3px;
}

.doc-body a:hover {
  text-decoration-color: currentColor;
}

/* "Em resumo": fundo suave e borda fina, sem faixa colorida */
.doc-summary {
  margin-bottom: 36px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.doc-summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-summary li {
  position: relative;
  padding-left: 30px;
  color: var(--text);
}

.doc-summary li::before {
  content: '';
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>")
    center / 11px no-repeat;
}

.doc-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.doc-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.doc-table th,
.doc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc-table th {
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table td:last-child {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

.doc-foot {
  border-top: 1px solid var(--line);
}

.doc-foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0 40px;
}

.doc-foot__links {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.doc-foot__links a:hover {
  color: var(--primary-text);
}

@media (max-width: 960px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .doc-toc {
    position: static;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .doc-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .doc-page {
    padding: 40px 0 72px;
  }

  .doc-toc ol {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-table td:last-child {
    white-space: normal;
  }
}
