:root {
  --azul: #0b3d6b;
  --azul-claro: #e8f0f8;
  --ambar: #f2a900;
  --texto: #1c2430;
  --suave: #556170;
  --fundo: #ffffff;
  --fundo-2: #f4f6f9;
  --borda: #dde3ea;
  --link: #0b5cad;
  --raio: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --azul-claro: #16273a;
    --texto: #e6ebf1;
    --suave: #a9b4c1;
    --fundo: #0f141a;
    --fundo-2: #161e27;
    --borda: #2a3644;
    --link: #8cbcff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ambar); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.25; margin: 1.6em 0 0.5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-top: 0.4em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.faixa { width: min(72rem, 100% - 2rem); margin-inline: auto; }

.pular {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ambar); color: #000; padding: 0.5rem 1rem; border-radius: var(--raio);
  z-index: 10;
}
.pular:focus { top: 1rem; }

/* Topo */
.topo { background: var(--azul); color: #fff; border-bottom: 4px solid var(--ambar); }
.topo-faixa { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 0.75rem; }
.marca { display: inline-flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.logo { width: 2rem; height: 2rem; flex: none; }
.topo nav ul, .rodape nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.topo nav a { color: #fff; text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.topo nav a:hover, .topo nav a[aria-current="page"] { border-bottom-color: var(--ambar); }

/* Destaque da home */
.destaque { background: linear-gradient(180deg, var(--azul-claro), var(--fundo)); padding-block: 3rem 2rem; }
.destaque h1 { max-width: 22ch; }
.linha-fina { font-size: 1.2rem; color: var(--suave); max-width: 60ch; }
.chapeu { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; font-weight: 700; color: var(--suave); margin: 0; }
.botao {
  display: inline-block; background: var(--azul); color: #fff; text-decoration: none; font-weight: 600;
  padding: 0.7rem 1.3rem; border-radius: var(--raio); border: 2px solid var(--azul);
}
.botao:hover { background: transparent; color: var(--link); }
@media (prefers-color-scheme: dark) { .botao { border-color: var(--link); } }

.secao { padding-block: 1rem; }

.temas, .cartoes { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.temas li, .cartao { background: var(--fundo-2); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.1rem 1.2rem; }
.temas strong { display: block; margin-bottom: 0.25rem; }
.cartao h3 { margin: 0.3rem 0 0.4rem; }
.cartao p:last-child { margin-bottom: 0; color: var(--suave); }

.caixa { background: var(--fundo-2); border-left: 5px solid var(--ambar); border-radius: var(--raio); padding: 0.4rem 1.4rem 1rem; }
.caixa h2 { margin-top: 0.8em; }

/* Artigos e páginas de texto */
.artigo, .texto { width: min(46rem, 100% - 2rem); margin: 1.5rem auto 3rem; }
.artigo header { margin-bottom: 1.5rem; }
.meta-artigo { color: var(--suave); font-size: 0.95rem; }
.artigo li + li, .texto li + li { margin-top: 0.35rem; }

.migalhas { font-size: 0.9rem; margin-top: 1rem; }
.migalhas ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; color: var(--suave); }
.migalhas li + li::before { content: "›"; margin-right: 0.3rem; }

.tabela { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { border: 1px solid var(--borda); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
th { background: var(--fundo-2); }

dl.ficha { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.2rem; }
dl.ficha dt { font-weight: 600; }
dl.ficha dd { margin: 0; }

blockquote { margin: 1rem 0; padding: 0.6rem 1.2rem; border-left: 4px solid var(--borda); color: var(--suave); }

.linha-tempo { list-style: none; padding: 0; border-left: 3px solid var(--ambar); margin-left: 0.5rem; }
.linha-tempo li { position: relative; padding: 0 0 1.2rem 1.4rem; }
.linha-tempo li::before { content: ""; position: absolute; left: -0.55rem; top: 0.45rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--azul); border: 2px solid var(--fundo); }
.linha-tempo .ano { display: block; font-weight: 700; color: var(--link); }

.fontes { font-size: 0.95rem; }

/* Formulário */
form.contato { display: grid; gap: 1rem; max-width: 36rem; }
form.contato label { display: grid; gap: 0.3rem; font-weight: 600; }
form.contato input, form.contato select, form.contato textarea {
  font: inherit; color: inherit; background: var(--fundo); border: 1px solid var(--borda); border-radius: 8px; padding: 0.6rem 0.7rem;
}
form.contato textarea { min-height: 9rem; resize: vertical; }
form.contato button { font: inherit; font-weight: 600; cursor: pointer; justify-self: start; background: var(--azul); color: #fff; border: 0; border-radius: var(--raio); padding: 0.7rem 1.4rem; }
.campo-isca { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.nota { font-size: 0.92rem; color: var(--suave); }

/* Rodapé */
.rodape { background: var(--fundo-2); border-top: 1px solid var(--borda); margin-top: 3rem; padding-block: 1.5rem; font-size: 0.93rem; color: var(--suave); }
.rodape nav ul { margin-bottom: 1rem; }
.rodape .aviso { max-width: 70ch; }
