:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #174b36;
  background: #fff;
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  /* O banner e o texto mantêm sua altura completa, mesmo em janelas baixas. */
  grid-template-rows: max-content max-content minmax(min-content, 1fr);
}

.banner {
  border-bottom: 3px solid #d6aa65;
  background: #174b36;
}

.banner picture {
  display: block;
}

.banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .banner img {
    /* A imagem inteira é reduzida e centralizada sobre as laterais verdes. */
    max-height: clamp(240px, 36vh, 380px);
    max-height: clamp(240px, 36svh, 380px);
  }
}

.welcome {
  position: relative;
  z-index: 1;
  padding: clamp(20px, 2.5vw, 32px) 24px clamp(14px, 1.5vw, 18px);
  background: #fff;
  text-align: center;
}

.welcome p {
  margin: 0 auto;
  text-wrap: balance;
}

.welcome .welcome-lead {
  max-width: 52rem;
  color: #174b36;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  text-transform: uppercase;
}

.welcome .welcome-title {
  display: block;
  font-size: clamp(1.875rem, 1.2rem + 1.55vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: 0.03em;
  text-wrap: balance;
}

.welcome .welcome-subtitle {
  display: block;
  margin-top: clamp(0.45rem, 0.25rem + 0.6vw, 0.75rem);
  font-size: clamp(1.3125rem, 0.95rem + 0.85vw, 1.6875rem);
  line-height: 1.28;
  letter-spacing: 0.04em;
  text-wrap: balance;
}

.welcome .welcome-guidance {
  max-width: 74ch;
  margin-top: clamp(14px, 1.2vw + 10px, 20px);
  color: #526159;
  font-size: clamp(1.0625rem, 1.3vw, 1.125rem);
  font-weight: 400;
  line-height: 1.6;
}

.registration {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  min-height: 360px;
  margin: 0 auto;
  padding: 22px 24px 36px;
}

[hidden] {
  display: none !important;
}

button, input, textarea {
  font: inherit;
}

.survey-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #617067;
  font-size: 12px;
  line-height: 1.5;
}

.survey-meta span:first-child {
  font-weight: 600;
  color: #174b36;
}

#survey-progress {
  display: block;
  appearance: none;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  color: #286444;
  background: #e9eee9;
}

#survey-progress::-webkit-progress-bar { background: #e9eee9; }
#survey-progress::-webkit-progress-value { background: #286444; }
#survey-progress::-moz-progress-bar { background: #286444; }

.question {
  margin-top: 26px;
  min-height: 154px;
}

.question fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.question-title {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  color: #183f2e;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.required-mark { color: #a5442d; }
.optional-mark { color: #617067; font-size: 14px; font-weight: 400; white-space: nowrap; }

.question-help {
  margin: -5px 0 18px;
  color: #5c6b62;
  font-size: 15px;
  line-height: 1.6;
}

.text-control {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid #c4d0c7;
  border-radius: 10px;
  background: #fff;
  color: #203e2d;
  font-size: 18px;
  line-height: 1.4;
}

.text-control::placeholder { color: #768278; opacity: 1; }
textarea.text-control { min-height: 142px; resize: vertical; }
.text-control[aria-invalid="true"] { border-color: #a12e25; }

.text-control:focus-visible,
.button:focus-visible,
.choice input:focus-visible {
  outline: 3px solid #a6c5af;
  outline-offset: 3px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #d5ddd6;
  border-radius: 10px;
  color: #344d3d;
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
}

.choice:hover { border-color: #6d927a; }
.choice:has(input:checked) { border-color: #286444; background: #f0f6f1; }
.choice input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: #286444; }
.choice-clear { margin-top: 12px; padding: 8px 0; border: 0; background: none; color: #365e45; text-decoration: underline; cursor: pointer; }

.form-error {
  min-height: 24px;
  margin: 12px 0;
  color: #a12e25;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.survey-actions { display: flex; justify-content: space-between; gap: 12px; }
.button { min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 9px; font-size: 16px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.button-primary { margin-left: auto; background: #20553b; color: #fff; }
.button-primary:hover { background: #17432d; }
.button-secondary { border-color: #cad5cd; background: #fff; color: #365c43; }
.button-secondary:hover { background: #f3f7f3; }
.button:disabled { cursor: wait; opacity: 0.65; }
.form-purpose { margin: 22px 0 0; color: #65736b; font-size: 12px; line-height: 1.6; }

.success-panel { padding: 24px 0; text-align: center; }
.success-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: #edf5ee; color: #286444; font-size: 28px; }
.success-panel h2 { margin: 0 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 4vw, 34px); font-weight: 400; }
.success-panel p { max-width: 48ch; margin: 0 auto 24px; color: #526159; font-size: 17px; line-height: 1.65; }
.app-notice { color: #526159; line-height: 1.6; text-align: center; }

@media (max-width: 420px) {
  .choice-grid { grid-template-columns: 1fr; }
  .survey-meta span:last-child { display: none; }
}

@media (max-width: 600px) {
  .welcome {
    padding: 18px 20px 10px;
  }

  .welcome .welcome-title {
    line-height: 1.14;
    letter-spacing: 0.025em;
  }

  .welcome .welcome-subtitle {
    line-height: 1.32;
  }

  .registration {
    padding: 18px 20px 28px;
  }
}
