/* ═══════════════════════════════════════════════════════
   TRAZERAMORDEVOLTA.PT — Estilo da app (modelo Grimório)
   Paleta: pergaminho creme + bordô + dourado. Legibilidade primeiro.
   Para mudar cores: só os valores do :root.
   ═══════════════════════════════════════════════════════ */
/* Fontes alojadas no próprio site (sem pedidos à Google — mais rápido e RGPD) */
@font-face { font-family: 'EB Garamond'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fontes/eb-garamond-600.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fontes/eb-garamond-700.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fontes/lora-400.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-weight: 400; font-style: italic; font-display: swap; src: url('/assets/fontes/lora-400-italico.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-weight: 600 700; font-style: normal; font-display: swap; src: url('/assets/fontes/lora-600.woff2') format('woff2'); }

:root {
  --fundo: #fbf3dc;
  --papel: #fffaee;
  --papel-2: #f6ead0;
  --texto: #1a1a1a;
  --texto-2: #463a33;
  --bordo: #7a1010;
  --bordo-esc: #5c0b0b;
  --bordo-claro: #9b2020;
  --dourado: #b8912f;
  --dourado-esc: #7d6118;
  --linha: #e4d3a6;
  --sombra: 0 1px 2px rgba(60, 30, 10, .08), 0 6px 18px rgba(60, 30, 10, .07);
  --raio: 12px;
  --letra-base: 18px;
  --f-titulo: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --f-texto: 'Lora', Georgia, 'Times New Roman', serif;
  --largura-texto: 46rem;
  --largura: 72rem;
  --barra-app: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--letra-base); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 1rem;
  line-height: 1.7;
  padding-bottom: calc(var(--barra-app) + env(safe-area-inset-bottom));
}
img, svg { max-width: 100%; }
a { color: var(--bordo); text-underline-offset: 3px; }
a:hover { color: var(--bordo-esc); }
:focus-visible { outline: 3px solid var(--dourado); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -9999px; top: 0; background: var(--bordo); color: #fff; padding: .6rem 1rem; z-index: 100; }
.saltar:focus { left: 0; }

h1, h2, h3, h4 { font-family: var(--f-titulo); color: var(--bordo); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 6vw, 2.9rem); margin: .3rem 0 .6rem; }
h2 { font-size: clamp(1.5rem, 4.4vw, 1.9rem); margin: 2.2rem 0 .7rem; }
h3 { font-size: 1.35rem; margin: 1.6rem 0 .5rem; }

/* ── Topo ───────────────────────────────────────── */
.topo {
  position: sticky; top: 0; z-index: 40;
  background: var(--bordo);
  border-bottom: 3px solid var(--dourado);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
.topo-in {
  max-width: var(--largura); margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  padding: .55rem 1rem;
}
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff7e2; flex-shrink: 0; }
.logo-marca {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fundo); color: var(--bordo);
  border: 2px solid var(--dourado);
  font-family: var(--f-titulo); font-weight: 700; font-size: 1.6rem; line-height: 1;
}
.logo-txt { display: flex; flex-direction: column; line-height: 1.05; }
.logo-nome { font-family: var(--f-titulo); font-size: 1.55rem; font-weight: 700; letter-spacing: .02em; }
.logo-sub { font-family: var(--f-titulo); font-size: .82rem; color: #f0d98f; font-variant: small-caps; letter-spacing: .08em; }
.menu { display: none; flex: 1; justify-content: center; gap: .2rem; }
.menu a {
  color: #fff7e2; text-decoration: none;
  font-family: var(--f-titulo); font-weight: 600; font-size: 1.1rem;
  font-variant: small-caps; letter-spacing: .06em;
  padding: .45rem .7rem; border-radius: 6px;
}
.menu a:hover, .menu a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 -2px 0 var(--dourado); }
.topo-acoes { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.btn-icone { color: #fff7e2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; }
.btn-icone:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ── Painel de pesquisa ─────────────────────────── */
.pesquisa-painel { position: sticky; top: 64px; z-index: 39; background: var(--papel); border-bottom: 2px solid var(--linha); box-shadow: var(--sombra); padding: .8rem 1rem; }
.pesquisa-painel .pesquisa-form { max-width: var(--largura-texto); margin: 0 auto; display: flex; gap: .5rem; }
.pesquisa-painel .sugestoes { max-width: var(--largura-texto); margin: .4rem auto 0; position: static; }
.pesquisa-form input, .heroi-pesquisa input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 1.05rem; color: var(--texto);
  padding: .8rem 1rem; border: 2px solid var(--linha); border-radius: 10px; background: #fff;
}
.pesquisa-form input:focus, .heroi-pesquisa input:focus { border-color: var(--bordo); outline: none; box-shadow: 0 0 0 3px rgba(122, 16, 16, .15); }
.pesquisa-form button, .heroi-pesquisa button {
  font-family: var(--f-titulo); font-weight: 700; font-size: 1.1rem;
  background: var(--bordo); color: #fff; border: 0; border-radius: 10px; padding: 0 1.1rem; cursor: pointer; min-height: 52px;
}
.pesquisa-form .fechar { background: transparent; color: var(--texto-2); font-size: 1.3rem; padding: 0 .6rem; }

.sugestoes {
  list-style: none; margin: .3rem 0 0; padding: .3rem; background: #fff;
  border: 2px solid var(--linha); border-radius: 10px; box-shadow: var(--sombra);
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30; text-align: left;
}
.sugestoes a { display: block; padding: .6rem .8rem; border-radius: 8px; text-decoration: none; color: var(--texto); }
.sugestoes a:hover, .sugestoes a.foco { background: var(--papel-2); }
.sugestoes small { display: block; color: var(--texto-2); font-size: .82rem; }

/* ── Estrutura geral ────────────────────────────── */
main { display: block; }
.bloco, .relacionados, .lista-seccao { max-width: var(--largura); margin: 2.2rem auto; padding: 0 1rem; }
.largura-texto { max-width: var(--largura-texto); margin-left: auto; margin-right: auto; padding: 0 1rem; }
.titulo-bloco { font-size: 1.65rem; margin: 0 0 1rem; display: flex; align-items: center; gap: .6rem; }
.titulo-bloco::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--dourado), transparent); }
.titulo-bloco small { font-family: var(--f-texto); font-size: .9rem; color: var(--texto-2); font-weight: 400; }
.sobre-titulo { font-family: var(--f-titulo); font-variant: small-caps; letter-spacing: .12em; color: var(--dourado-esc); font-weight: 700; margin: 0; font-size: 1.05rem; }

