:root {
  --green: #007a33;
  --green-dark: #005f28;
  --black: #111111;
  --ink: #202124;
  --muted: #687076;
  --gold: #ba9653;
  --gold-soft: #fbf5e9;
  --green-soft: #eef8f2;
  --border: #e7e7e7;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 122, 51, 0.10), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(186, 150, 83, 0.13), transparent 28rem),
    var(--white);
}

.app-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 32px 18px;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.card {
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--black));
}

.brand-header {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 34px;
}
.logo-placeholder {
  width: min(340px, 78vw);
  min-height: 120px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--green);
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0;
}
.logo-placeholder img {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: contain;
}
.logo-fallback {
  display: none;
  width: 100%;
  min-height: 112px;
  border-radius: 24px;
  place-items: center;
  background: var(--green-soft);
  border: 2px dashed rgba(0, 122, 51, 0.35);
}

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 0;
  color: var(--black);
  font-size: clamp(2.3rem, 7vw, 4.35rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}
h2 {
  color: var(--black);
  font-size: clamp(1.95rem, 4.3vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
  margin-bottom: 18px;
}
.lede { color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.65; max-width: 700px; }
.welcome-screen { text-align: center; display: grid; justify-items: center; }
.welcome-screen .lede { max-width: 610px; }
.welcome-actions { justify-content: center; }

.progress-wrap { margin: 0 0 36px; }
.progress-meta { display: flex; justify-content: flex-start; gap: 16px; margin-bottom: 12px; color: var(--muted); font-size: .96rem; font-weight: 900; }
.progress-track { height: 18px; background: #eeeeee; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: inherit; transition: width .25s ease; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.screen { animation: fadeIn .20s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hidden { display: none !important; }

.answer-box {
  width: 100%;
  height: 64px;
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 0 22px;
  font: inherit;
  font-size: 1.12rem;
  line-height: 1;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  background: var(--white);
}
.answer-box:focus { border-color: var(--green); box-shadow: 0 0 0 5px rgba(0, 122, 51, .10); }
.answer-box::placeholder { color: #9aa0a6; }
.helper { color: var(--muted); line-height: 1.55; margin-bottom: 18px; }
.saved-note { min-height: 22px; margin: 12px 0 0; color: var(--muted); font-size: .9rem; }
.spinner {
  width: 44px;
  height: 44px;
  border: 5px solid #eeeeee;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.button-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; align-items: center; }
button, .button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}
.primary { background: var(--green); color: var(--white); box-shadow: 0 12px 25px rgba(0, 122, 51, .20); }
.primary:hover { background: var(--green-dark); }
.secondary { background: #f5f5f5; color: var(--black); border: 1px solid var(--border); }
.secondary:hover { background: #ededed; }
button:disabled { opacity: .55; cursor: not-allowed; }

.skip {
  background: var(--white);
  border: 1px solid rgba(0, 122, 51, .45);
  color: var(--green-dark);
}
.skip:hover { background: var(--green-soft); }
.survey-actions { justify-content: space-between; }
.survey-actions .primary { margin-left: auto; }

.callout { background: var(--gold-soft); border: 1px solid rgba(186,150,83,.35); border-radius: 22px; padding: 18px; margin: 24px 0; color: var(--black); line-height: 1.55; }
.notice { color: var(--muted); font-size: .94rem; line-height: 1.55; }
.error { color: #9a1f1f; font-weight: 800; }
.success-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 2.4rem; font-weight: 900; margin-bottom: 20px; }

@media (max-width: 640px) {
  .app-shell { padding: 14px; align-items: start; }
  .card { border-radius: 22px; padding: 26px 18px; min-height: calc(100vh - 28px); }
  .brand-header { gap: 12px; margin-bottom: 28px; }
  .logo-placeholder { width: min(280px, 82vw); min-height: 88px; border-radius: 20px; }
  .logo-placeholder img { max-height: 104px; }
  .logo-fallback { min-height: 86px; border-radius: 20px; }
  h1 { font-size: 2.45rem; }
  h2 { font-size: 1.9rem; }
  .answer-box { height: 58px; font-size: 1rem; border-radius: 18px; }
  .button-row { flex-direction: column-reverse; align-items: stretch; }
  button, .button { width: 100%; }
  .survey-actions .primary { margin-left: 0; }
}
