/* Tecela AI: aviso de cookies (consent.js) e tabela da política de cookies.
   Só usa os tokens de site.css. Fixo na base, sem entrar no fluxo da página: não desloca o layout (sem CLS).
   Recusar e Aceitar são o mesmo componente (.consent-btn), com o mesmo peso visual. */
.consent {
  position: fixed; inset: auto 0 0 0; z-index: 80;
  background: var(--bg-2); color: var(--fg-2);
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 40px color-mix(in srgb, var(--bg) 70%, transparent);
  padding: 16px 0 max(16px, env(safe-area-inset-bottom));
  max-height: 60vh; max-height: 60dvh; overflow-y: auto;
}
.consent:focus { outline: none; }
.consent:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.consent-inner { display: flex; align-items: center; gap: 24px; }
.consent p { margin: 0; max-width: 68ch; font-size: 14px; line-height: 1.55; color: var(--fg-2); }
.consent a { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.consent-actions { display: flex; gap: 12px; margin-left: auto; flex: none; }
.consent-btn {
  min-height: 48px; min-width: 132px; padding: 12px 22px;
  border: 1px solid var(--fg-2); border-radius: 7px;
  background: transparent; color: var(--fg);
  font: 600 14px/1.3 var(--font-sans); text-align: center;
}
.consent-btn:hover { background: var(--accent-soft); }
/* "Fechar sem alterar": só existe quando o aviso é reaberto pelo rodapé; é um link-botão, sem o peso de Recusar e Aceitar. */
.consent-close { min-height: 48px; padding: 12px 8px; border: 0; background: none; color: var(--fg-2); font: 600 14px/1.3 var(--font-sans); text-decoration: underline; text-underline-offset: 4px; }
.consent-close:hover { color: var(--fg); }
/* Âncoras e foco por teclado não ficam por baixo do aviso enquanto ele está aberto. */
html.has-consent { scroll-padding-bottom: var(--consent-h, 0px); }
@media (max-width: 620px) {
  .consent-inner { display: block; }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; }
  .consent-btn { min-width: 0; }
  .consent-close { grid-column: 1 / -1; }
}
@media print { .consent { display: none; } }

/* Botão "Preferências de cookies" no rodapé: tem a aparência dos links da lista. */
.site-footer .consent-open { padding: 0; border: 0; background: none; color: var(--fg-2); font: inherit; line-height: inherit; text-align: left; }
.site-footer .consent-open:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Tabela das políticas: rola na horizontal dentro do próprio bloco (celular) e o bloco recebe foco do teclado. */
.prose .table-scroll { overflow-x: auto; margin: 1.2em 0; }
.prose .table-scroll table { display: table; min-width: 640px; overflow: visible; }
.prose .table-scroll code { white-space: nowrap; }
