:root {
  --bg: #f7f8f7;
  --surface: #ffffff;
  --text: #17201d;
  --muted: #5b6763;
  --border: #dde3e0;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3f1;
  --good: #15803d;
  --good-soft: #e8f6ec;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --warn: #a15c07;
  --warn-soft: #fdf3e2;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 5%), 0 4px 16px rgb(0 0 0 / 4%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1413;
    --surface: #171d1c;
    --text: #e7ecea;
    --muted: #9aa7a3;
    --border: #2a3331;
    --accent: #2dd4bf;
    --accent-ink: #062320;
    --accent-soft: #12302c;
    --good: #4ade80;
    --good-soft: #13291b;
    --bad: #f87171;
    --bad-soft: #351717;
    --warn: #fbbf24;
    --warn-soft: #33270f;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main, header.site, footer.site {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site { padding-top: 20px; }
.brand { font-weight: 800; color: var(--accent); letter-spacing: -0.01em; }

.hero { padding: 24px 0 8px; }
h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 12px; }
.privacy-note { margin: 0; font-size: 0.95rem; }

form { display: grid; gap: 16px; margin-top: 24px; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 0;
  min-width: 0;
}

legend {
  font-weight: 700;
  padding: 0 6px;
  margin-left: -6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
legend small { font-weight: 400; color: var(--muted); }

.step {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
}

.hint { color: var(--muted); font-size: 0.9rem; margin: 4px 0 12px; }
.error { color: var(--bad); font-size: 0.9rem; margin: 4px 0 0; }

input[type="text"] {
  width: 100%;
  min-width: 0;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-soft); }
input.money, input.remaining { text-align: right; font-variant-numeric: tabular-nums; }

.rows { display: grid; gap: 8px; }
.row { display: grid; gap: 8px; align-items: center; }
.row.fixed { grid-template-columns: 1fr 9rem 2.25rem; }
.row.installment { grid-template-columns: 1fr 8rem 7rem 2.25rem; }
.remaining-wrap { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); min-width: 0; }
.remaining-wrap input { flex: 1; }

@media (max-width: 480px) {
  .row.fixed { grid-template-columns: 1fr 7.5rem 2.25rem; }
  /* Celular: descrição e remover na 1ª linha; valor e "faltam" na 2ª. */
  .row.installment { grid-template-columns: 1fr 7.5rem 2.25rem; }
  .row.installment .name { grid-column: 1 / 3; grid-row: 1; }
  .row.installment .remove { grid-column: 3; grid-row: 1; }
  .row.installment .money { grid-column: 1; grid-row: 2; }
  .row.installment .remaining-wrap { grid-column: 2; grid-row: 2; }
  .row.installment + .row.installment { border-top: 1px solid var(--border); padding-top: 8px; }
}

button { font: inherit; cursor: pointer; }

.remove {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
}
.remove:hover { background: var(--bad-soft); color: var(--bad); }

.add {
  margin-top: 10px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
}

.link { border: 0; background: none; color: var(--muted); text-decoration: underline; padding: 0; }

label.inline { display: flex; align-items: center; gap: 8px; max-width: 16rem; }
label.inline input { flex: 1; }
.suffix { color: var(--muted); }

.income-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 8px; }
.income-grid label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }

.form-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.85rem; color: var(--muted); margin: 0; }

.empty { margin: 24px 0; color: var(--muted); text-align: center; }

.result {
  margin-top: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px 16px;
}
.headline { text-align: center; padding: 8px 0 4px; }
.headline .label { margin: 0; color: var(--muted); }
.headline .big {
  margin: 4px 0;
  font-size: clamp(2.5rem, 12vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.headline .sub { margin: 0; color: var(--muted); font-size: 0.95rem; }

.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.facts li { padding: 10px 12px; border-radius: 8px; font-size: 0.95rem; }
.facts .good { background: var(--good-soft); }
.facts .bad { background: var(--bad-soft); }
.facts .warn { background: var(--warn-soft); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
tbody th { font-weight: 600; }
td .amount { display: block; }
td .bar {
  display: block;
  height: 4px;
  margin-top: 4px;
  width: var(--w);
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.6;
}
tr.risk td .bar { background: var(--bad); }
td.good { color: var(--good); }
td.bad { color: var(--bad); font-weight: 600; }

.freed { padding-left: 20px; margin: 0; }
.freed li { margin: 4px 0; }

.waitlist {
  margin: 28px 0;
  padding: 20px 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}
.waitlist h2 { margin-top: 0; }
.cta {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}

.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }

.offer {
  margin: 24px 0 8px;
  padding: 24px 16px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
}
.price { margin: 0; font-size: 3rem; font-weight: 800; color: var(--accent); letter-spacing: -0.03em; }
.price .currency { font-size: 1.25rem; vertical-align: super; margin-right: 4px; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.offer .sub { margin: 0 0 12px; color: var(--muted); }
.offer .closed { color: var(--muted); }
.offer .closed a { color: var(--accent); }
.guarantee { text-align: left; font-size: 0.95rem; background: var(--good-soft); border-radius: 8px; padding: 12px; margin: 16px 0 0; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 4px; color: var(--good); font-weight: 800; }
.checklist.no li::before { content: "✕"; color: var(--bad); }

details { border-bottom: 1px solid var(--border); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }

.faq { margin: 32px 0 8px; }

footer.site { padding-top: 24px; padding-bottom: 40px; color: var(--muted); font-size: 0.85rem; }
footer.site a { color: inherit; }

[hidden] { display: none !important; }
