:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-3: #f1f5f9;
  --ink: #0f172a;
  --muted: #55627a;
  --subtle: #8a94a8;
  --border: #e2e8f0;
  --border-subtle: rgba(15, 23, 42, 0.06);
  --green: #008542;
  --green-dark: #005a2c;
  --green-soft: rgba(0, 133, 66, 0.08);
  --yellow: #ffb81c;
  --yellow-soft: rgba(255, 184, 28, 0.12);
  --orange: #ff6a13;
  --navy: #1c2f6e;
  --destructive: #dc2626;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px -18px rgba(15, 23, 42, 0.18);
  --shadow-btn: 0 1px 2px rgba(15, 23, 42, 0.12), 0 8px 20px -10px rgba(0, 133, 66, 0.55);
  --font-serif: "Merriweather", Georgia, serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(900px 420px at 15% -5%, rgba(0, 133, 66, 0.07), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(255, 184, 28, 0.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- topo ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar-logo { height: 34px; width: auto; }
.topbar-divider { width: 1px; height: 24px; background: var(--border); }
.topbar-title { font-weight: 600; font-size: 15px; color: var(--muted); }

/* ---------- página ---------- */
.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 20px 64px;
  flex: 1;
}

.intro h1 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.intro p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  max-width: 58ch;
}

/* ---------- card / form ---------- */
.card {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
}
@media (min-width: 640px) {
  .card { padding: 36px 40px; }
}

.step { border: 0; padding: 0; margin: 0 0 30px; }
.step legend {
  font-weight: 700;
  font-size: 16.5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  flex: none;
}

/* ---------- escolhas grandes ---------- */
.choice-grid { display: grid; gap: 10px; }
.choice-grid.two { grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .choice-grid.two { grid-template-columns: 1fr 1fr; }
}
.choice {
  font-family: inherit;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.choice:hover { border-color: #c3cdd9; }
.choice.selected {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px var(--green);
}
.choice-title { display: block; font-weight: 700; font-size: 15.5px; color: var(--ink); }
.choice-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.choice.selected .choice-title { color: var(--green-dark); }

/* ---------- chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip:hover { border-color: #c3cdd9; color: var(--ink); }
.chip.selected {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
}

/* ---------- campos ---------- */
.scope-block { margin-top: 16px; }
.hidden { display: none !important; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.field label,
.field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 7px;
}
.optional { font-weight: 400; color: var(--subtle); font-size: 13px; }

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2355627a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
textarea { resize: vertical; min-height: 140px; }

input:focus, select:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 133, 66, 0.12);
}

input::placeholder, textarea::placeholder { color: var(--subtle); }

.char-count {
  text-align: right;
  font-size: 12.5px;
  color: var(--subtle);
  margin-top: 5px;
}

/* honeypot fora da tela */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  overflow: hidden;
}

/* ---------- dropzone ---------- */
.dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px dashed #c3cdd9;
  border-radius: 12px;
  background: var(--surface-3);
  padding: 18px 16px;
  cursor: pointer;
  color: var(--green);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dragging {
  border-color: var(--green);
  background: var(--green-soft);
}
.dropzone-text { color: var(--ink); }
.dropzone-text strong { display: block; font-size: 14.5px; }
.dropzone-text span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.file-list { list-style: none; margin-top: 10px; display: grid; gap: 8px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
}
.file-item .file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.file-item .file-size { color: var(--subtle); font-size: 12.5px; flex: none; }
.file-remove {
  font-family: inherit;
  border: 0;
  background: none;
  color: var(--subtle);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  flex: none;
}
.file-remove:hover { background: var(--surface-3); color: var(--destructive); }

/* ---------- alertas / progresso ---------- */
.alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert.error {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.25);
  color: #991b1b;
}
.alert.warn {
  background: var(--yellow-soft);
  border-color: rgba(255, 184, 28, 0.45);
  color: #7a5200;
}

.progress-wrap { margin-bottom: 16px; }
.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #00a854);
  transition: width 0.25s ease;
}
.progress-label { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- botões ---------- */
.submit-btn {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 12px;
  padding: 15px 20px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background 0.15s, transform 0.1s;
}
.submit-btn:hover:not(:disabled) { background: var(--green-dark); }
.submit-btn:active:not(:disabled) { transform: translateY(1px); }
.submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.footnote {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--subtle);
  text-align: center;
}

.ghost-btn {
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--green-dark);
  background: none;
  border: 1.5px solid var(--green);
  border-radius: 10px;
  padding: 11px 22px;
  cursor: pointer;
  transition: background 0.15s;
}
.ghost-btn:hover { background: var(--green-soft); }

/* ---------- sucesso ---------- */
.success-card { text-align: center; padding: 48px 28px; }
.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-card h2 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 26px;
}
.success-card p {
  color: var(--muted);
  margin: 10px auto 24px;
  max-width: 46ch;
}

/* ---------- rodapé ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 18px 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--subtle);
}
