/* Documentos públicos do Tigre: termos de uso, política de privacidade e acordo de tratamento de dados
   (/termos, /privacidade, /tratamento-de-dados). Mesma casa do app (cores de tigre.css, fontes de fontes.css), feita para
   ler texto longo: coluna de até ~72 letras, corpo de 17 px (o CDC, art. 54, § 3º, pede no mínimo o corpo 12 no contrato
   de adesão), sumário com âncoras (ao lado no computador, no alto no celular), tabelas que viram cartões no celular e
   versão de impressão em fundo branco. Sem JavaScript. Arquivo à parte para não depender de assinar.css. */

:root {
  --navy-0: #02060f; --navy-1: #050f23; --navy-2: #071c37; --navy-3: #0b2a4c;
  --ciano: #6fe7ff; --gelo: #d8f6ff; --gelo-2: #8fcbff; --texto: #eaf6ff;
  --corpo: #d3e6f3; --sec: #b9d3e6;
  --linha: rgba(143, 203, 255, 0.15); --linha-forte: rgba(143, 203, 255, 0.32);
  --ambar: #ffb347; --ambar-claro: #ffd08a;
  --cartao: linear-gradient(180deg, rgba(16, 38, 74, 0.74), rgba(8, 21, 44, 0.9));
  --f-titulo: "Oxanium", "Exo 2", system-ui, -apple-system, sans-serif;
  --f-texto: "Saira", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--navy-0); scroll-padding-top: 1rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; color: var(--corpo); font: 400 17px/1.65 var(--f-texto); -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse 90% 60% at 60% 0%, #0d3159 0%, #071c37 42%, #050f23 72%, #02060f 100%) fixed; background-color: var(--navy-1);
}
a { color: var(--ciano); text-underline-offset: 0.18em; }
a:hover { color: var(--gelo); }
:where(a, summary):focus-visible { outline: 2px solid rgba(111, 231, 255, 0.9); outline-offset: 2px; border-radius: 4px; }
strong, b { color: var(--texto); font-weight: 600; }
.pular { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: 0.6rem 1rem; border-radius: 10px; background: var(--gelo); color: #032036; font-weight: 600; text-decoration: none; }
.pular:focus { top: 1rem; }

/* ── moldura ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
.doc { max-width: 1180px; margin: 0 auto; padding: clamp(14px, 3vw, 36px) clamp(16px, 4vw, 40px) 72px; }
.doc-topo { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.marca { display: inline-flex; align-items: center; gap: 0.6rem; font: 700 1.1rem/1 var(--f-titulo); letter-spacing: 0.02em; color: var(--gelo); text-decoration: none; }
.marca img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(111, 231, 255, 0.55), 0 0 1rem -0.2rem rgba(111, 231, 255, 0.5); }
.marca span { color: var(--sec); font-weight: 500; }
.voltar { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.6rem; padding: 0 1rem; border-radius: 99px; border: 1px solid var(--linha-forte);
  background: rgba(143, 203, 255, 0.08); color: var(--gelo); font: 600 1rem/1 var(--f-texto); text-decoration: none; }
.voltar:hover { background: rgba(143, 203, 255, 0.16); color: #fff; }

/* abas entre os 3 documentos */
.doc-abas { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.doc-abas a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem; border-radius: 99px; border: 1px solid var(--linha-forte);
  color: var(--sec); font: 500 1rem/1 var(--f-texto); text-decoration: none; background: rgba(6, 22, 44, 0.6); }
.doc-abas a:hover { color: #fff; }
.doc-abas a[aria-current="page"] { color: #1b0f00; background: linear-gradient(180deg, #ffc36b, #ff9f2e); border-color: rgba(255, 195, 107, 0.9); font-weight: 600; }

.doc-cabeca { margin: 1.4rem 0 1.2rem; max-width: 46rem; }
.doc-cabeca h1 { margin: 0 0 0.5rem; font: 700 clamp(1.7rem, 4.4vw, 2.5rem)/1.15 var(--f-titulo); letter-spacing: 0.01em; color: #fff; }
.versao { display: inline-block; margin: 0 0 0.8rem; padding: 0.3rem 0.8rem; border-radius: 99px; border: 1px solid rgba(255, 179, 71, 0.45);
  color: var(--ambar-claro); background: rgba(255, 179, 71, 0.08); font: 500 1rem/1.3 var(--f-texto); }
.doc-cabeca p { margin: 0.4rem 0; }

/* computador: sumário fixo ao lado; celular: sumário no alto */
.doc-grade { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (min-width: 1040px) {
  .doc-grade { grid-template-columns: 300px minmax(0, 1fr); gap: 2.4rem; }
  .sumario { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; scrollbar-width: thin; }
}
.sumario { padding: 1rem 1.1rem; border-radius: 18px; border: 1px solid var(--linha-forte); background: var(--cartao); }
.sumario h2 { margin: 0 0 0.5rem; font: 600 1rem/1.2 var(--f-titulo); letter-spacing: 0.04em; text-transform: uppercase; color: var(--gelo-2); }
.sumario ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.sumario li { counter-increment: s; }
.sumario li a { display: flex; gap: 0.55rem; padding: 0.32rem 0.2rem; color: var(--sec); text-decoration: none; font-size: 1rem; line-height: 1.35; border-radius: 8px; }
.sumario li a::before { content: counter(s) "."; flex: none; min-width: 1.6rem; color: var(--gelo-2); font-family: var(--f-titulo); font-weight: 600; }
.sumario li.anexo { counter-increment: none; }
.sumario li.anexo a::before { content: "+"; }
.sumario li a:hover { color: #fff; background: rgba(143, 203, 255, 0.08); }
@media (max-width: 1039px) { .sumario ol { columns: 2 16rem; column-gap: 1.2rem; } .sumario li { break-inside: avoid; } }
@media (min-width: 1040px) { .sumario { padding: 0.9rem; } .sumario li a { padding: 0.2rem; font-size: 1rem; } }

/* ── texto ───────────────────────────────────────────────────────────────────────────────────────────────────────── */
.texto { min-width: 0; max-width: 46rem; }
.texto section { padding: 0.2rem 0 0.6rem; border-top: 1px solid var(--linha); }
.texto section:first-child { border-top: 0; }
.texto h2 { margin: 1.5rem 0 0.6rem; font: 600 clamp(1.25rem, 2.6vw, 1.45rem)/1.25 var(--f-titulo); color: var(--gelo); scroll-margin-top: 1rem; }
.texto h3 { margin: 1.2rem 0 0.4rem; font: 600 1.08rem/1.3 var(--f-titulo); color: var(--texto); scroll-margin-top: 1rem; }
.texto p { margin: 0.55rem 0; }
.texto ul, .texto ol { margin: 0.5rem 0; padding-left: 1.3rem; }
.texto li { margin: 0.32rem 0; }
.texto li::marker { color: var(--gelo-2); }
.texto ol.letras { list-style: lower-alpha; }
.texto .n { color: var(--gelo-2); font-family: var(--f-titulo); font-weight: 600; margin-right: 0.3rem; }
.texto code { font-size: 1em; padding: 0.05rem 0.35rem; border-radius: 6px; background: rgba(143, 203, 255, 0.1); color: var(--gelo); }

.resumo { max-width: 46rem; margin: 0 0 1.4rem; padding: 1.1rem 1.25rem; border-radius: 18px; border: 1px solid rgba(111, 231, 255, 0.35); background: linear-gradient(180deg, rgba(111, 231, 255, 0.09), rgba(8, 21, 44, 0.85)); }
.resumo h2 { margin: 0 0 0.4rem; font: 600 1.15rem/1.2 var(--f-titulo); color: #fff; }
.resumo ul { margin: 0; padding-left: 1.2rem; }
.resumo li { margin: 0.32rem 0; }
.resumo li::marker { color: var(--gelo-2); }

/* cláusula que limita direito ou traz risco: em destaque (CDC, art. 54, § 4º) */
.destaque { margin: 0.9rem 0; padding: 0.9rem 1.1rem; border-radius: 14px; border: 1px solid rgba(255, 179, 71, 0.5); border-left: 4px solid var(--ambar); background: rgba(255, 179, 71, 0.08); }
.destaque > :first-child { margin-top: 0; }
.destaque > :last-child { margin-bottom: 0; }
.destaque .rotulo { display: block; margin-bottom: 0.25rem; font: 600 1rem/1.2 var(--f-titulo); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ambar-claro); }
.nota + .nota { margin-top: 0.8rem; }
.nota { padding: 0.8rem 1rem; border-radius: 14px; border: 1px solid var(--linha-forte); background: rgba(6, 22, 44, 0.6); }
.termo { font-style: normal; border-bottom: 1px dotted var(--gelo-2); }

/* tabelas: grade no computador, cartões no celular (cada célula traz o nome da coluna em data-rotulo) */
.tabela { width: 100%; margin: 0.8rem 0 1rem; border-collapse: separate; border-spacing: 0; font-size: 16px; line-height: 1.5;
  border: 1px solid var(--linha-forte); border-radius: 14px; overflow: hidden; background: rgba(6, 22, 44, 0.55); }
.tabela caption { text-align: left; padding: 0 0 0.4rem; color: var(--sec); font-size: 1rem; caption-side: top; }
.tabela th, .tabela td { padding: 0.65rem 0.8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linha); }
.tabela thead th { font: 600 1rem/1.3 var(--f-titulo); letter-spacing: 0.03em; color: var(--gelo); background: rgba(111, 231, 255, 0.08); }
.tabela tbody tr:last-child > * { border-bottom: 0; }
.tabela tbody th { color: var(--texto); font-weight: 600; }
@media (max-width: 680px) {
  .tabela, .tabela tbody, .tabela tr, .tabela th, .tabela td { display: block; width: 100%; }
  .tabela thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabela tr { padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--linha-forte); }
  .tabela tbody tr:last-child { border-bottom: 0; }
  .tabela th, .tabela td { padding: 0.25rem 0.8rem; border: 0; }
  .tabela td[data-rotulo]::before { content: attr(data-rotulo); display: block; font: 600 1rem/1.3 var(--f-titulo); letter-spacing: 0.04em; text-transform: uppercase; color: var(--gelo-2); }
  .voltar, .doc-abas a, .versao, .sumario li a, .destaque .rotulo, .tabela caption, .doc-rodape, .ao-topo { font-size: 1rem; }
  .texto code { font-size: 1em; }
}

/* ── rodapé e atalho para o sumário ──────────────────────────────────────────────────────────────────────────────── */
.doc-rodape { margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid var(--linha-forte); color: var(--sec); font-size: 1rem; }
.doc-rodape p { margin: 0.35rem 0; }
.doc-rodape nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0.6rem 0; }
.ao-topo-trilho { position: sticky; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 5; display: flex; justify-content: flex-end;
  margin-top: 1.4rem; pointer-events: none; }   /* gruda embaixo só enquanto o texto está na tela: não cobre o topo da página */
.ao-topo { pointer-events: auto; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; padding: 0 1rem; border-radius: 99px;
  border: 1px solid rgba(200, 245, 255, 0.6); background: rgba(5, 15, 35, 0.92); color: var(--gelo); font: 600 1rem/1 var(--f-texto);
  text-decoration: none; box-shadow: 0 0.4rem 1.4rem -0.4rem rgba(0, 0, 0, 0.8); }
.ao-topo:hover { color: #fff; background: rgba(11, 42, 76, 0.96); }

/* no celular, nenhum texto auxiliar visível fica abaixo de 16 px */
@media (max-width: 680px) {
  .voltar, .doc-abas a, .versao, .sumario li a, .texto code, .destaque .rotulo,
  .tabela caption, .tabela thead th, .tabela td[data-rotulo]::before, .doc-rodape, .ao-topo { font-size: 1rem; }
}

/* ── impressão: fundo branco, sem botões ─────────────────────────────────────────────────────────────────────────── */
@media print {
  html, body { background: #fff !important; color: #111; font-size: 12pt; }
  .doc { max-width: none; padding: 0; }
  .voltar, .doc-abas, .ao-topo-trilho, .pular, .sumario { display: none !important; }
  .doc-grade { display: block; }
  .texto { max-width: none; }
  .doc-cabeca h1, .texto h2, .texto h3, .resumo h2, strong, b, .marca { color: #000 !important; }
  .versao, .destaque .rotulo { color: #000; border-color: #999; background: none; }
  a { color: #000; }
  .resumo, .destaque, .nota, .tabela { background: none !important; border-color: #999 !important; }
  .tabela thead th { background: #eee !important; color: #000; }
  .texto section { break-inside: auto; }
  .texto h2, .texto h3 { break-after: avoid; }
}
