:root {
  --bg: #f4f1ea;
  --ink: #1c2a22;
  --muted: #5c6b62;
  --card: #fffdf8;
  --accent: #1f6f4a;
  --accent-2: #c9a227;
  --ok: #0f7a45;
  --err: #a33;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 1.1rem; }
.top {
  background: transparent;
  color: inherit;
  min-height: 0;
  overflow: visible;
  display: block;
}
.top::after { display: none; }
.top-foto {
  position: static;
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
}
.top-faixa {
  background: #143d2b;
  color: #fff;
  border-top: 4px solid #e2c56a;
}
.top-texto {
  position: static;
  z-index: auto;
  padding: 1.15rem 0 1.25rem;
  text-align: center;
}
.kicker {
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .9;
}
.top h1 {
  margin: .25rem 0 0;
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  text-shadow: none;
}
.top h1::after { display: none; }
.sub {
  margin: .4rem auto 0;
  max-width: 36rem;
  font-size: .95rem;
  line-height: 1.45;
  font-weight: 400;
  opacity: .92;
  text-shadow: none;
}
@media (max-width: 560px) {
  .top-foto { height: 160px; }
}

main { padding: 1.4rem 0 3rem; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem 1.4rem;
  box-shadow: 0 8px 30px rgba(20, 40, 30, .08);
  margin-bottom: 1rem;
}
.card h2 { margin: 0 0 .6rem; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; }
.lead { font-size: 1.25rem; margin: 0 0 .8rem; }
@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
.bar {
  height: 16px;
  width: 100%;
  background: #e4ece6;
  border-radius: 99px;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  /* 0–30% amarelo; 31–70% interpola até verde; ≥70% verde */
  background: hsl(
    calc(48 + max(0, (min(var(--p), 70) - 30) / 40) * 97),
    86%,
    calc(52% - (min(var(--p), 70) / 70) * 20%)
  );
}
.pct { font-weight: 700; font-size: 1.4rem; margin: .5rem 0 0; }
.meta { color: var(--muted); margin: .2rem 0; }
.painel.meta-ok { border: 2px solid var(--ok); }
.meta-atingida {
  color: var(--ok);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: .75rem 0 0;
  font-size: 1rem;
}
.cta {
  display: inline-block;
  margin-top: 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
}
.cta.secondary { background: #345; }
.lista { list-style: none; padding: 0; margin: 0; }
.lista li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid #eee7d8;
}
.lista span { color: var(--muted); font-size: .92rem; }
.empty, .muted, .resto { color: var(--muted); }
.foot { padding: 1.2rem 0 2rem; color: var(--muted); font-size: .85rem; }
form label { display: block; margin: .65rem 0; font-weight: 600; font-size: .92rem; }
.input, input[type=text], input[type=tel], textarea {
  width: 100%;
  margin-top: .25rem;
  padding: .7rem .75rem;
  border: 1px solid #d5cdc0;
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.input.caixa-alta,
form input[type=text].caixa-alta,
form textarea.caixa-alta {
  text-transform: uppercase;
}
.campo-invalido,
.tem-erro .input {
  border-color: var(--err) !important;
  background: #fff5f5;
}
.alerta-sucesso {
  background: #e8f7ee;
  border: 2px solid var(--ok);
  color: #0d5c34;
  border-radius: 12px;
  padding: 1rem 1.1rem 1.05rem;
  margin: 0 0 1rem;
}
.alerta-sucesso .ok-titulo {
  margin: 0 0 .5rem;
  font-weight: 800;
  letter-spacing: .04em;
  font-size: 1.05rem;
}
.alerta-sucesso p { margin: 0; }
input[readonly] { background: #eef4ef; color: #355; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
fieldset { border: 1px solid #ece4d4; border-radius: 12px; margin: 0 0 1rem; padding: .8rem 1rem 1rem; }
legend { font-weight: 700; padding: 0 .4rem; }
.termo { font-weight: 500; display: flex; gap: .55rem; align-items: flex-start; }
.erro, .errorlist { color: var(--err); font-weight: 500; }
.errorlist { list-style: none; padding: 0; margin: .2rem 0 0; font-size: .88rem; }
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .lista li { flex-direction: column; gap: .15rem; }
  .top h1 { font-size: 1.7rem; }
}

.cta-wrap { text-align: center; margin: 0 0 1rem; }
.cta-wrap .cta { margin-top: 0; }
#mapa-adesoes { height: 360px; border-radius: 12px; margin: .7rem 0; background: #e8eee9; }
.legenda { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .7rem 1.1rem; }
.legenda li { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .92rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px #ccc; }
.dot.verde { background: #1f8a4c; }
.dot.amarelo { background: #d4a017; }
.dot.cinza { background: #8a8f8c; }
.info-projeto { text-align: center; }
.info-projeto h2 { text-align: center; }
.info-projeto p { color: var(--muted); margin: .4rem auto; max-width: 38rem; }

@media (max-width: 560px) {
  #mapa-adesoes { height: 280px; }
}

.aderiram { margin: 0; line-height: 1.6; }

.cta-wrap .cta + .cta { margin-left: .5rem; }
.reunioes-home p { color: var(--muted); margin: 0; }
.reuniao-card { display: flex; flex-direction: column; gap: .35rem; }
.reuniao-card .meta-linha { color: var(--muted); margin: 0; }
.reuniao-card .pauta-resumo { margin: .3rem 0 .6rem; }
.ata { max-width: 40rem; margin: 0 auto; }
.ata h2 { text-align: center; }
.ata .ata-titulo { text-align: center; letter-spacing: .12em; font-size: .85rem; color: var(--muted); margin: 0 0 .4rem; }
.ata .nomes { margin: .4rem 0 1rem; padding-left: 1.2rem; }
.ata .bloco { margin: 1rem 0; }
.ata .bloco h3 { font-size: 1rem; margin: 0 0 .35rem; }
.voltar { display: inline-block; margin-bottom: .8rem; color: var(--accent); }

.pwa-install {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem .75rem;
  margin: 1rem 0 0;
}
.pwa-install-btn {
  appearance: none;
  border: 1px solid #c9a227;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: .85rem;
  border-radius: 999px;
  padding: .5rem 1rem;
  cursor: pointer;
}
.pwa-ios-hint { margin: 0; font-size: .85rem; color: var(--muted); }
.pwa-install-dismiss {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
  text-decoration: underline;
}
.pwa-toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 1.5rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .85rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(20, 40, 30, .12);
  font-size: .92rem;
}
.pwa-toast[hidden] { display: none !important; }
.pwa-toast .cta { margin: 0; padding: .45rem 1rem; font-size: .8rem; }
.pwa-toast-net { justify-content: center; font-weight: 600; }
.bloco-contratante legend {
  font-size: 1.05rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nome-contratante input {
  font-weight: 700;
}
.escolha ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.escolha li { margin: .25rem 0; font-weight: 500; }
.bloco-valores p { margin: .35rem 0; }
.calc-linha { margin: .5rem 0 0; }
.contrato-card h2 { margin-bottom: .4rem; }

.resumo-imoveis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
.resumo-card { margin: 0; text-align: center; }
.resumo-rotulo {
  margin: 0;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.resumo-num { margin: .35rem 0 0; font-size: 2rem; font-weight: 800; line-height: 1; }
.resumo-card.ok { border: 2px solid var(--ok); }
.resumo-card.pend { border: 2px solid #d4a017; }
.nota-meta { margin: -.4rem 0 1rem; font-size: .88rem; }
.quadra-bloco { margin: 0 0 1.4rem; }
.quadra-titulo {
  margin: 0 0 .35rem;
  font-size: 1.15rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.filtros-imoveis {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 1rem;
}
.filtro {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d5cdc0;
  border-radius: 999px;
  padding: .45rem .85rem;
  font-size: .85rem;
  font-weight: 700;
}
.filtro.conf.ativo { background: #7a5a12; border-color: #7a5a12; }
.selo-conf { color: #7a5a12; font-size: .8rem; }
.busca-imoveis { display: grid; gap: .6rem; }
.grade-imoveis {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
.imovel-card { margin: 0; border-left: 8px solid #c45; }
.imovel-card.status-contratou { border-left-color: var(--ok); }
.imovel-card.status-pendente { border-left-color: #d4a017; }
.imovel-num { margin: 0; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.imovel-nome { margin: .55rem 0 0; font-size: 1.05rem; font-weight: 700; }
.imovel-tipo { margin: .15rem 0 0; color: var(--muted); }
.selo {
  margin: .85rem 0 0;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .92rem;
}
.selo-ok { color: var(--ok); }
.selo-nao { color: #b03040; }
.selo-pend { color: #9a7a10; }
.pct-quadra { font-weight: 700; margin: .4rem 0 0; }
@media (min-width: 720px) {
  .resumo-imoveis { grid-template-columns: repeat(4, 1fr); }
  .grade-imoveis { grid-template-columns: repeat(3, 1fr); }
}
