:root {
  --fundo: #f4f7fb;
  --papel: #ffffff;
  --tinta: #15202e;
  --suave: #556274;
  --linha: #d6dee9;
  --acento: #1d4f91;
  --acento-forte: #153b6e;
  --acento-claro: #e5eefa;
  --erro: #b3261e;
  --raio: 10px;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
#calc { scroll-margin-top: 16px; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--tinta);
  font: 17px/1.6 var(--sans);
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.calc-zona { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
@media (min-width: 960px) {
  .calc-zona { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 28px; align-items: start; }
  #resultado { position: sticky; top: 16px; }
  #resultado .resultado { margin-top: 0; }
}
.resultado-vazio { margin: 20px 0 0; padding: 24px; border: 1px dashed var(--linha); border-radius: var(--raio); color: var(--suave); text-align: center; }
@media (min-width: 960px) { .resultado-vazio { margin-top: 0; } }
a { color: var(--acento); text-underline-offset: 2px; }
a:hover { color: var(--acento-forte); }

/* Topo */
.topo { border-bottom: 1px solid var(--linha); background: var(--papel); }
.topo-in {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas: "marca cta linguas" "nav nav nav";
  align-items: center;
  gap: 4px 10px;
  padding-top: 10px;
  padding-bottom: 2px;
}
.marca { grid-area: marca; min-width: 0; white-space: nowrap; }
.linguas { grid-area: linguas; display: flex; gap: 4px; }
.linguas a { display: grid; place-items: center; width: 34px; height: 36px; border-radius: 6px; border: 2px solid transparent; opacity: .55; transition: opacity .15s; }
.linguas a:hover { opacity: 1; }
.linguas a[aria-current] { opacity: 1; border-color: var(--linha); background: var(--fundo); }
.linguas img { display: block; width: 24px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.topo-in { position: relative; } /* os painéis do menu, em mobile, ocupam a largura do topo */
.topo nav { grid-area: nav; display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.topo nav > a, .menu-grupo > summary { white-space: nowrap; padding: 10px 0; }
.botao.topo-cta { grid-area: cta; justify-self: end; white-space: nowrap; font-size: 15px; padding: 8px 12px; min-height: 40px; }
@media (max-width: 419px) { .topo-cta-extra { display: none; } }
@media (min-width: 960px) {
  .topo-in { grid-template-columns: auto 1fr auto auto; grid-template-areas: "marca nav cta linguas"; gap: 6px 16px; padding-bottom: 10px; }
  .topo nav { justify-content: flex-end; flex-wrap: nowrap; gap: 4px 16px; }
  .topo nav > a, .menu-grupo > summary { padding: 4px 0; }
  .linguas { gap: 6px; }
  .linguas a { width: 40px; }
  .botao.topo-cta { padding: 8px 14px; }
}
.marca { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--tinta); text-decoration: none; }
.marca-logo { display: block; width: 40px; height: 40px; flex: none; }
@media (max-width: 359px) {
  .topo-in { column-gap: 8px; }
  .topo nav { column-gap: 14px; font-size: 14px; }
  .marca { font-size: 15px; gap: 6px; } .marca-logo { width: 32px; height: 32px; }
  .linguas { gap: 2px; } .linguas a { width: 30px; }
}
nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; }
nav a { color: var(--suave); text-decoration: none; padding: 2px 0; }
nav a[aria-current="page"], nav a:hover { color: var(--tinta); box-shadow: inset 0 -2px var(--acento); }

/* Menu por temas: <details> abre um painel; sem JavaScript também funciona */
.menu-grupo > summary { list-style: none; cursor: pointer; color: var(--suave); display: flex; align-items: center; gap: 5px; }
.menu-grupo > summary::-webkit-details-marker { display: none; }
.menu-grupo > summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.menu-grupo[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.menu-grupo > summary:hover, .menu-grupo[open] > summary, .menu-grupo > summary.ativo { color: var(--tinta); }
.menu-grupo > summary.ativo { box-shadow: inset 0 -2px var(--acento); }
.menu-painel { position: absolute; z-index: 10; top: 100%; left: 16px; right: 16px; margin-top: 4px; padding: 8px; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: 0 10px 30px rgba(15, 30, 50, .14); }
.menu-painel ul { list-style: none; margin: 0; padding: 0; }
.menu-painel li a { display: grid; gap: 1px; padding: 9px 12px; border-radius: 8px; color: var(--tinta); font-weight: 600; white-space: normal; }
.menu-painel li a span { font-weight: 400; font-size: 14px; color: var(--suave); }
.menu-painel li a:hover, .menu-painel li a[aria-current="page"] { background: var(--acento-claro); box-shadow: none; }
.menu-painel .menu-mais { display: block; margin-top: 4px; padding: 9px 12px; border-top: 1px solid var(--linha); color: var(--acento); font-size: 14px; }
.menu-painel .menu-mais:hover { color: var(--acento-forte); box-shadow: none; text-decoration: underline; }
@media (min-width: 960px) {
  .menu-grupo { position: relative; }
  .menu-painel { left: -12px; right: auto; width: 320px; margin-top: 10px; }
  /* O último grupo fica junto à margem direita: o painel abre para a esquerda */
  .menu-grupo:last-of-type .menu-painel { left: auto; right: -12px; }
}
.asterisco { font-size: .55em; vertical-align: super; color: var(--suave); margin-left: 2px; font-family: var(--sans); }

/* Texto */
/* main.wrap: o padding de .wrap (0 16px) anulava o de main e o fim da página colava ao rodapé */
main.wrap { padding-bottom: 40px; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 5vw, 38px); line-height: 1.15; margin: 22px 0 6px; letter-spacing: -0.01em; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1.25; margin: 40px 0 10px; }
h3 { font-size: 18px; margin: 26px 0 6px; }
.atualizado { margin: 0 0 22px; color: var(--suave); font-size: 14px; }
.intro { font-size: 18px; }
.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Calculadora */
.calc {
  background: var(--papel);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.campo { display: grid; gap: 4px; }
[data-concelho-passos] { display: grid; gap: 16px; }
.calc [hidden] { display: none; }
.campo label, legend, .comprador-titulo { font-weight: 600; font-size: 15px; }
input[type="text"], input:not([type]), input[inputmode], select {
  width: 100%;
  font: inherit;
  color: var(--tinta);
  background: var(--fundo);
  border: 1px solid var(--linha);
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 46px;
}
input:focus-visible, select:focus-visible, summary:focus-visible, .botao:focus-visible, .segmentado input:focus-visible + label {
  outline: 3px solid color-mix(in srgb, var(--acento) 45%, transparent);
  outline-offset: 2px;
}
.campo-valor input { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Telemóvel: 16px para "Habitação própria e permanente" caber; menos faz o iOS ampliar ao tocar */
@media (max-width: 599px) { select { font-size: 16px; } }
/* O WebKit desenha o texto de uma opção longa fora do <select> e a página ganha scroll horizontal */
select { contain: paint; }
.com-sufixo { position: relative; }
.com-sufixo input { padding-right: 36px; }
.com-sufixo span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--suave); pointer-events: none; }
.grelha-2, .grelha-3 { display: grid; gap: 12px; }
@media (min-width: 600px) {
  .grelha-2 { grid-template-columns: 1fr 1fr; }
  .grelha-3 { grid-template-columns: repeat(3, 1fr); }
}
.ajuda { margin: 0; font-size: 14px; color: var(--suave); }
.invalido input { border-color: var(--erro); }
.msg-erro, .erro-geral { margin: 0; color: var(--erro); font-size: 14px; font-weight: 600; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
legend { padding: 0; margin-bottom: 8px; }
.segmentado { display: inline-flex; border: 1px solid var(--linha); border-radius: 8px; overflow: hidden; width: max-content; max-width: 100%; }
.segmentado input { position: absolute; opacity: 0; }
.segmentado label { padding: 8px 14px; text-align: center; cursor: pointer; font-size: 15px; font-weight: 500; }
.segmentado input:checked + label { background: var(--acento); color: var(--papel); }
.comprador { display: grid; gap: 6px; }
.comprador + .comprador { border-top: 1px dashed var(--linha); padding-top: 10px; }
.comprador-titulo { margin: 0; }
.campo-quota { max-width: 140px; }
.caixa { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.caixa input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--acento); flex: none; }
.calc:has(#n1:checked) .so-dois { display: none; }
.calc:has(#r1:checked) .so-nr1, .calc:has(#r2:checked) .so-nr2 { display: none; }
.calc:has(#tipo option[value="rustico"]:checked) .so-urbano { display: none; }
.calc:has(#tipo-heranca:checked) .so-doacao, .calc:has(#usufruto:not(:checked)) .so-usufruto { display: none; }
.calc:has(#tipo-fixa:checked) .so-variavel, .calc:has(#tipo-variavel:checked) .so-fixa { display: none; }

details.outros { border-top: 1px solid var(--linha); padding-top: 12px; }
details.outros summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--acento); }
details.outros[open] summary { margin-bottom: 12px; }
details.outros .ajuda { margin-top: 8px; }

.botao {
  font: inherit; font-weight: 600;
  background: var(--acento); color: var(--papel);
  border: 0; border-radius: 8px;
  padding: 12px 22px; min-height: 48px;
  cursor: pointer; text-decoration: none; display: inline-block;
  justify-self: start;
}
.botao:hover { background: var(--acento-forte); color: var(--papel); }
.botao-sec { background: transparent; color: var(--acento); border: 1px solid var(--acento); }
.botao-sec:hover { background: var(--acento-claro); color: var(--acento-forte); }

/* Resultado */
.resultado { margin-top: 20px; }
.destaques { display: grid; gap: 12px; }
@media (min-width: 600px) { .destaques { grid-template-columns: 1fr 1fr; } }
.destaque { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px 18px; display: grid; }
.destaque-total { background: var(--acento-claro); border-color: transparent; }
.destaque-rotulo { font-size: 14px; color: var(--suave); }
.destaque-valor { font-family: var(--serif); font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.poupanca { margin: 12px 0 0; color: var(--acento); }
.reembolso { margin: 12px 0 0; }
.reembolso p { margin: 0; }
.reembolso ul { margin: 4px 0 0; padding-left: 20px; }
table.detalhe { width: 100%; border-collapse: collapse; margin-top: 16px; font-variant-numeric: tabular-nums; }
.detalhe th, .detalhe td { padding: 9px 0; border-bottom: 1px solid var(--linha); text-align: left; vertical-align: top; }
.detalhe th { font-weight: 400; }
.detalhe td { text-align: right; white-space: nowrap; padding-left: 12px; }
.detalhe thead th { font-size: 14px; color: var(--suave); text-align: right; }
.detalhe thead th:first-child { text-align: left; }
.detalhe small { color: var(--suave); }
.detalhe .subtotal th, .detalhe .subtotal td { font-weight: 600; }
.detalhe .total th, .detalhe .total td { font-weight: 700; border-bottom: 2px solid var(--tinta); }
@media (max-width: 359px) { .detalhe { font-size: 15px; } .detalhe td { padding-left: 8px; } }
.regime { margin: 12px 0 0; font-weight: 600; }
.aviso-forte { margin: 12px 0 0; color: var(--erro); font-weight: 600; }
.resultado .ajuda { margin-top: 6px; }
details.plano { margin-top: 20px; }
details.plano summary { cursor: pointer; font-weight: 600; color: var(--acento); }
.notas { margin: 16px 0 0; padding: 12px 16px 12px 32px; background: var(--papel); border-left: 3px solid var(--acento); border-radius: 0 8px 8px 0; font-size: 15px; }
.notas li + li { margin-top: 6px; }
.requisitos { list-style: none; margin: 16px 0 0; padding: 0; font-size: 15px; display: grid; gap: 4px; }
.requisitos span[aria-hidden] { display: inline-block; width: 1.2em; font-weight: 700; }
.req-sim span[aria-hidden] { color: var(--acento); }
.req-nao { color: var(--erro); }
.req-talvez { color: var(--suave); }
.cta { margin-top: 18px; padding: 16px; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--papel); display: grid; gap: 8px; }
.cta p { margin: 0; font-weight: 600; }
.cta small { color: var(--suave); }
.proximos { display: block; margin-top: 20px; } /* é um <nav>: sem o flex do menu, a lista ocupa a largura toda */
.proximos h3 { margin: 0 0 8px; }
.proximos ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.proximos a { display: grid; gap: 2px; height: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--papel); font-weight: 600; text-decoration: none; }
.proximos a:hover { border-color: var(--acento); }
.proximos small { color: var(--suave); font-size: 14px; font-weight: 400; }
.partilhar { margin: 16px 0 0; font-size: 15px; }
.aviso { margin: 4px 0 0; font-size: 13px; color: var(--suave); }
.anuncio { margin-top: 24px; min-height: 100px; }

/* Conteúdo */
.conteudo table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; margin: 10px 0 6px; }
.conteudo caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.conteudo th, .conteudo td { padding: 8px 6px; border-bottom: 1px solid var(--linha); text-align: right; }
.conteudo th:first-child, .conteudo td:first-child { text-align: left; }
.conteudo thead th { font-size: 13px; color: var(--suave); font-weight: 600; }
.tabela-scroll { overflow-x: auto; }
.faq dt { font-weight: 600; margin-top: 16px; }
.faq dd { margin: 4px 0 0; }
.fonte { font-size: 14px; color: var(--suave); }
.acordeao { border-top: 1px solid var(--linha); margin-top: 12px; }
.acordeao details { border-bottom: 1px solid var(--linha); }
.acordeao summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; font-weight: 600; }
.acordeao summary::-webkit-details-marker { display: none; }
.acordeao summary::after { content: "+"; flex: none; color: var(--acento); font-size: 24px; font-weight: 400; line-height: 1; }
.acordeao details[open] summary::after { content: "\2212"; }
.acordeao summary:hover { color: var(--acento); }
.acordeao .resposta { padding-bottom: 16px; }
.acordeao .resposta > :first-child { margin-top: 0; }
.acordeao .resposta > :last-child { margin-bottom: 0; }

.rodape { border-top: 1px solid var(--linha); background: var(--papel); padding: 18px 0 28px; font-size: 13px; color: var(--suave); }
.rodape p { margin: 0; }
.rodape-aviso { padding-bottom: 14px; margin-bottom: 14px !important; border-bottom: 1px solid var(--linha); }
.rodape-barra { display: flex; flex-direction: column; gap: 10px; }
.rodape-mapa + .rodape-barra { padding-top: 12px; border-top: 1px solid var(--linha); }
.rodape .sep { margin: 0 6px; opacity: .6; }
.rodape-dir { display: flex; flex-direction: column; align-items: flex-start; font-size: 13px; }
.rodape-linha { display: flex; flex-wrap: wrap; align-items: center; }
.rodape-dir a, .rodape-dir .link-botao { color: var(--suave); padding: 6px 0; }
.rodape-dir a:hover, .rodape-dir a[aria-current], .rodape-dir .link-botao:hover { color: var(--tinta); box-shadow: none; text-decoration: underline; }
.rodape-mapa { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px 24px; margin: 4px 0 22px; font-size: 14px; }
.rodape-mapa p { margin: 0 0 6px; font-weight: 700; color: var(--tinta); }
.rodape-mapa ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rodape-mapa a { color: var(--suave); padding: 3px 0; display: inline-block; text-decoration: none; }
.rodape-mapa a:hover, .rodape-mapa a[aria-current] { color: var(--tinta); }
.link-botao { font: inherit; background: none; border: 0; cursor: pointer; }
.rodape-esq a { color: var(--suave); }
.rodape-esq a:hover { color: var(--tinta); box-shadow: none; }
.rodape-esq .rodape-linha { display: block; }
.rodape-esq .rodape-linha + .rodape-linha { margin-top: 4px; }
.coracao { color: #d9443b; }
@media (max-width: 1079px) {
  .rodape-esq { order: 1; padding-top: 12px; border-top: 1px solid var(--linha); }
  /* Mesma separação por cima da barra que entre os links legais e o copyright */
  .rodape .rodape-mapa { margin-bottom: 10px; }
  .rodape-barra { padding-top: 12px; border-top: 1px solid var(--linha); }
}
@media (max-width: 759px) {
  .rodape-mapa { text-align: center; }
  .rodape-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; justify-items: center; text-align: center; }
  .rodape-dir .link-botao { text-align: center; }
  .rodape-linha { display: contents; }
  .rodape-esq { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
  .rodape-barra .sep { display: none; }
  .rodape-esq .sep { display: inline; }
}
@media (min-width: 1080px) {
  .rodape-barra { flex-direction: row; justify-content: space-between; align-items: center; gap: 24px; }
  .rodape-dir { align-items: flex-end; white-space: nowrap; }
  .rodape-dir a, .rodape-dir .link-botao { padding: 2px 0; }
}

/* Guia e artigos */
.migalhas { margin: -12px 0 18px; font-size: 14px; color: var(--suave); }
.lista-artigos { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.lista-artigos li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--linha); }
.lista-artigos a { font-weight: 600; text-decoration: none; }
.lista-artigos a:hover { text-decoration: underline; }
.lista-artigos span { font-size: 15px; color: var(--suave); }
.artigo .formula { font-family: var(--serif); font-size: 18px; padding: 10px 14px; background: var(--acento-claro); border-radius: 8px; max-width: max-content; }
.artigo .calc-zona { margin: 24px 0; max-width: none; }
.artigo .aviso { font-size: 14px; margin-top: 24px; }
.artigo .fontes { font-size: 14px; color: var(--suave); }
.artigo tbody th { text-align: left; }
.voltar { margin-top: 32px; font-size: 15px; }
.conteudo.artigo { max-width: 1080px; } /* a calculadora do artigo fica a esta largura */

/* Simuladores e guia por temas */
.tema-resumo { color: var(--suave); margin: 0 0 14px; }
.tema-simuladores { font-size: 15px; color: var(--suave); margin: 0 0 4px; }
.tema-mais { margin: 12px 0 0; font-size: 15px; }
.cartoes { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 600px) { .cartoes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cartoes { grid-template-columns: repeat(3, 1fr); } }
.cartao { display: grid; align-content: start; gap: 4px; height: 100%; box-sizing: border-box; padding: 16px 18px; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); text-decoration: none; color: var(--tinta); transition: border-color .15s; }
.cartao strong { color: var(--acento); }
.cartao span { font-size: 15px; color: var(--suave); }
.cartao:hover { border-color: var(--acento); color: var(--tinta); }
.cartao:hover strong { text-decoration: underline; }

/* Páginas legais */
.legal td, .legal th { text-align: left !important; vertical-align: top; }
.legal table { font-size: 14px; }
/* Calculadora dentro de um artigo: coluna única, a largura é a do texto */
.artigo .calc-zona { grid-template-columns: 1fr; gap: 0; }
.artigo #resultado { position: static; margin-top: 20px; }
.artigo #resultado .resultado, .artigo #resultado .resultado-vazio { margin-top: 0; }
/* Tabelas dos artigos: em mobile fazem scroll horizontal em vez de partir os números */
.artigo .tabela-scroll table { min-width: 520px; }
.artigo .tabela-scroll td, .artigo .tabela-scroll th { white-space: nowrap; }
.artigo .tabela-scroll td:only-child, .artigo .tabela-scroll td[colspan] { white-space: normal; }

/* Checklist da compra de casa */
.checklist-barra { position: sticky; top: 0; z-index: 1; background: var(--fundo); border-bottom: 1px solid var(--linha); padding: 10px 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.checklist-progresso { margin: 0; font-weight: 600; }
.checklist-acoes { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.checklist-acoes .link-botao { color: var(--acento); text-decoration: underline; padding: 6px 0; }
.checklist-fase ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist-fase h2 { margin-top: 28px; }
.checklist-texto { color: var(--suave); font-size: 15px; }
.checklist input:checked + span strong { text-decoration: line-through; color: var(--suave); }

/* Impressão: só o conteúdo, sem menus, anúncios nem botões */
@media print {
  .topo, .rodape, .anuncio, .botao, .link-botao, .partilhar, .proximos, .checklist-acoes { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .wrap { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .checklist-barra { position: static; border: 0; padding: 0; }
  .checklist-fase { break-inside: avoid-page; }
  .checklist-fase li { break-inside: avoid; }
  .checklist input { appearance: none; -webkit-appearance: none; width: 12pt; height: 12pt; border: 1px solid #000; margin-top: 2pt; }
  .checklist input:checked { background: #000; }
  .checklist input:checked + span strong { text-decoration: none; color: #000; }
}

/* Página 404 */
.p404-numero { margin: 0; font: 700 clamp(4rem, 18vw, 7rem)/1 var(--serif, Georgia, serif); color: var(--acento); letter-spacing: -.02em; }
.p404-graca { margin: 8px 0 4px; font-size: 1.3rem; font-weight: 600; }

/* Botão "voltar ao topo" */
.voltar-topo {
  position: fixed; z-index: 5;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--raio);
  background: var(--acento); color: var(--papel);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  cursor: pointer;
}
.voltar-topo:hover { background: var(--acento-forte); }
.voltar-topo:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }
.voltar-topo[hidden] { display: none; }
/* Até o rodapé ter margem lateral para o botão: espaço por baixo, para não tapar ligações no fim da página */
@media (max-width: 1199px) { .rodape { padding-bottom: 76px; } }
@media print { .voltar-topo { display: none !important; } }

/* Caixa de apoio (pagamento Stripe), no fim de todas as páginas */
.apoio {
  margin: 40px 0; padding: 24px; border: 1px dashed var(--linha); border-radius: var(--raio);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.apoio p { margin: 0; color: var(--suave); max-width: 640px; }
.apoio-texto { flex: 999 1 320px; } /* fica com o espaço livre; o bloco do botão só cresce quando passa para a sua própria linha */
.apoio h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 1.125rem; line-height: 1.3; }
.apoio h2 img { width: 32px; height: 32px; flex: none; }
.apoio-acao { flex: 1 1 auto; text-align: center; }
.apoio-acao p { margin-top: 8px; max-width: none; font-size: 0.8rem; }
.apoio .botao { text-decoration: none; }
main > .apoio:last-child { margin-bottom: 0; } /* o main destes sites já tem padding em baixo */
@media (max-width: 640px) { .apoio-extra { display: none; } }
@media print { .apoio { display: none !important; } }
