/* ==========================================================================
   Wolffin — páginas de documentos (termos, privacidade, LGPD, suporte)
   ========================================================================== */

.doc { padding-top: clamp(7rem, 12vw, 9rem); padding-bottom: clamp(3rem, 6vw, 5rem); position: relative; }

.doc__head { border-bottom: 1px solid var(--line); padding-bottom: clamp(2rem, 4vw, 3rem); margin-bottom: clamp(2rem, 4vw, 3rem); }
.doc__head h1 { font-size: var(--t-4); margin-bottom: 1rem; }
.doc__head p { color: var(--moss); max-width: 60ch; font-size: var(--t-1); }

.doc__meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.4rem; color: var(--dim); font-size: var(--t--1); font-weight: 700; }

.doc__grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }

@media (min-width: 1000px) { .doc__grid { grid-template-columns: 230px minmax(0, 1fr); } }

/* Item de grid nasce com min-width:auto: o conteudo mais largo define o piso
   da coluna. Em tela estreita a tabela de celulas em nowrap empurrava a coluna
   alem da viewport, e o overflow-x da propria tabela nunca chegava a agir. */
.doc__grid > * { min-width: 0; }

.toc { position: sticky; top: 96px; display: none; }

@media (min-width: 1000px) { .toc { display: block; } }

.toc h2 { font-size: var(--t--1); color: var(--dim); margin-bottom: 1rem; letter-spacing: 0.02em; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; counter-reset: t; }

.toc a {
  display: block;
  text-decoration: none;
  color: var(--moss);
  font-size: var(--t--1);
  font-weight: 600;
  padding-left: 1.6rem;
  position: relative;
  transition: color 0.2s;
}

.toc li { counter-increment: t; }
.toc a::before { content: counter(t, decimal-leading-zero); position: absolute; left: 0; color: var(--dim); font-weight: 700; }
.toc a:hover { color: var(--lime); }

.prose { max-width: 72ch; }
.prose h2 { font-size: var(--t-3); margin-top: 3rem; margin-bottom: 1rem; scroll-margin-top: 100px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--t-1); margin-top: 2rem; margin-bottom: 0.6rem; letter-spacing: -0.02em; }
.prose p { color: var(--moss); margin-bottom: 1.1rem; line-height: 1.72; }
.prose ul, .prose ol { color: var(--moss); padding-left: 1.3rem; margin: 0 0 1.4rem; display: grid; gap: 0.6rem; line-height: 1.65; }
.prose li::marker { color: var(--lime); }
.prose strong { color: var(--fg); font-weight: 800; }
.prose a { color: var(--lime); text-underline-offset: 3px; }

.prose code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12em 0.42em;
  font-size: 0.9em;
  color: var(--fg);
}

.callout {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--lime);
  border-radius: var(--r-md);
  background: rgba(19, 236, 91, 0.06);
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
}

.callout p { color: var(--moss); margin: 0; }
.callout p + p { margin-top: 0.7rem; }

/* Placeholders que o time preenche antes de publicar. */
.fill {
  background: rgba(251, 146, 60, 0.14);
  border: 1px dashed rgba(251, 146, 60, 0.5);
  border-radius: 5px;
  padding: 0.06em 0.4em;
  color: var(--amber);
  font-weight: 700;
  font-size: 0.92em;
  white-space: nowrap;
}

.dtable { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: var(--t--1); }
.dtable th, .dtable td { text-align: left; padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable th { color: var(--fg); font-weight: 800; }
.dtable td { color: var(--moss); }
.dtable tr:last-child td { border-bottom: 0; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.tablewrap .dtable { margin: 0; }
.tablewrap th, .tablewrap td { white-space: nowrap; }
.tablewrap td:last-child, .tablewrap th:last-child { white-space: normal; min-width: 22ch; }

.backhome { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--moss); text-decoration: none; font-weight: 700; font-size: var(--t--1); margin-bottom: 1.5rem; }
.backhome:hover { color: var(--lime); }
.backhome svg { width: 15px; height: 15px; stroke: currentColor; }
