:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #e4e8ee;
  --border-strong: #d3dae3;
  --text: #1c2530;
  --text-soft: #5b6675;
  --text-faint: #8a93a1;
  --accent: #185fa5;
  --accent-dark: #124a82;
  --accent-soft: #e9f1fa;
  --ok: #2f7d32;
  --danger: #a32d2d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 33, 56, 0.04), 0 8px 24px rgba(16, 33, 56, 0.06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 50% -200px, #e7eef7 0%, rgba(231, 238, 247, 0) 70%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 0 18px 96px; }

/* ---------- Cabecalho ---------- */
.site-header {
  text-align: center;
  padding: 48px 18px 28px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #d6e6f6;
  padding: 5px 12px;
  border-radius: 999px;
}
.site-header h1 {
  font-size: clamp(24px, 4vw, 33px);
  line-height: 1.2;
  margin: 16px 0 8px;
  letter-spacing: -0.02em;
}
.site-header p {
  color: var(--text-soft);
  max-width: 560px;
  margin: 0 auto;
  font-size: 15px;
}

/* ---------- Barra de progresso fixa ---------- */
.progress-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 246, 249, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 10px 18px;
}
.progress-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress-track {
  flex: 1;
  height: 6px;
  background: #e2e7ee;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #2f86d8);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- Cartoes ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card-lead { margin-bottom: 22px; }
.card-lead h2 { margin: 0 0 4px; font-size: 17px; }
.card-lead p { margin: 0; color: var(--text-soft); font-size: 14px; }

/* ---------- Campos de identificacao ---------- */
.id-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
label .opt { font-weight: 400; color: var(--text-faint); }

input[type="text"],
input[type="email"],
textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fbfcfd;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 13px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }

/* ---------- Secao de perguntas ---------- */
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.section-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 19px;
  flex-shrink: 0;
}
.section-title { font-size: 17px; font-weight: 600; flex: 1; }
.section-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  background: #eef1f5;
  padding: 3px 11px;
  border-radius: 999px;
}
.section-progress {
  height: 4px;
  background: #edf0f4;
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 18px;
}
.section-progress > div {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s;
}

.q { padding: 16px 0; border-top: 1px solid var(--border); }
.q:first-of-type { border-top: none; padding-top: 4px; }
.q-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.q-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  min-width: 26px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.q-text { font-size: 14.5px; font-weight: 500; flex: 1; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 9px;
}
.tag-critico { background: #fcebeb; color: #a32d2d; }
.tag-processo { background: #e6f1fb; color: #185fa5; }
.tag-sistema { background: #eaf3de; color: #3b6d11; }
.tag-recurso { background: #faeeda; color: #854f0b; }
.tag-doc { background: #eeedfe; color: #3c3489; }

/* ---------- Acoes / envio ---------- */
.actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
}
.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 11px;
  padding: 14px 30px;
  cursor: pointer;
  transition: transform 0.05s, background 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(24, 95, 165, 0.25);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.hint { font-size: 13px; color: var(--text-faint); text-align: center; }

.feedback {
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 10px;
  width: 100%;
  text-align: center;
  display: none;
}
.feedback.show { display: block; }
.feedback.error { background: #fcebeb; color: var(--danger); }
.feedback.ok { background: #e7f4e8; color: var(--ok); }

/* ---------- Tela de sucesso ---------- */
.done {
  text-align: center;
  padding: 40px 24px;
}
.done .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e7f4e8;
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 32px;
  margin: 0 auto 18px;
}
.done h2 { margin: 0 0 8px; font-size: 22px; }
.done p { color: var(--text-soft); margin: 0 auto; max-width: 420px; }

footer {
  text-align: center;
  color: var(--text-faint);
  font-size: 12.5px;
  padding: 8px 18px 0;
}

@media (max-width: 560px) {
  .id-grid { grid-template-columns: 1fr; }
  .card { padding: 18px 16px; }
  .site-header { padding: 32px 12px 20px; }
}