/* ── Botões ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-family: var(--f-titulo); font-weight: 700; font-size: 1.12rem; line-height: 1.2;
  padding: .75rem 1.25rem; min-height: 50px; border-radius: 10px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
}
.btn-pri { background: var(--bordo); color: #fff; }
.btn-pri:hover { background: var(--bordo-esc); color: #fff; }
.btn-sec { background: transparent; color: var(--bordo); border-color: var(--bordo); }
.btn-sec:hover { background: var(--bordo); color: #fff; }
.btn-wa { background: #1f7a45; color: #fff; }
.btn-wa:hover { background: #17603a; color: #fff; }
.btn-perigo { background: #8f1d1d; color: #fff; }
.btn-largo { width: 100%; }
.ligacao { background: none; border: 0; color: var(--bordo); text-decoration: underline; cursor: pointer; font: inherit; font-size: .95rem; padding: .3rem; }
.botoes { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* ── Página inicial ─────────────────────────────── */
.heroi {
  text-align: center; padding: 2.4rem 1rem 2rem;
  background:
    radial-gradient(ellipse at top, rgba(184, 145, 47, .18), transparent 60%),
    var(--fundo);
  border-bottom: 1px solid var(--linha);
}
.heroi-sobre { font-family: var(--f-titulo); font-variant: small-caps; letter-spacing: .16em; color: var(--dourado-esc); font-weight: 700; margin: 0; font-size: 1.1rem; }
.heroi h1 { max-width: 22ch; margin: .4rem auto .8rem; }
.heroi-txt { max-width: 38rem; margin: 0 auto 1.4rem; color: var(--texto-2); font-size: 1.05rem; }
.heroi-pesquisa { position: relative; display: flex; gap: .5rem; max-width: 40rem; margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1rem auto 0; max-width: 44rem; }
.chip {
  font: inherit; font-size: .98rem; cursor: pointer;
  background: var(--papel); color: var(--bordo); text-decoration: none;
  border: 1.5px solid var(--linha); border-radius: 999px; padding: .45rem 1rem; min-height: 44px;
  display: inline-flex; align-items: center; gap: .35rem;
}
.chip.ativo { border-color: var(--bordo); background: var(--bordo); color: #fff; }
@media (hover: hover) { .chip:hover { border-color: var(--bordo); background: var(--bordo); color: #fff; } }
.chip small { opacity: .8; }

.grelha-seccoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .9rem; }
.seccao-cartao {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: .8rem;
  background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio);
  padding: 1rem 1.1rem; text-decoration: none; color: var(--texto); box-shadow: var(--sombra);
  transition: border-color .15s, transform .15s;
}
.seccao-cartao:hover { border-color: var(--bordo); transform: translateY(-2px); color: var(--texto); }
.seccao-ic { grid-row: 1 / span 3; font-size: 1.7rem; line-height: 1.2; }
.seccao-nome { font-family: var(--f-titulo); font-size: 1.35rem; font-weight: 700; color: var(--bordo); line-height: 1.2; }
.seccao-desc { font-size: .95rem; color: var(--texto-2); line-height: 1.5; margin-top: .2rem; }
.seccao-n { font-size: .85rem; color: var(--dourado-esc); margin-top: .35rem; font-weight: 600; }

/* ── Cartões de páginas ─────────────────────────── */
.grelha-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .9rem; }
.cartao {
  display: flex; flex-direction: column; gap: .25rem;
  background: var(--papel); border: 1px solid var(--linha); border-left: 4px solid var(--dourado);
  border-radius: 10px; padding: .95rem 1.1rem; text-decoration: none; color: var(--texto);
  box-shadow: var(--sombra); transition: border-color .15s;
}
.cartao:hover { border-color: var(--bordo); color: var(--texto); }
.cartao-sec { font-size: .82rem; color: var(--dourado-esc); font-weight: 600; letter-spacing: .02em; }
.cartao-tit { font-family: var(--f-titulo); font-size: 1.28rem; font-weight: 700; color: var(--bordo); line-height: 1.25; }
.cartao-txt { font-size: .95rem; color: var(--texto-2); line-height: 1.5; }
.cartao-destaque { border-left-color: var(--bordo); margin-bottom: 1rem; }
.ver-todos { text-align: center; margin: 1.2rem 0; font-family: var(--f-titulo); font-size: 1.15rem; font-weight: 700; }

