/* Tokens: ver DESIGN.md */
:root {
  --ink-900: #14201E; --ink-700: #35423F; --ink-500: #5C6966;
  --line: #DCD9D0; --paper: #FAF8F3; --surface: #FFFFFF;
  --primary: #30538A; --primary-700: #223D68; --primary-50: #EDF2F9;
  --teal: #41A09C; --teal-700: #1D6B67; --teal-50: #E4F3F2;
  --gold: #E9C46A; --xmas: #1E4D3A; --xmas-red: #B3261E;
  --error: #B42318;
  --r-s: 6px; --r-m: 10px; --r-l: 16px;
  --sombra: 0 1px 2px rgba(20,32,30,.06), 0 8px 24px rgba(20,32,30,.06);
  --font-t: Outfit, system-ui, sans-serif; --font: Inter, system-ui, sans-serif;
  --wrap: 1200px; --sec: 64px;
}
@media (min-width: 900px) { :root { --sec: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink-700); background: var(--paper); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-t); color: var(--ink-900); line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.375rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-700); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.estreito { max-width: 820px; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 10px 14px; z-index: 10; }
.saltar:focus { left: 8px; }
.meta { font-size: 14px; color: var(--ink-500); }
.lead { font-size: 19px; max-width: 36rem; }
.lead-s { font-size: 18px; max-width: 40rem; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: var(--r-m); background: var(--primary); color: #fff; font-weight: 600; text-decoration: none; border: 1.5px solid transparent; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--primary-700); color: #fff; }
.btn-2 { background: var(--surface); color: var(--ink-900); border-color: var(--ink-900); }
.btn-2:hover { background: var(--ink-900); color: #fff; }
.btn-teal { background: var(--teal-700); }
.btn-teal:hover { background: #15524F; }
.btn-branco { background: #fff; color: var(--primary-700); }
.btn-branco:hover { background: var(--primary-50); color: var(--primary-700); }

/* Topo */
.topo { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topo-in { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px; padding-top: 12px; padding-bottom: 0; }
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink-900); min-width: 0; }
.marca img { height: 36px; width: auto; }
.marca-txt { display: none; flex-direction: column; border-left: 1px solid var(--line); padding-left: 12px; font-size: 13px; color: var(--ink-500); line-height: 1.3; }
.marca-txt strong { font-family: var(--font-t); font-size: 15px; color: var(--ink-900); font-weight: 600; }
.btn-socio { min-height: 42px; padding: 8px 16px; }
.nav { grid-column: 1 / -1; display: flex; gap: 4px 22px; overflow-x: auto; scrollbar-width: none; font-weight: 500; font-size: 15px; margin: 0 -20px; padding: 0 20px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-700); text-decoration: none; padding: 12px 0; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--primary); }
.nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--teal); }
@media (min-width: 560px) { .marca-txt { display: flex; } .marca img { height: 44px; } }
@media (min-width: 1100px) {
  .topo-in { grid-template-columns: auto 1fr auto; padding-bottom: 12px; }
  .nav { grid-column: auto; grid-row: 1; grid-column-start: 2; justify-content: flex-end; margin: 0; padding: 0; overflow: visible; }
  .btn-socio { grid-column-start: 3; }
}

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 56px; padding-bottom: 72px; }
.hero-txt { flex: 1 1 420px; min-width: 0; }
.sobrelinha { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-700); }
.ponto { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); flex: none; }
.acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-fotos { flex: 1 1 420px; min-width: 0; position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hero-fotos img { width: 100%; height: 11rem; object-fit: cover; border-radius: var(--r-l); }
.hero-fotos .f-grande { grid-row: span 2; height: calc(22rem + 12px); }
@media (max-width: 520px) { .hero-fotos img { height: 8rem; } .hero-fotos .f-grande { height: calc(16rem + 12px); } }
.deco { position: absolute; border-radius: 50%; }
.d1 { width: 40px; height: 40px; top: -18px; left: -14px; background: var(--teal); }
.d2 { width: 20px; height: 20px; bottom: -10px; right: 36px; background: var(--primary); }
.d3 { width: 13px; height: 13px; top: 46%; right: -10px; background: var(--teal); }

/* Faixa solidária */
.faixa-wrap { padding-bottom: 64px; }
.faixa { background: var(--primary); color: #DCE4F0; border-radius: 20px; padding: 28px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.faixa > div { flex: 1 1 440px; min-width: 0; }
.faixa h2 { color: #fff; font-size: 1.75rem; }
.faixa p:last-child { margin: 0; }
@media (min-width: 700px) { .faixa { padding: 32px 40px; } }
.etiqueta { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-700); margin: 0 0 6px; }
.faixa .etiqueta, .sec-escura .etiqueta { color: #8ED3CF; }

/* Secções */
.sec { padding: var(--sec) 0; }
.sec-branca { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-escura { background: var(--primary-700); color: #D3DCEA; }
.sec-escura h2 { color: #fff; }
.duas { display: flex; flex-wrap: wrap; gap: 48px; }
.duas .lado { flex: 1 1 280px; min-width: 0; margin: 0; }
.duas .principal { flex: 999 1 520px; min-width: 0; }
.titulo-linha { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 28px; margin-top: 32px; }
.titulo-linha + .grelha { margin-top: 0; }
.cab { padding: 56px 0 40px; }
.cab h1 { margin-bottom: .3em; }
.cab p { font-size: 18px; max-width: 44rem; margin: 0; }
.texto h2 { font-size: 1.5rem; margin-top: 1.4em; }
.texto h2:first-child { margin-top: 0; }
figure { margin: 0; }
figcaption { font-size: 14px; color: var(--ink-500); margin-top: 10px; }
.lado img, figure img { border-radius: var(--r-l); width: 100%; object-fit: cover; }

/* Agenda */
.agenda { list-style: none; margin: 0; padding: 0; }
.ag-item { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; padding: 24px 0; border-bottom: 1px solid var(--line); }
.ag-item:first-child { padding-top: 0; }
.ag-item:last-child { border-bottom: 0; }
.ag-data { flex: 0 0 72px; height: 80px; border-radius: 12px; background: var(--teal-50); color: var(--teal-700); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ag-data span:first-child { font-family: var(--font-t); font-weight: 700; font-size: 28px; line-height: 1; }
.ag-data span:last-child { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ag-txt { flex: 1 1 240px; min-width: 0; }
.ag-txt h3 { margin: 4px 0 6px; }
.ag-txt p:last-child { margin: 0; }
.ag-img, .advento-mini { flex: 0 0 120px; width: 120px; height: 160px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

/* Calendário do Advento (ilustração) */
.advento { background: var(--xmas); border-radius: var(--r-l); padding: 14px; height: 200px; display: flex; flex-direction: column; gap: 6px; }
.advento-t { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font-t); font-weight: 700; font-size: 18px; color: var(--gold); }
.advento-t svg { width: 18px; height: 18px; fill: var(--gold); }
.advento-g { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 6px; }
.porta { min-height: 0; border-radius: 4px; background: #F4E9D2; color: var(--xmas); display: flex; align-items: center; justify-content: center; font-family: var(--font-t); font-weight: 700; font-size: 13px; }
.porta-v { background: var(--xmas-red); color: #fff; }
.advento-mini { padding: 8px; gap: 4px; border: 0; }
.advento-mini .advento-t { font-size: 12px; }
.advento-mini .advento-t svg { width: 12px; height: 12px; }
.advento-mini .advento-g { gap: 3px; }
.advento-mini .porta { font-size: 8px; border-radius: 2px; }

/* O que fazemos */
.fazemos { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 32px; }
.fazemos figure { flex: 1 1 420px; min-width: 0; }
.fazemos figure img { height: 28rem; object-position: center 30%; }
.lista-ico { flex: 1 1 400px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.lista-ico li { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.lista-ico li:first-child { padding-top: 0; }
.lista-ico li:last-child { border-bottom: 0; }
.lista-ico p { margin: 0; }
.ico { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }

/* Cartões */
.cartao-n, .cartao-j { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.cartao-n img, .cartao-j img { width: 100%; height: 220px; object-fit: cover; border-radius: var(--r-l); border: 1px solid var(--line); }
.cartao-j img { height: 200px; border: 0; }
.cartao-t { font-family: var(--font-t); font-weight: 600; font-size: 1.3rem; color: var(--ink-900); line-height: 1.2; }
.cartao-n:hover .cartao-t { color: var(--primary); text-decoration: underline; }
.sec-escura .cartao-t { color: #fff; }
.cartao-j .etiqueta { margin: 0; }
.ir { font-weight: 600; color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.pilula { align-self: flex-start; font-size: 13px; font-weight: 600; background: var(--gold); color: var(--ink-900); padding: 5px 12px; border-radius: 999px; }
.cartao-p { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; display: flex; flex-direction: column; }
.cartao-p img, .cartao-p-cor { width: 100%; height: 200px; object-fit: cover; }
.cartao-p-cor { background: var(--primary); display: flex; align-items: center; justify-content: center; }
.cartao-p-cor .ico { width: 56px; height: 56px; stroke: #8ED3CF; stroke-width: 1.6; }
.cartao-p h2 { font-size: 1.4rem; margin: 20px 20px 8px; }
.cartao-p p, .cartao-p a { margin: 0 20px 20px; }

/* Sócio */
.socio-wrap { padding-top: var(--sec); padding-bottom: var(--sec); }
.socio { position: relative; overflow: hidden; background: var(--teal-50); border-radius: 24px; padding: 40px 28px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.socio > div { flex: 1 1 440px; min-width: 0; position: relative; }
.socio .btn { position: relative; }
.socio ul { margin: 0; padding-left: 20px; line-height: 1.9; }
.s1 { width: 220px; height: 220px; right: -60px; top: -60px; background: var(--teal); opacity: .18; }
@media (min-width: 700px) { .socio { padding: 56px 48px; } }

/* Artigo */
.artigo { padding-top: 40px; padding-bottom: var(--sec); }
.voltar { display: inline-block; margin-bottom: 24px; font-weight: 600; text-decoration: none; }
.artigo h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.artigo-img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--r-l); margin: 24px 0 32px; }
.artigo p { font-size: 18px; max-width: 42rem; }
.galeria { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 32px 0 12px; }
.galeria img { width: 100%; height: 240px; object-fit: cover; border-radius: var(--r-m); }

/* Contactos */
.contactos { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; align-content: start; }
.contactos dt { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-700); }
.contactos dd { margin: 6px 0 0; color: var(--ink-900); }
.mapa { min-height: 300px; border-radius: var(--r-l); background: var(--primary-50); border: 1px solid #C9D6EA; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; font-weight: 600; text-decoration: none; }
.mapa .ico { width: 36px; height: 36px; }

/* Formulário */
.form { display: flex; flex-direction: column; gap: 20px; max-width: 560px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-weight: 600; color: var(--ink-900); }
.opc { font-weight: 400; color: var(--ink-500); }
input, select { font: inherit; min-height: 48px; padding: 10px 14px; border: 1.5px solid #B9B6AC; border-radius: var(--r-m); background: #fff; color: var(--ink-900); }
input:focus, select:focus { border-color: var(--primary); outline: 3px solid var(--primary-50); outline-offset: 0; }
input[aria-invalid="true"] { border-color: var(--error); }
.check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.check input { min-height: 0; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--teal-700); flex: none; }
.check label { flex: 1 1 200px; font-weight: 400; color: var(--ink-700); }
.check .erro { flex-basis: 100%; }
.erro { color: var(--error); font-size: 14px; margin: 0; font-weight: 500; }
.alerta { background: #FDECEA; color: #7A1810; border-radius: var(--r-m); padding: 12px 16px; }
.oculto { position: absolute; left: -9999px; }
.form .btn { align-self: flex-start; }
.caixa { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px; align-self: flex-start; }
.caixa h2 { font-size: 1.4rem; }
.passos { padding-left: 20px; margin: 0 0 16px; line-height: 1.8; }

/* Rodapé */
.rodape { background: var(--primary-700); color: #D3DCEA; font-size: 15px; }
.rodape a { color: #fff; }
.rodape-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.rodape h2 { color: #fff; font-size: 1rem; font-family: var(--font); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.rodape-logo { display: inline-flex; background: #fff; border-radius: var(--r-m); padding: 8px 12px; margin-bottom: 14px; }
.rodape-logo img { height: 28px; width: auto; }
.rodape-fim { border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; padding-bottom: 28px; font-size: 14px; }

/* ---------- Área de sócio ---------- */
.dados { margin: 0 0 16px; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.dados dt { font-weight: 600; color: var(--ink-900); }
.dados dd { margin: 0; }
.cartao-socio { position: relative; overflow: hidden; max-width: 460px; aspect-ratio: 1.586; background: var(--primary-700); color: #fff; border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--sombra); }
.cs-topo { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.cs-topo img { background: #fff; border-radius: 8px; padding: 5px 8px; height: 34px; width: auto; }
.cs-topo span { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8ED3CF; }
.cs-corpo { flex: 1; display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; position: relative; z-index: 1; }
.cs-dados { display: grid; gap: 1px; min-width: 0; }
.cs-rot { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #B8C6DD; margin-top: 6px; }
.cs-dados strong { font-family: var(--font-t); font-size: 17px; font-weight: 600; }
.cs-nome { font-size: 20px !important; line-height: 1.15; overflow-wrap: anywhere; }
.cs-ok { color: #8ED3CF; } .cs-falta { color: var(--gold); }
.cs-qr { background: #fff; border-radius: 10px; padding: 6px; flex: none; }
.cs-qr .qr { display: block; width: 112px; height: 112px; }
.cs-d1 { width: 160px; height: 160px; right: -50px; top: -60px; background: var(--teal); opacity: .22; }
.cs-d2 { width: 18px; height: 18px; left: 46%; top: 22px; background: var(--teal); }
@media (max-width: 400px) { .cs-qr .qr { width: 92px; height: 92px; } .cs-dados strong { font-size: 15px; } }
.validacao { text-align: center; padding: 48px 24px; border-radius: 20px; background: var(--surface); border: 2px solid var(--line); }
.validacao .ico { width: 64px; height: 64px; stroke-width: 2.4; margin: 0 auto 12px; display: block; }
.v-ok { border-color: var(--teal); } .v-ok .ico { stroke: var(--teal-700); }
.v-falta { border-color: var(--gold); } .v-falta .ico { stroke: #8A5A00; }
.validacao h1 { font-size: 1.9rem; }

/* ---------- Gestão ---------- */
.gestao-cab { background: var(--surface); border-bottom: 1px solid var(--line); padding-top: 32px; }
.gestao-cab h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.subnav { display: flex; gap: 4px 24px; overflow-x: auto; font-weight: 500; }
.subnav a { padding: 12px 0; color: var(--ink-700); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--teal); }
.sec-g { padding: 32px 0 72px; }
.sec-g h2 { font-size: 1.4rem; margin-top: 8px; }
.sucesso { background: var(--teal-50); color: #134B48; border-radius: var(--r-m); padding: 12px 16px; margin: 20px 0 0; font-weight: 500; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi span { font-size: 14px; color: var(--ink-500); }
.kpi strong { font-family: var(--font-t); font-size: 2.2rem; color: var(--ink-900); line-height: 1.1; }
.kpi em { font-style: normal; color: var(--ink-500); }
.lista-g { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.adesao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.adesao > div:first-child { flex: 1 1 320px; min-width: 0; }
.memoria-g h3 { margin: 8px 0 4px; font-size: 1.2rem; }
.memoria-g details { margin-top: 8px; }
.filtros { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 16px; }
.filtros .campo { flex: 1 1 200px; }
.tabela-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); margin-bottom: 16px; }
.tabela { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabela th, .tabela td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabela th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); background: var(--paper); }
.tabela tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.tag-ok { background: var(--teal-50); color: #134B48; } .tag-falta { background: #FDF1D8; color: #6E4700; }
.paginas { display: flex; gap: 20px; align-items: center; }
.form-g { max-width: none; }
.form-linha { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 24px; }
.form-linha .campo { flex: 1 1 110px; }
.perfis { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.perfis legend { margin-bottom: 8px; padding: 0; }
.perfis label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.perfis input { width: 20px; height: 20px; min-height: 0; accent-color: var(--teal-700); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--error); font: inherit; text-decoration: underline; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ficha { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 40px 56px; }
.ficha > div { min-width: 0; }
textarea { font: inherit; padding: 10px 14px; border: 1.5px solid #B9B6AC; border-radius: var(--r-m); background: #fff; color: var(--ink-900); resize: vertical; }
textarea:focus { border-color: var(--primary); outline: 3px solid var(--primary-50); outline-offset: 0; }
textarea[aria-invalid="true"] { border-color: var(--error); }
input:disabled { background: var(--paper); color: var(--ink-500); }

/* ---------- Livro de memórias ---------- */
.sec-livro { padding: 8px 0 var(--sec); }
.livro { display: grid; gap: 20px; }                                  /* sem JS: páginas umas por baixo das outras */
.pagina { background: #FBF6EA; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 30px rgba(20,32,30,.10); color: #3A332A; font-family: Georgia, 'Times New Roman', serif; }
.pag-in { padding: 40px 36px; height: 100%; overflow-y: auto; display: flex; flex-direction: column; }
.pag-in h3 { font-family: Georgia, serif; font-weight: 700; font-size: 1.6rem; color: #2B241C; margin-bottom: .7em; }
.pag-in p { font-size: 17px; line-height: 1.7; }
.pag-sobre { font-family: var(--font); font-size: 12px !important; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-700); margin-bottom: 8px; }
.cal-add { margin-top: 10px; font-size: 15px; }
.cal-add summary { cursor: pointer; color: var(--primary); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.cal-add a { display: block; padding: 6px 0 6px 18px; }
.carteira { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; max-width: 460px; }
.btn-escuro { background: #14201E; }
.btn-escuro:hover { background: #000; }
.ecra-principal { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 16px; }
.ecra-principal summary { cursor: pointer; font-weight: 600; color: var(--primary); min-height: 32px; }
.ecra-principal p { margin: 8px 0 0; }
.pag-foto { margin: 4px 0 16px; }
.pag-foto img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 4px; filter: sepia(.15); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pag-autor { margin-top: auto; padding-top: 12px; font-style: italic; text-align: right; color: #6B5F50; }
.pag-vazia { justify-content: center; text-align: center; align-items: center; }
.pag-vazia .btn { font-family: var(--font); }
.orn { display: flex; gap: 8px; justify-content: center; margin-top: auto; padding-top: 16px; }
.orn span { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.orn span:nth-child(2) { background: var(--primary); width: 10px; height: 10px; margin-top: -1.5px; }
.capa, .contracapa { background: var(--primary-700); color: #fff; font-family: var(--font); }
.capa-in { position: relative; height: 100%; min-height: 420px; padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.capa h2 { font-family: var(--font-t); color: #fff; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.02; margin: 12px 0 16px; }
.capa-sobre { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #8ED3CF; margin: 0; }
.capa-sub { font-size: 18px; color: #D3DCEA; margin: 0; }
.contracapa .capa-sobre { text-transform: none; letter-spacing: 0; font-size: 16px; color: #fff; margin-top: 8px; }
.capa-logo { position: absolute; left: 40px; bottom: 36px; background: #fff; border-radius: 8px; padding: 6px 10px; height: 40px; width: auto; }
.capa-pontos { position: absolute; right: -70px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: var(--teal); opacity: .25 }
.livro-ctl { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 24px; }
.livro-ctl[hidden] { display: none; }
.livro-ctl .btn { min-width: 56px; font-size: 20px; }
.livro-ctl .btn:disabled { opacity: .35; cursor: default; background: var(--surface); color: var(--ink-900); }
.livro-pag { min-width: 170px; text-align: center; font-size: 15px; color: var(--ink-500); }
.livro-cta { text-align: center; margin-top: 24px; }

/* com JS: folhear */
.livro-js { position: relative; display: block; height: min(76vh, 640px); min-height: 480px; perspective: 2400px; outline-offset: 8px; touch-action: pan-y; user-select: none; }
.livro-js .livro-palco { position: absolute; inset: 0; transition: transform .7s ease; }
.livro-js .folha { position: absolute; top: 0; height: 100%; transform-style: preserve-3d; transform-origin: left center; transition: transform .9s cubic-bezier(.3,.7,.2,1); cursor: pointer; }
.livro-js .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; background: #FBF6EA; border-radius: 6px; }
.livro-js .face .pagina { height: 100%; box-shadow: none; border-radius: 0; }
.livro-js .verso { transform: rotateY(180deg); }
.livro-js .face-branca { background: #F3ECDC; }
.livro-duplo { max-width: 1040px; margin: 0 auto; }
.livro-duplo .folha { left: 50%; width: 50%; }
.livro-duplo .folha.virada { transform: rotateY(-180deg); }
.livro-duplo .frente { border-radius: 0 6px 6px 0; box-shadow: inset 18px 0 24px -18px rgba(60,40,10,.35), 0 10px 30px rgba(20,32,30,.12); }
.livro-duplo .verso { border-radius: 6px 0 0 6px; box-shadow: inset -18px 0 24px -18px rgba(60,40,10,.35), 0 10px 30px rgba(20,32,30,.12); }
.livro-duplo.fechado .livro-palco { transform: translateX(-25%); }
.livro-duplo.fim .livro-palco { transform: translateX(25%); }
.livro-simples { max-width: 520px; margin: 0 auto; }
.livro-simples .folha { left: 0; width: 100%; }
.livro-simples .folha.virada { transform: rotateY(-180deg); opacity: 0; transition: transform .8s cubic-bezier(.3,.7,.2,1), opacity .2s linear .6s; }
.livro-simples .face { box-shadow: 0 10px 30px rgba(20,32,30,.12); }
.livro-simples .pag-in { padding: 32px 26px; }
@media (prefers-reduced-motion: reduce) {
  .livro-js .folha, .livro-js .livro-palco { transition: none !important; }
}

.faixa-mem { padding-top: var(--sec); padding-bottom: 0; }
.faixa-clara { background: #FBF6EA; color: var(--ink-700); border: 1px solid #EADFC6; }
.faixa-clara h2 { color: var(--ink-900); }
.faixa-clara .etiqueta { color: var(--teal-700); }

/* ---------- Fase 3 ---------- */
.btn-peq { min-height: 40px; padding: 6px 14px; font-size: 15px; }
.ag-acao { margin-top: 10px !important; }
.sem-img-escura { background: #30538A !important; border: 0 !important; height: 200px !important; }
.sem-img { display: block; height: 220px; border-radius: var(--r-l); background: var(--primary-50); border: 1px solid var(--line); }
.previa { width: 100%; max-width: 320px; height: 180px; object-fit: cover; border-radius: var(--r-m); border: 1px solid var(--line); }
.check-inline { display: flex; gap: 8px; align-items: center; font-weight: 400 !important; min-height: 44px; }
.check-inline input { min-height: 0; width: 20px; height: 20px; }
.galeria-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.galeria-item { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.galeria-item img { width: 100%; height: 100px; object-fit: cover; border-radius: var(--r-s); }
.galeria-item input { min-height: 0; width: 18px; height: 18px; vertical-align: middle; }
.caixa-campos { border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 20px; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.caixa-campos legend { font-weight: 600; color: var(--ink-900); padding: 0 6px; }
.caixa-ok { background: var(--teal-50); border-color: #B9DFDC; }
.previa-email { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; margin: 16px 0 24px; max-width: 640px; }
.entrada-qr { text-align: center; }
.entrada-qr .qr { margin: 8px auto 12px; display: block; }
.recibo { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: 40px; }
.recibo h1 { font-size: 1.6rem; margin: 28px 0 20px; }
.recibo-topo { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font-size: 14px; line-height: 1.5; }
@media print {
  .topo, .rodape, .nao-imprimir, .saltar { display: none !important; }
  body { background: #fff; }
  .recibo { border: 0; padding: 0; }
}
.form-par { align-items: flex-start; }
.cartao-j img[src$="advento.jpg"], .ag-img[src$="advento.jpg"] { object-position: top; }

/* ---------- Fase 4: o bairro ---------- */
.cartao-bairro { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); text-decoration: none; color: var(--ink-700); min-height: 140px; }
.cartao-bairro:hover { border-color: var(--primary); box-shadow: var(--sombra); color: var(--ink-700); }
.cartao-bairro:hover .cartao-t { color: var(--primary); }
.cartao-p-in { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.cartao-p-in h2 { margin: 0 !important; font-size: 1.3rem; }
.cartao-p-in p { margin: 0 !important; }
.cartao-p-in .tag { align-self: flex-start; }
.kpi-link { text-decoration: none; color: inherit; }
.kpi-link:hover { border-color: var(--primary); }

/* mapa */
.mapa-caixa { overflow: auto; border-radius: var(--r-l); border: 1px solid var(--line); background: #F3F0E8; -webkit-overflow-scrolling: touch; }
.mapa { position: relative; width: 100%; min-width: 760px; aspect-ratio: 1563 / 1166; }
.mapa > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.pino { position: absolute; width: 22px; height: 22px; margin: -22px 0 0 -11px; padding: 0; border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--cor, var(--primary)); box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: pointer; }
.pino::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.pino:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.pino[hidden] { display: none; }
.mapa-cartao { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 30px)); width: 260px; max-width: 80vw; background: #fff; border-radius: 12px; padding: 14px 36px 14px 14px; box-shadow: 0 8px 28px rgba(20,32,30,.25); font-size: 15px; }
.mapa-fechar { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink-500); }
.mapa-filtros { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.mapa-filtros label { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 15px; }
.mapa-filtros input { width: 20px; height: 20px; min-height: 0; accent-color: var(--teal-700); }
.pin-cor { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.mapa-lista { margin-top: 12px; }
.mapa-lista summary { cursor: pointer; font-weight: 600; color: var(--primary); min-height: 40px; }
.mapa-lista ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 24px; }
.mapa-lista li { display: flex; gap: 10px; align-items: flex-start; }
.mapa-lista li .pin-cor { margin-top: 6px; }
.mapa-lista li[hidden] { display: none; }
.escolher-local { border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; margin: 0; min-width: 0; }
.escolher-local legend { font-weight: 600; color: var(--ink-900); padding: 0 6px; }
.escolher-local .mapa { cursor: crosshair; min-width: 700px; }
.pino-escolhido { --cor: #C2410C; pointer-events: none; }
.escolher-local .acoes { margin-top: 10px; }

/* listas com foto */
.lista-cartoes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.cartao-linha { display: flex; flex-wrap: wrap; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.cartao-linha > img { width: 160px; height: 120px; object-fit: cover; border-radius: var(--r-m); flex: none; }
.cartao-linha > div { flex: 1 1 260px; min-width: 0; }
.cartao-linha h3 { margin: 8px 0 4px; font-size: 1.25rem; }
.cartao-linha p { margin: 0 0 6px; }
.nota { background: var(--primary-50); border-radius: var(--r-m); padding: 8px 12px; }
.filtro-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.filtro-tags a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink-700); font-size: 15px; }
.filtro-tags a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* consultas */
.consulta { margin-bottom: 16px; }
.consulta h3 { margin-top: 0; }
.opcoes { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 4px; }
.opcoes legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.opcoes label { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.opcoes input { width: 20px; height: 20px; min-height: 0; accent-color: var(--teal-700); }
.resultados { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 10px; }
.resultados li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 2fr) auto; gap: 12px; align-items: center; }
.barra { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.barra span { display: block; height: 100%; background: var(--teal-700); border-radius: 999px; }

/* arquivo */
.galeria-arquivo { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-bottom: 40px; }
.galeria-arquivo figure { background: #FBF6EA; padding: 10px 10px 14px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.galeria-arquivo img { width: 100%; height: 200px; object-fit: cover; border-radius: 2px; filter: sepia(.1); }
.galeria-arquivo figcaption { color: #3A332A; font-size: 15px; }

/* Definições: pré-visualização do logótipo */
.logo-previas { display: flex; flex-wrap: wrap; gap: 20px; margin: 8px 0 24px; }
.logo-fundo { width: 280px; height: 120px; border-radius: var(--r-l); display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.logo-fundo.claro { background: #fff; }
.logo-fundo.claro img { max-width: 220px; max-height: 70px; }
.logo-fundo.escuro { background: var(--primary-700); }
.logo-fundo.escuro span { background: #fff; border-radius: 8px; padding: 6px 10px; display: flex; }
.logo-fundo.escuro img { max-width: 120px; max-height: 36px; }

/* Agenda em cartões (imagem em destaque, como as notícias) */
.agenda-grelha { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 32px 28px; }
.ev { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.sec-branca .ev { background: var(--paper); }
.ev-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--primary-50); overflow: hidden; }
.ev-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .3s ease; }
a.ev-img:hover img { transform: scale(1.03); }
.ev-img .advento { height: 100%; border-radius: 0; }
.ev-data { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--teal-700); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; align-items: center; line-height: 1.05; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.ev-data span:first-child { font-family: var(--font-t); font-weight: 700; font-size: 24px; }
.ev-data span:last-child { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ev-sem-img { display: flex; align-items: center; justify-content: center; background: var(--teal-50); }
.ev-data-grande { display: flex; flex-direction: column; align-items: center; color: var(--teal-700); line-height: 1; }
.ev-data-grande span:first-child { font-family: var(--font-t); font-weight: 700; font-size: 72px; }
.ev-data-grande span:last-child { font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.ev-txt { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.ev-txt h3 { margin: 4px 0 8px; font-size: 1.35rem; }
.ev-txt p { margin: 0 0 8px; }
.ev-txt .cal-add { margin-top: auto; padding-top: 6px; }
