/* ===== Design tokens ===== */
:root {
  --brand: #0d5560;
  --brand-2: #15808f;
  --brand-soft: #e3f0f1;
  --accent: #16a06a;
  --accent-dark: #0f7e52;
  --accent-soft: #e6f6ee;
  --ink: #1a2433;
  --muted: #687587;
  --line: #e3e8ef;
  --bg: #eef1f5;
  --surface: #ffffff;
  --erro: #c43d3d;
  --radius: 16px;
  --radius-sm: 10px;
  --sombra: 0 1px 2px rgba(16,24,40,.06), 0 10px 26px rgba(16,24,40,.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 18px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(155deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 34px 0 30px;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .02em;
  background: rgba(255,255,255,.14);
  color: #d6e8ea;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 { font-size: 1.78rem; font-weight: 800; letter-spacing: -.02em; }
.hero-sub {
  margin: 9px auto 0;
  max-width: 30em;
  font-size: 1.02rem;
  color: #c6dde0;
}
.hero-sub strong { color: #fff; }
.trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 18px;
}
.trust li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .85rem;
  font-weight: 500;
  color: #d6e8ea;
}
.tick {
  display: grid;
  place-items: center;
  width: 17px; height: 17px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: .66rem;
  line-height: 1;
  flex-shrink: 0;
}

/* ===== Cards ===== */
main { padding: 22px 0 8px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  margin-bottom: 18px;
  box-shadow: var(--sombra);
}
.card-titulo { font-size: 1.22rem; font-weight: 700; letter-spacing: -.01em; }
.card-sub { color: var(--muted); font-size: .93rem; margin: 4px 0 18px; }

/* ===== Formulário ===== */
.campo { margin-bottom: 17px; }
.campo label {
  display: block;
  font-size: .94rem;
  font-weight: 600;
}
.campo .hint {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  margin: 2px 0 8px;
}

input[type=text], input[type=tel], input[type=email], input[type=date],
input[type=month], input[type=number] {
  width: 100%;
  padding: 13px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  outline: 0;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(21,128,143,.14);
}

.input-money {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.input-money:focus-within {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(21,128,143,.14);
}
.input-money .prefixo {
  padding: 0 4px 0 14px;
  color: var(--muted);
  font-weight: 600;
}
.input-money input {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding-left: 6px;
}
.input-money input:focus { box-shadow: none; }

.extra {
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  margin-bottom: 18px;
}
.extra summary {
  cursor: pointer;
  padding: 12px 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand-2);
  list-style: none;
}
.extra summary::-webkit-details-marker { display: none; }
.extra summary::before { content: "+ "; font-weight: 700; }
.extra[open] summary::before { content: "− "; }
.extra[open] { padding-bottom: 8px; }
.extra summary span { color: var(--muted); font-weight: 400; }
.extra .campo { margin-bottom: 12px; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .88rem;
  color: var(--muted);
  margin: 4px 0 18px;
}
.check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); }

.btn-principal {
  width: 100%;
  padding: 15px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(22,160,106,.28);
  transition: transform .08s, background .15s;
}
.btn-principal:hover { background: var(--accent-dark); }
.btn-principal:active { transform: translateY(1px); }

.btn-secundario {
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  font-size: .98rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1.5px solid #cbe0e2;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, transform .08s;
}
.btn-secundario:hover { background: #d6e8ea; }
.btn-secundario:active { transform: translateY(1px); }
.btn-secundario:disabled { opacity: .55; cursor: default; }

.erro {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: .88rem;
  color: var(--erro);
  background: #fdecec;
  border-radius: 8px;
}

/* ===== Resultado / controle ===== */
.card-resultado, .card-lead, #card-controle { display: none; }
.card-resultado.mostrar, .card-lead.mostrar, #card-controle.mostrar {
  display: block;
  animation: surgir .42s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes surgir {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.resultado-hero {
  text-align: center;
  background: var(--brand-soft);
  border: 1px solid #cbe0e2;
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  margin-bottom: 20px;
}
.resultado-hero.isento {
  background: var(--accent-soft);
  border-color: #c9ead9;
}
.resultado-label { font-size: .9rem; font-weight: 600; color: var(--brand); }
.resultado-hero.isento .resultado-label { color: var(--accent-dark); }
.resultado-total {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand);
  line-height: 1.15;
  margin: 4px 0 2px;
}
.resultado-hero.isento .resultado-total { color: var(--accent-dark); }
.resultado-obs { font-size: .8rem; color: var(--muted); }

.bloco { margin-bottom: 18px; }
.bloco h3 {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.verba {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: .96rem;
}
.verba span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.verba.desconto span:last-child { color: var(--accent-dark); }
.verba.base span { font-weight: 700; }

.linha-sub {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  margin-top: 8px;
  background: var(--brand-soft);
  border-radius: 8px;
  font-size: .94rem;
}
.linha-sub strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.darf {
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
  padding: 4px 14px;
  margin-bottom: 4px;
}
.darf-linha {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: .92rem;
  color: var(--muted);
  border-bottom: 1px solid #d3e3e4;
}
.darf-linha:last-child { border-bottom: 0; }
.darf-linha strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.aviso-calc {
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

/* ===== Controle anual ===== */
.mes-vazio { font-size: .92rem; color: var(--muted); padding: 6px 0 2px; }
.mes-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: .96rem;
}
.mes-linha .mes-nome { font-weight: 600; }
.mes-linha .mes-valor { font-variant-numeric: tabular-nums; }
.mes-linha button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
.mes-linha button:hover { color: var(--erro); }

/* ===== Lead ===== */
.card-lead { border: 2px solid var(--brand); }
.card-lead h2 { font-size: 1.2rem; font-weight: 700; }
.card-lead h2 em { color: var(--accent-dark); font-style: normal; }
.lead-texto { color: var(--muted); font-size: .95rem; margin: 8px 0 18px; }
.ok {
  margin-top: 12px;
  padding: 12px 14px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 8px;
}

/* ===== Rodapé ===== */
.rodape {
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  padding: 18px 0 34px;
}
.rodape p { margin: 4px 0; }

@media (min-width: 640px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 2.15rem; }
  main { padding-top: 28px; }
  .card { padding: 28px 26px; }
}
