:root {
  --vale-deep: #0b5b3b;
  --vale: #138a55;
  --vale-bright: #7dbc43;
  --sun: #ffc72c;
  --badari: #1c3f85;
  --badari-deep: #122b5e;
  --orange: #c94b06;
  --ink: #1d342b;
  --muted: #63736c;
  --line: #d9e4de;
  --surface: #f3f7f4;
  --white: #fff;
  --danger: #9f351d;
  --danger-bg: #fff2ed;
  --success-bg: #eaf7ef;
  --focus: 0 0 0 4px rgba(255, 199, 44, .38);
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--surface); line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 10; top: .5rem; left: .5rem; transform: translateY(-180%); background: #fff; color: var(--badari-deep); padding: .7rem 1rem; border-radius: 8px; font-weight: 700; }
.skip-link:focus { transform: none; }

.questionnaire-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(330px, .78fr) minmax(0, 1.42fr); }
.context-panel { min-height: 100vh; position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; padding: clamp(2rem, 5vw, 4.5rem); color: #fff; background: var(--vale-deep); overflow: hidden; }
.context-panel::before { content: ""; position: absolute; width: 28rem; height: 28rem; border-radius: 50%; top: -14rem; right: -13rem; background: var(--sun); opacity: .95; }
.context-panel::after { content: ""; position: absolute; width: 38rem; height: 16rem; right: -13rem; bottom: 12%; background: var(--vale-bright); border-radius: 50% 0 0 50%; transform: rotate(-24deg); opacity: .55; }
.context-panel > * { position: relative; z-index: 1; }
.brand-lockup { display: flex; align-items: center; gap: .9rem; font-family: "Archivo", sans-serif; font-size: 1.2rem; }
.vale-mark { position: relative; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 29% 29% 36% 36%; background: var(--sun); overflow: hidden; transform: rotate(45deg); }
.vale-mark::before, .vale-mark::after, .vale-mark i { content: ""; position: absolute; width: 3.7rem; height: 2.2rem; border-radius: 50%; bottom: -.7rem; }
.vale-mark::before { left: -1.2rem; background: var(--vale-bright); transform: rotate(23deg); }
.vale-mark::after { right: -1.1rem; background: #10a36c; transform: rotate(-18deg); }
.vale-mark i { right: -1.7rem; bottom: -1rem; width: 3rem; height: 3.5rem; background: #287a58; }
.brand-lockup strong { letter-spacing: -.015em; }
.context-copy { margin: auto 0; max-width: 34rem; padding: 5rem 0; }
.context-copy h1 { margin: 0 0 1.25rem; max-width: 12ch; font-family: "Archivo", sans-serif; font-size: clamp(2.4rem, 4.8vw, 5rem); line-height: .98; letter-spacing: -.035em; text-wrap: balance; }
.context-copy p { max-width: 55ch; margin: 0; color: #d9f2e4; font-size: 1.12rem; }
.trust-note { display: flex; align-items: flex-start; gap: .8rem; max-width: 34rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.3); color: #e8f7ee; font-size: .92rem; }
.trust-note svg { flex: 0 0 auto; color: var(--sun); }

.form-stage { min-width: 0; display: flex; flex-direction: column; background: var(--white); }
.progress { width: min(840px, calc(100% - 5rem)); margin: 2.5rem auto 0; position: relative; }
.progress-line { position: absolute; left: 1rem; right: 1rem; top: 1rem; height: 2px; background: var(--line); }
.progress-line i { display: block; width: 100%; height: 100%; background: var(--vale); transform: scaleX(0); transform-origin: left; transition: transform .3s ease-out; }
.progress ol { position: relative; display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; }
.progress li { display: grid; justify-items: center; gap: .35rem; min-width: 5rem; color: var(--muted); font-size: .8rem; font-weight: 600; }
.progress li b { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--white); border: 2px solid var(--line); color: var(--muted); }
.progress li.is-current b { border-color: var(--vale); color: var(--vale-deep); box-shadow: 0 0 0 5px #e8f5ed; }
.progress li.is-current { color: var(--vale-deep); }
.progress li.is-complete b { background: var(--vale); border-color: var(--vale); color: #fff; }

#response-form { width: min(780px, calc(100% - 5rem)); margin: auto; padding: clamp(4rem, 8vh, 7rem) 0; }
.step h2 { max-width: 17ch; margin: 0 0 .8rem; font-family: "Archivo", sans-serif; font-size: clamp(2rem, 3.5vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; color: var(--badari-deep); outline: none; text-wrap: balance; }
.step-number { margin-bottom: 1rem; color: var(--vale-deep); font-weight: 700; }
.lead { max-width: 65ch; margin: 0 0 2rem; color: var(--muted); font-size: 1.08rem; }
.notice { display: flex; gap: .8rem; max-width: 650px; margin: 2rem 0; padding: 1rem 1.1rem; border-radius: 12px; background: #f0f5fb; color: var(--badari-deep); }
.notice svg { flex: 0 0 auto; color: var(--badari); }
.notice p { margin: 0; }
.field { display: block; max-width: 610px; margin: 1.5rem 0; }
.field > span { display: block; margin-bottom: .45rem; color: var(--badari-deep); font-weight: 700; }
.field input { width: 100%; height: 3.25rem; padding: .75rem .9rem; border: 1px solid #aebfb6; border-radius: 9px; background: #fff; color: var(--ink); font-size: 1rem; }
.field input:focus { outline: none; border-color: var(--badari); box-shadow: var(--focus); }
.field input.is-invalid { border-color: var(--danger); }
.field small { display: block; margin-top: .4rem; color: var(--muted); }
.field-error, .group-error, .declaration-error { display: block; min-height: 1.2em; margin-top: .35rem; color: var(--danger); font-size: .9rem; font-style: normal; font-weight: 600; }
.question { margin: 0; padding: 1.6rem 0; border: 0; border-bottom: 1px solid var(--line); }
.question legend { max-width: 70ch; padding: 0; font-family: "Archivo", sans-serif; color: var(--ink); font-size: 1.12rem; line-height: 1.4; font-weight: 700; }
.question .helper { max-width: 67ch; margin: .65rem 0 0; color: var(--muted); font-size: .93rem; }
.choices { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.choices label { cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: flex; align-items: center; min-height: 2.9rem; padding: .65rem 1rem; border: 1px solid #b9c8c0; border-radius: 9px; background: #fff; font-weight: 600; }
.choices input:checked + span { background: var(--vale-deep); border-color: var(--vale-deep); color: #fff; }
.choices input:focus-visible + span { box-shadow: var(--focus); }
.choices-long { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 700px; }
.conditional { margin-top: .6rem; padding: 1.5rem; border: 0; border-radius: 12px; background: var(--success-bg); }
.review-list { display: grid; grid-template-columns: minmax(170px, .65fr) minmax(0, 1fr); margin: 2rem 0; border-top: 1px solid var(--line); }
.review-list dt, .review-list dd { margin: 0; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.review-list dt { padding-right: 1.25rem; color: var(--muted); }
.review-list dd { font-weight: 700; }
.declaration { display: flex; align-items: flex-start; gap: .75rem; max-width: 690px; padding: 1rem; border-radius: 12px; background: #f5f8fb; cursor: pointer; }
.declaration input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: var(--badari); flex: 0 0 auto; }
.submit-error { max-width: 690px; margin-top: 1rem; padding: .9rem 1rem; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button { min-height: 3rem; padding: .7rem 1.2rem; border-radius: 9px; border: 1px solid transparent; font-family: "Archivo", sans-serif; font-weight: 700; }
.button:focus-visible { outline: none; box-shadow: var(--focus); }
.button.primary { background: var(--badari-deep); color: #fff; box-shadow: 0 5px 16px rgba(18, 43, 94, .18); }
.button.primary:hover { background: var(--badari); }
.button.secondary { border-color: #b8c5d5; background: transparent; color: var(--badari-deep); }
.button:disabled { cursor: wait; opacity: .7; }
.success-step { text-align: center; }
.success-step h2 { margin-inline: auto; }
.success-step p { color: var(--muted); }
.success-mark { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin: 0 auto 1.5rem; border-radius: 50%; background: var(--success-bg); color: var(--vale-deep); }
.success-mark svg { width: 2.5rem; height: 2.5rem; stroke-width: 2.4; }
.protocol { display: inline-block; margin: 1rem 0 .5rem; padding: .75rem 1.1rem; border-radius: 8px; background: var(--badari-deep); color: #fff; font-family: "Archivo", sans-serif; font-size: 1.25rem; letter-spacing: .04em; }
.success-date { margin-top: .3rem; }
.form-footer { width: min(840px, calc(100% - 5rem)); display: flex; justify-content: space-between; gap: 1rem; margin: 0 auto; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.form-footer a { color: var(--badari); font-weight: 700; }
.honey { position: absolute !important; left: -10000px !important; }
.unavailable { width: min(680px, calc(100% - 2rem)); margin: 12vh auto; padding: 2rem; }
.unavailable h1 { margin-top: 3rem; font: 800 clamp(2.2rem, 6vw, 4.5rem)/1 "Archivo", sans-serif; color: var(--badari-deep); }

@media (max-width: 920px) {
  .questionnaire-shell { display: block; }
  .context-panel { position: relative; min-height: auto; padding: 2rem 1.25rem 3rem; }
  .context-panel::before { width: 16rem; height: 16rem; top: -9rem; right: -7rem; }
  .context-panel::after { display: none; }
  .context-copy { padding: 4rem 0 3rem; }
  .context-copy h1 { max-width: 14ch; font-size: clamp(2.4rem, 9vw, 4.4rem); }
  .progress, #response-form, .form-footer { width: min(100% - 2rem, 780px); }
  #response-form { padding: 4rem 0; }
}

@media (max-width: 600px) {
  .progress { margin-top: 1.5rem; }
  .progress li { min-width: 2rem; }
  .progress li span { position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }
  #response-form { padding: 3.25rem 0; }
  .step h2 { font-size: 2.1rem; }
  .choices, .choices-long { display: grid; grid-template-columns: 1fr; }
  .choices span { width: 100%; }
  .review-list { grid-template-columns: 1fr; }
  .review-list dt { padding-bottom: .1rem; border-bottom: 0; }
  .review-list dd { padding-top: 0; }
  .actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .form-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