/* ── Artigo ─────────────────────────────────────── */
.artigo-topo { max-width: var(--largura-texto); margin: 0 auto; padding: 1.4rem 1rem .4rem; }
.migalhas { font-size: .9rem; color: var(--texto-2); display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.migalhas a { color: var(--texto-2); }
.migalhas span[aria-current] { color: var(--texto); }
.artigo-seccao { margin: 1rem 0 0; font-family: var(--f-titulo); font-variant: small-caps; letter-spacing: .1em; font-weight: 700; color: var(--dourado-esc); font-size: 1.05rem; }
.artigo-lead { font-size: 1.12rem; color: var(--texto-2); margin: 0 0 .8rem; }
.artigo-meta { font-size: .92rem; color: var(--texto-2); display: flex; flex-wrap: wrap; gap: 1rem; }

.ferramentas {
  position: sticky; top: 64px; z-index: 20;
  max-width: var(--largura-texto); margin: .6rem auto 0; padding: .4rem 1rem;
  display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none;
  background: rgba(251, 243, 220, .96); backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--linha);
}
.ferramentas::-webkit-scrollbar { display: none; }
.ferr {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: .35rem;
  font: inherit; font-size: .95rem; font-weight: 600; color: var(--bordo);
  background: var(--papel); border: 1.5px solid var(--linha); border-radius: 999px;
  padding: .4rem .85rem; min-height: 44px; cursor: pointer;
}
.ferr svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ferr:hover { border-color: var(--bordo); }
.ferr[aria-pressed="true"] { background: var(--bordo); color: #fff; border-color: var(--bordo); }
.ferr[aria-pressed="true"] svg { fill: currentColor; }

.artigo-corpo { max-width: var(--largura-texto); margin: 0 auto; padding: 0 1rem; }
.indice-artigo { background: var(--papel); border: 1px solid var(--linha); border-radius: 10px; padding: .8rem 1.1rem; margin: 1.2rem 0 .4rem; }
.indice-artigo summary { font-family: var(--f-titulo); font-weight: 700; color: var(--bordo); font-size: 1.15rem; cursor: pointer; }
.indice-artigo ol { margin: .5rem 0 0; padding-left: 1.3rem; }
.indice-artigo li { margin: .2rem 0; }

.texto { font-size: 1rem; }
.texto p, .texto ul, .texto ol { margin: 0 0 1.1rem; }
.texto li { margin: .35rem 0; }
.texto strong { color: #000; }
.texto h2 { border-bottom: 1px solid var(--linha); padding-bottom: .3rem; }
.caixa-destaque {
  background: var(--papel); border: 1px solid var(--linha); border-left: 4px solid var(--bordo);
  border-radius: 8px; padding: 1rem 1.2rem; margin: 1.3rem 0; font-size: 1.05rem;
}
.caixa-destaque strong:first-child { color: var(--bordo); }
.caixa { background: var(--papel); border: 1px solid var(--linha); border-radius: 8px; padding: 1rem 1.2rem; margin: 1.3rem 0; }
.caixa-oracao {
  background: #fffdf6; border: 1px solid var(--linha); border-left: 4px solid var(--dourado);
  border-radius: 8px; padding: 1.3rem 1.4rem; margin: 1.4rem 0;
  font-style: italic; font-size: 1.1rem; line-height: 1.95;
}
.caixa-oracao p:last-child { margin-bottom: 0; }
/* grelhas herdadas do site antigo (cartões de serviço) */
.grid-servicos { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.card-servico { background: var(--papel); border: 1px solid var(--linha); border-radius: 10px; padding: 1rem; }
.card-servico h3 { margin: .3rem 0; font-size: 1.2rem; }
.card-servico p { font-size: .95rem; color: var(--texto-2); margin: 0 0 .4rem; }
.card-icone { font-size: 1.4rem; }
.card-link { font-weight: 600; }
.texto table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.texto th, .texto td { border: 1px solid var(--linha); padding: .5rem .7rem; text-align: left; }
.texto th { background: var(--papel-2); }

.bloco-mc { background: var(--papel-2); border: 1px solid var(--linha); border-radius: 10px; padding: 1rem 1.2rem; margin: 2rem 0; font-size: .98rem; }
.bloco-mc p { margin: 0; }
.bloco-mc.forte { background: var(--papel); border: 2px solid var(--dourado); padding: 1.3rem; }
.bloco-mc-tit { font-family: var(--f-titulo); font-size: 1.4rem; font-weight: 700; color: var(--bordo); margin-bottom: .4rem !important; }
.bloco-mc-botoes { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

.ant-seg { max-width: var(--largura-texto); margin: 1.5rem auto; padding: 0 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.ant-seg a { background: var(--papel); border: 1px solid var(--linha); border-radius: 10px; padding: .8rem 1rem; text-decoration: none; font-family: var(--f-titulo); font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.ant-seg a:hover { border-color: var(--bordo); }
.ant-seg small { display: block; font-family: var(--f-texto); font-weight: 400; font-size: .85rem; color: var(--texto-2); }
.ant-seg .seg { text-align: right; }

/* ── Explorar ───────────────────────────────────── */
.explorar-lista { display: grid; gap: .6rem; }
.explorar-sec { background: var(--papel); border: 1px solid var(--linha); border-radius: 10px; }
.explorar-sec summary { display: flex; align-items: center; gap: .8rem; padding: .85rem 1.1rem; cursor: pointer; list-style: none; min-height: 56px; }
.explorar-sec summary::-webkit-details-marker { display: none; }
.explorar-sec summary::after { content: "›"; margin-left: auto; font-size: 1.6rem; color: var(--dourado-esc); transition: transform .2s; }
.explorar-sec[open] summary::after { transform: rotate(90deg); }
.explorar-nome { font-family: var(--f-titulo); font-size: 1.3rem; font-weight: 700; color: var(--bordo); }
.explorar-nome small { font-family: var(--f-texto); font-size: .85rem; color: var(--texto-2); font-weight: 400; margin-left: .3rem; }
.explorar-desc { margin: 0 1.1rem .6rem; color: var(--texto-2); font-size: .95rem; }
.explorar-sec ul { margin: 0; padding: 0 1.1rem 1rem 2.4rem; columns: 2 16rem; column-gap: 2rem; }
.explorar-sec li { margin: .3rem 0; break-inside: avoid; }

/* ── Pesquisa ───────────────────────────────────── */
.pesquisa-pagina { margin-top: 1rem; }
.pesquisa-total { margin: 1.2rem 0 .6rem; }
.filtros { justify-content: flex-start; margin: 0 0 1rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
.filtros .chip { flex-shrink: 0; }
.resultados { list-style: none; margin: 0; padding: 0; }
.resultados li { border-bottom: 1px solid var(--linha); }
.resultados a { display: flex; flex-direction: column; padding: .9rem .2rem; text-decoration: none; color: var(--texto); }
.resultados a:hover .res-tit { text-decoration: underline; }
.res-sec { font-size: .82rem; color: var(--dourado-esc); font-weight: 600; }
.res-tit { font-family: var(--f-titulo); font-size: 1.3rem; font-weight: 700; color: var(--bordo); line-height: 1.25; }
.res-txt { font-size: .95rem; color: var(--texto-2); }
.vazio { background: var(--papel); border: 1px dashed var(--linha); border-radius: 10px; padding: 1.2rem; margin: 1rem 0; }
.pesquisa-dica { margin: 1.2rem 0 0; font-weight: 600; }
.pg-pesquisa .chips { justify-content: flex-start; margin-left: 0; }

.meu { max-width: var(--largura-texto); margin: 0 auto 2rem; padding: 0 1rem; }
.separadores { display: flex; gap: .3rem; border-bottom: 2px solid var(--linha); margin: .8rem 0 1.2rem; overflow-x: auto; }
.separadores button {
  font-family: var(--f-titulo); font-weight: 700; font-size: 1.15rem; color: var(--texto-2);
  background: none; border: 0; padding: .7rem .9rem; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; min-height: 48px;
}
.separadores button[aria-selected="true"] { color: var(--bordo); border-bottom-color: var(--bordo); }
.separadores small { font-family: var(--f-texto); font-size: .8rem; }
.filtros-col { justify-content: flex-start; margin: 0 0 1rem; }
.chip-novo { border-style: dashed; }
.lista-guardados { list-style: none; padding: 0; margin: 0; }
.lista-guardados li { border-bottom: 1px solid var(--linha); padding: .8rem 0; }
.lista-guardados a { display: flex; flex-direction: column; text-decoration: none; }
.guardado-acoes { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; flex-wrap: wrap; }
.guardado-acoes select { font: inherit; font-size: .95rem; padding: .45rem .6rem; border: 1.5px solid var(--linha); border-radius: 8px; background: #fff; min-height: 44px; color: var(--texto); }
.nota-cartao { background: var(--papel); border: 1px solid var(--linha); border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: .8rem; }
.nota-cartao p { margin: .4rem 0; white-space: normal; }
.nota-cartao small { color: var(--texto-2); }

/* ── Rodapé ─────────────────────────────────────── */
.rodape { background: #2b1b1b; color: #eadcb8; margin-top: 3rem; border-top: 3px solid var(--dourado); }
.rodape-in { max-width: var(--largura); margin: 0 auto; padding: 2rem 1rem 1rem; display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.rodape a { color: #f4e6bf; display: block; padding: .3rem 0; text-decoration: none; }
.rodape a:hover { color: #fff; text-decoration: underline; }
.rodape p { margin: 0 0 .6rem; font-size: .95rem; }
.rodape-logo { font-family: var(--f-titulo); font-size: 1.6rem !important; font-weight: 700; color: #fff; }
.rodape-tit { font-family: var(--f-titulo); font-variant: small-caps; letter-spacing: .1em; font-weight: 700; color: var(--dourado) !important; font-size: 1.1rem !important; }
.aviso-legal { font-size: .88rem !important; color: #cdbb90; }
.rodape-fim { text-align: center; padding: 1rem; border-top: 1px solid rgba(255, 255, 255, .1); margin: 0; font-size: .9rem; }
.rodape-fim a { display: inline; }

/* ── Barra de navegação da app (telemóvel) ──────── */
.barra-app {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--papel); border-top: 2px solid var(--linha);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 14px rgba(60, 30, 10, .08);
}
.barra-app a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--barra-app); color: var(--texto-2); text-decoration: none; font-size: .78rem; font-weight: 600;
}
.barra-app svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.barra-app a[aria-current="page"] { color: var(--bordo); }
.barra-app a[aria-current="page"] svg { fill: rgba(122, 16, 16, .12); }


/* ── Botão ☰ Menu (topo, lado direito) ──────────── */
.btn-menu {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 54px; height: 50px; padding: 0; cursor: pointer;
  background: transparent; border: 2px solid rgba(240, 217, 143, .6); border-radius: 10px;
}
.btn-menu span { display: block; width: 22px; height: 2.5px; background: #fff7e2; border-radius: 2px; }
.btn-menu em { font-style: normal; font-family: var(--f-titulo); font-size: .72rem; font-weight: 700; color: #f0d98f; line-height: 1; margin-top: 1px; letter-spacing: .04em; }
.btn-menu:hover { background: rgba(255, 255, 255, .1); }

/* ── Gaveta do menu ─────────────────────────────── */
.gaveta-fundo { position: fixed; inset: 0; background: rgba(20, 8, 8, .55); z-index: 70; }
.gaveta {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 71;
  width: 86%; max-width: 360px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--fundo); border-left: 3px solid var(--dourado);
  box-shadow: -8px 0 24px rgba(0, 0, 0, .3);
  transform: translateX(105%); transition: transform .25s ease; visibility: hidden;
}
body.menu-aberto { overflow: hidden; }
body.menu-aberto .gaveta { transform: none; visibility: visible; }
.gaveta-cab {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bordo); color: #fff; padding: .7rem 1rem; border-bottom: 3px solid var(--dourado);
}
.gaveta-tit { font-family: var(--f-titulo); font-size: 1.5rem; font-weight: 700; }
.gaveta-fechar { background: none; border: 2px solid rgba(240, 217, 143, .6); color: #fff; font-size: 1.3rem; width: 46px; height: 46px; border-radius: 10px; cursor: pointer; }
.gaveta-pesq { padding: .9rem 1rem .3rem; }
.gaveta-pesq input { width: 100%; font: inherit; font-size: 1rem; color: var(--texto); padding: .7rem .9rem; border: 2px solid var(--linha); border-radius: 10px; background: #fff; }
.gaveta-pesq input:focus { border-color: var(--bordo); outline: none; }
.gaveta nav { padding: .3rem 0 1.5rem; }
.gaveta nav a { display: block; padding: .62rem 1.2rem; text-decoration: none; color: var(--texto); font-size: 1.05rem; border-bottom: 1px solid rgba(228, 211, 166, .6); }
.gaveta nav a:hover { background: var(--papel-2); }
.gaveta nav a.g-princ { font-family: var(--f-titulo); font-weight: 700; font-size: 1.2rem; color: var(--bordo); }
.g-grupo { margin: 1rem 1.2rem .3rem; font-family: var(--f-titulo); font-variant: small-caps; letter-spacing: .12em; font-weight: 700; color: var(--dourado-esc); font-size: 1.05rem; }
.gaveta nav a.g-todas { color: var(--bordo); font-weight: 600; border: 0; margin-top: .6rem; }

/* ── Mensagem curta ─────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #2b1b1b; color: #fbeed0; padding: .7rem 1.2rem; border-radius: 999px; z-index: 60;
  font-size: .95rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); max-width: 90vw; text-align: center;
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.toast.visivel { opacity: 1; }
.guardados-aviso { margin-top: 2rem; }

/* ── Textos revistos: notas, tabelas, fontes ────── */
.caixa-nota { background: #fff8e6; border: 1px solid var(--linha); border-left: 4px solid var(--dourado); border-radius: 8px; padding: .9rem 1.1rem; margin: 1.3rem 0; font-size: .98rem; }
.caixa-nota p:last-child { margin-bottom: 0; }
.texto .tabela { display: table; width: 100%; font-size: .95rem; }
.texto .tabela td:first-child { font-weight: 600; }
.texto .tabela th:empty { display: none; }
.texto p.ligacao-seta { margin: .3rem 0; font-family: var(--f-titulo); font-weight: 700; font-size: 1.1rem; }
.texto p.ligacao-seta a { text-decoration-thickness: 1px; }
.texto ul.fontes { font-size: .9rem; color: var(--texto-2); padding-left: 1.1rem; }
.texto ul.fontes li { margin: .3rem 0; }
.texto h3 { color: var(--bordo-esc); }
.rodape-sites { text-align: center; margin: 0; padding: .8rem 1rem 0; font-size: .95rem; }
.rodape-sites a { display: inline; }
.bloco-sites { border-color: var(--bordo); }

@media (max-width: 600px) {
  .texto .tabela { display: block; overflow-x: auto; }
}

/* ═══ TRAZERAMORDEVOLTA.PT — componentes próprios ═══ */
.logo-marca { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--dourado); display: block; background: var(--bordo); }
.conta-intro { color: var(--texto-2); }

/* WhatsApp no topo (computador) */
.btn-topo-wa {
  display: none; align-items: center; gap: .4rem; text-decoration: none;
  background: #1f7a45; color: #fff; border-radius: 999px; padding: .45rem 1rem; min-height: 44px;
  font-family: var(--f-titulo); font-weight: 700; font-size: 1.05rem; border: 2px solid rgba(255,255,255,.25);
}
.btn-topo-wa:hover { background: #17603a; color: #fff; }
.gaveta nav a.g-wa { color: #17603a; }

/* Botão flutuante WhatsApp (só computador — no telemóvel está na barra da app) */
.flutuante-wa {
  display: none; position: fixed; right: 22px; bottom: 22px; z-index: 45;
  width: 62px; height: 62px; border-radius: 50%; place-items: center;
  background: #1f7a45; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); border: 3px solid #fff;
}
.flutuante-wa:hover { background: #17603a; color: #fff; }

/* Barra da app: WhatsApp em destaque */
.barra-app a.barra-wa { color: #17603a; }
.barra-app svg.cheio { stroke: none; fill: currentColor; width: 26px; height: 26px; }

/* Página inicial */
.heroi h1 { font-size: clamp(2.3rem, 8vw, 3.4rem); }
.heroi-botoes { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin: 0 auto; max-width: 40rem; }
.btn-grande { font-size: 1.2rem; min-height: 58px; padding: .8rem 1.4rem; }
.btn svg { flex-shrink: 0; }
.confianca { list-style: none; padding: 0; margin: 1.3rem auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; font-size: .95rem; color: var(--texto-2); font-weight: 600; }
.confianca li { white-space: nowrap; }

.grelha-situacoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.situacao {
  display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: center;
  background: var(--papel); border: 1px solid var(--linha); border-left: 4px solid var(--bordo);
  border-radius: var(--raio); padding: .95rem 1.1rem; text-decoration: none; color: var(--texto); box-shadow: var(--sombra);
  transition: border-color .15s, transform .15s;
}
.situacao:hover { border-color: var(--bordo); transform: translateY(-2px); color: var(--texto); }
.situacao-ic { grid-row: 1 / span 2; font-size: 1.8rem; line-height: 1; }
.situacao-tit { font-family: var(--f-titulo); font-size: 1.3rem; font-weight: 700; color: var(--bordo); line-height: 1.2; }
.situacao-txt { font-size: .93rem; color: var(--texto-2); line-height: 1.4; }

.passos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .9rem; counter-reset: p; }
.passos li { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; box-shadow: var(--sombra); }
.passo-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bordo); color: #fff; font-family: var(--f-titulo); font-weight: 700; font-size: 1.3rem; border: 2px solid var(--dourado); }
.passos strong { font-family: var(--f-titulo); font-size: 1.3rem; color: var(--bordo); }
.passos span:last-child { color: var(--texto-2); font-size: .97rem; line-height: 1.55; }

.grelha-testemunhos { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .9rem; }
.testemunho {
  margin: 0 0 1rem; background: var(--papel); border: 1px solid var(--linha); border-left: 4px solid var(--dourado);
  border-radius: 10px; padding: 1rem 1.2rem; font-style: italic; line-height: 1.65;
}
.grelha-testemunhos .testemunho { margin: 0; }
.testemunho cite { display: block; margin-top: .5rem; font-style: normal; font-weight: 600; color: var(--dourado-esc); font-size: .92rem; }

.largura-faq { max-width: calc(var(--largura-texto) + 2rem); }
details.faq { background: var(--papel); border: 1px solid var(--linha); border-radius: 10px; margin: 0 0 .6rem; }
details.faq summary { cursor: pointer; list-style: none; padding: .85rem 2.6rem .85rem 1.1rem; font-family: var(--f-titulo); font-weight: 700; font-size: 1.18rem; color: var(--bordo); position: relative; min-height: 52px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--dourado-esc); }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 0 !important; padding: 0 1.1rem 1rem; }

.grelha-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .8rem; }
.site-cartao { display: flex; flex-direction: column; gap: .15rem; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: .9rem 1rem; text-decoration: none; color: var(--texto); }
.site-cartao span { font-size: 1.5rem; }
.site-cartao strong { font-family: var(--f-titulo); font-size: 1.2rem; color: var(--bordo); }
.site-cartao small { color: var(--texto-2); font-size: .9rem; }
.site-cartao:hover { border-color: var(--bordo); color: var(--texto); }

/* Páginas de serviço */
.btn-topo-artigo { margin: 1rem 0 .2rem; width: 100%; }
.texto .servico-item { background: var(--papel); border: 1px solid var(--linha); border-left: 4px solid var(--dourado); border-radius: 10px; padding: .2rem 1.1rem .1rem; margin: 0 0 .8rem; }
.texto .servico-item h3 { margin: .8rem 0 .3rem; font-size: 1.25rem; }
.texto .servico-item h3 a { text-decoration: none; }
.texto .servico-item p { margin: 0 0 .8rem; color: var(--texto-2); }
.lista-trabalhos { margin: 2rem 0 0; }
.lista-trabalhos .titulo-bloco { border: 0; }
.bloco-mc-nota { font-size: .85rem !important; color: var(--texto-2); margin-top: .9rem !important; }
.explorar-sec summary .seccao-ic { font-size: 1.5rem; grid-row: auto; }
.artigo-lead { max-width: var(--largura-texto); }

/* Pedido para instalar a app */
.instalar {
  position: fixed; left: .6rem; right: .6rem; bottom: calc(var(--barra-app) + env(safe-area-inset-bottom) + .6rem); z-index: 55;
  display: flex; align-items: center; gap: .7rem; background: var(--papel); border: 2px solid var(--dourado);
  border-radius: 14px; padding: .6rem .7rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 30rem; margin: 0 auto;
}
.instalar img { border-radius: 50%; }
.instalar span { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.instalar small { color: var(--texto-2); font-size: .85rem; }
.instalar .btn { min-height: 44px; padding: .4rem .9rem; font-size: 1rem; }
.instalar .fechar { background: none; border: 0; font-size: 1.2rem; color: var(--texto-2); cursor: pointer; width: 36px; height: 44px; }

@media (min-width: 900px) {
  .btn-topo-wa { display: inline-flex; }
  .flutuante-wa { display: grid; }
  .instalar { bottom: 1rem; }
  .btn-topo-artigo { width: auto; }
  .topo .menu a { font-size: 1.05rem; padding: .45rem .55rem; }
}
@media (max-width: 600px) {
  .grelha-situacoes { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .situacao { grid-template-columns: 1fr; padding: .8rem .8rem; row-gap: .2rem; }
  .situacao-ic { grid-row: auto; font-size: 1.5rem; }
  .situacao-tit { font-size: 1.1rem; }
  .situacao-txt { font-size: .85rem; }
  .heroi-botoes .btn { width: 100%; }
  .confianca { display: grid; grid-template-columns: 1fr 1fr; text-align: left; gap: .3rem .8rem; font-size: .88rem; max-width: 24rem; }
  .confianca li { white-space: normal; }
}

/* afinações v1 */
[hidden] { display: none !important; }
.meu { padding-top: 1.4rem; }
.texto .botoes { margin: 1rem 0 1.4rem; }
.texto a.btn { color: #fff; text-decoration: none; }
h1, h2, h3 { text-wrap: balance; }
.menu a { white-space: nowrap; }
.btn-topo-wa { white-space: nowrap; }
.caixa-destaque p:last-child, .caixa-destaque ul:last-child { margin-bottom: 0; }
.cartao-txt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.heroi-sobre .curto { display: none; }
@media (min-width: 900px) {
  .grelha-situacoes { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) and (max-width: 1340px) {
  .btn-topo-wa span { display: none; }
  .btn-topo-wa { padding: .45rem .7rem; }
  .topo .menu a { font-size: 1rem; padding: .45rem .45rem; letter-spacing: .03em; }
}
@media (max-width: 600px) {
  .bloco-mc-botoes .btn { width: 100%; }
  .grelha-sites { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .site-cartao { padding: .75rem .8rem; }
  .heroi-sobre .longo { display: none; }
  .heroi-sobre .curto { display: inline; }
}

/* ── Tamanho de letra escolhido pelo leitor ─────── */
html.letra-1 { --letra-base: 20px; }
html.letra-2 { --letra-base: 22px; }
html.letra--1 { --letra-base: 16.5px; }

/* ── Ecrãs maiores ──────────────────────────────── */
@media (min-width: 900px) {
  :root { --letra-base: 19px; }
  html.letra-1 { --letra-base: 21px; }
  html.letra-2 { --letra-base: 23px; }
  body { padding-bottom: 0; }
  .barra-app { display: none; }
  .menu { display: flex; }
  .heroi { padding: 3.6rem 1rem 3rem; }
  .rodape-in { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
@media (max-width: 899px) {
  .pesquisa-painel { top: 60px; }
  .ferramentas { top: 60px; }
}
@media (max-width: 600px) {
  .grelha-seccoes { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .seccao-cartao { grid-template-columns: 1fr; padding: .8rem .85rem; }
  .seccao-ic { grid-row: auto; font-size: 1.5rem; }
  .seccao-nome { font-size: 1.15rem; }
  .seccao-desc { display: none; }
  .heroi-sobre { font-size: .95rem; letter-spacing: .1em; }
  .ferr { padding: .4rem .7rem; }
}
@media (max-width: 420px) {
  .logo-sub { display: none; }
  .heroi-pesquisa button { padding: 0 .8rem; }
  .ant-seg { grid-template-columns: 1fr; }
  .ant-seg .seg { text-align: left; }
}

/* ── Impressão ────────────────────────── */
@media print {
  .topo, .barra-app, .rodape, .ferramentas, .bloco-mc, .relacionados, .ant-seg, .migalhas, .indice-artigo, .pesquisa-painel { display: none !important; }
  body { background: #fff; padding: 0; font-size: 12pt; }
  .flutuante-wa, .instalar, .btn-topo-artigo { display: none !important; }
  a { color: #000; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}


/* ── v2: blog e anúncio de tarot ────────────────── */
.grelha-blog { margin-top: 1.2rem; }
.cartao-artigo .cartao-sec { color: var(--texto-2); font-weight: 400; }
.paginacao { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.6rem 0; flex-wrap: wrap; }
.paginacao a { background: var(--papel); border: 1.5px solid var(--linha); border-radius: 999px; padding: .5rem 1.1rem; text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.paginacao a:hover { border-color: var(--bordo); }
.paginacao span { color: var(--texto-2); font-size: .95rem; }
.g-dominio { display: block; font-size: .8rem; color: var(--texto-2); }

.bloco-tarot {
  background: linear-gradient(135deg, #2b1b1b, #5c0b0b); color: #fbeed0;
  border: 2px solid var(--dourado); border-radius: var(--raio); padding: 1.4rem 1.2rem; margin: 2rem 0; box-shadow: var(--sombra);
}
.bloco-tarot-sobre { margin: 0; font-family: var(--f-titulo); font-variant: small-caps; letter-spacing: .12em; color: #f0d98f; font-weight: 700; font-size: 1rem; text-align: center; }
.bloco-tarot-tit { margin: .3rem 0 1.1rem; font-family: var(--f-titulo); font-weight: 700; font-size: clamp(1.4rem, 4.4vw, 1.8rem); color: #fff; text-align: center; line-height: 1.2; text-wrap: balance; }
.bloco-tarot-grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; }
.tarot-cartao {
  display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: var(--texto);
  background: var(--papel); border-radius: 10px; padding: 1rem 1.1rem; border: 1px solid var(--dourado);
  transition: transform .15s;
}
.tarot-cartao:hover { transform: translateY(-2px); color: var(--texto); }
.tarot-ic { font-size: 1.7rem; line-height: 1; }
.tarot-tit { font-family: var(--f-titulo); font-weight: 700; font-size: 1.35rem; color: var(--bordo); line-height: 1.2; }
.tarot-txt { font-size: .95rem; color: var(--texto-2); line-height: 1.5; }
.tarot-btn { margin-top: .3rem; align-self: flex-start; background: var(--bordo); color: #fff; border-radius: 8px; padding: .5rem .9rem; font-family: var(--f-titulo); font-weight: 700; font-size: 1.05rem; }
.tarot-dom { font-size: .82rem; color: var(--dourado-esc); font-weight: 600; }
.bloco-tarot.compacto { padding: 1.1rem 1rem; }
.bloco-tarot.compacto .bloco-tarot-tit { font-size: 1.35rem; margin-bottom: .8rem; }
.bloco-tarot.compacto .tarot-cartao { padding: .85rem .95rem; }
@media (max-width: 600px) {
  .bloco-tarot.compacto .bloco-tarot-grelha { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .bloco-tarot.compacto .tarot-tit { font-size: 1.1rem; }
  .bloco-tarot.compacto .tarot-btn { font-size: .9rem; padding: .4rem .6rem; }
}
@media print { .bloco-tarot { display: none !important; } }
