:root {
  --ink: #121016;
  --body: #686674;
  --muted: #8a8895;
  --brand: #5949ed;
  --brand-strong: #4c3bdd;
  --brand-soft: #f2f0ff;
  --brand-wash: #ebe9ff;
  --line: #dedce8;
  --line-strong: #cbc8d9;
  --surface: #ffffff;
  --danger: #b42335;
  --danger-soft: #fff6f7;
  --radius-sm: 10px;
  --radius-md: 14px;
  --shadow-soft: 0 14px 34px rgb(57 42 153 / 8%);
  --shadow-button: 0 8px 18px rgb(20 16 35 / 18%);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #fbfaff;
  font-family: "Rethink Sans", Manrope, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.skip-link { position: fixed; z-index: 20; top: -90px; left: 16px; padding: 10px 14px; color: #fff; border-radius: var(--radius-sm); background: var(--ink); }
.skip-link:focus { top: 16px; }

.page-shell {
  position: relative;
  min-height: 100dvh;
  overflow-x: clip;
  background: radial-gradient(circle at 96% 4%, rgb(226 222 255 / 68%) 0, rgb(226 222 255 / 24%) 21%, transparent 43%), radial-gradient(circle at 0% 96%, rgb(255 219 246 / 36%) 0, transparent 34%), #fbfaff;
}
.page-shell::before { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(115deg, rgb(255 255 255 / 80%), transparent 42%); }

.form-panel { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; min-height: 100dvh; padding: clamp(26px, 3vw, 42px) clamp(20px, 5vw, 72px) 30px; }
.form-panel > * { width: 100%; max-width: 700px; }
.form-heading { margin-bottom: 24px; }
.form-brand { display: flex; flex-direction: column; align-items: flex-start; width: max-content; margin-bottom: 24px; }
.form-logo { display: block; width: 98px; height: auto; }
.form-brand span { margin-top: 2px; color: var(--brand); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.step { margin: 0 0 5px; color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.form-heading h1, .success h2 { margin: 0 0 5px; color: var(--ink); font-size: clamp(29px, 3.2vw, 35px); font-weight: 500; letter-spacing: -.055em; line-height: 1.08; }
.form-heading > p:last-child, .success > p:not(.step) { max-width: 560px; margin: 0; color: var(--body); font-size: 14px; line-height: 1.5; }

.stepper { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: #a09eab; font-size: 12px; font-weight: 600; }
.stepper-item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.stepper-item b { display: grid; width: 24px; height: 24px; place-items: center; color: #777582; border: 1px solid var(--line-strong); border-radius: 50%; background: rgb(255 255 255 / 70%); font-size: 11px; }
.stepper-item.is-active { color: var(--brand); }
.stepper-item.is-active b { color: #fff; border-color: var(--brand); background: var(--brand); }
.stepper-item.is-complete { color: var(--body); }
.stepper-line { flex: 1 1 36px; height: 1px; background: var(--line); }
.stepper [hidden] { display: none !important; }

.form-step[hidden] { display: none; }
.step-title { margin: 0 0 4px; color: var(--ink); font-size: 21px; font-weight: 500; letter-spacing: -.04em; line-height: 1.15; }
.step-description { margin: 0 0 20px; color: var(--body); font-size: 13px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { min-width: 0; }
.full { grid-column: 1 / -1; }
.field label, .field legend { display: block; margin: 0 0 6px; padding: 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.field b { color: var(--brand); }
.field input, .field textarea { display: block; width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: 0; background: rgb(255 255 255 / 88%); font-size: 14px; font-weight: 500; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.field textarea { min-height: 82px; resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: #a19fac; font-weight: 400; }
.field input:hover, .field textarea:hover { border-color: #aaa6be; background: #fff; }
.field input:focus, .field textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgb(89 73 237 / 16%); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); box-shadow: 0 0 0 3px rgb(180 35 53 / 10%); }
.field-help { margin: 4px 0 0; color: var(--body); font-size: 11px; line-height: 1.4; }
.field-error { min-height: 0; margin: 5px 0 0; color: var(--danger); font-size: 12px; font-weight: 700; }
.field-error:not(:empty) { min-height: 18px; }

.contact-method-field { margin: 0; padding: 0; border: 0; }
.contact-method-field legend { margin-bottom: 10px; }
.contact-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.contact-method { position: relative; display: block; cursor: pointer; }
.contact-method input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-method-card { position: relative; display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgb(255 255 255 / 82%); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; }
.contact-method:hover .contact-method-card { border-color: #aea6ef; background: #fff; box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.contact-method input:focus-visible + .contact-method-card { outline: 3px solid rgb(89 73 237 / 22%); outline-offset: 2px; }
.contact-method input:checked + .contact-method-card { border-color: #9185f3; background: var(--brand-soft); box-shadow: 0 0 0 3px rgb(89 73 237 / 10%), var(--shadow-soft); }
.method-icon { flex: 0 0 auto; width: 23px; height: 23px; fill: none; stroke: var(--brand); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.whatsapp-icon { fill: none; stroke: var(--brand); stroke-width: 1.55; }
.contact-method-card > span:not(.method-icon) { display: flex; flex-direction: column; min-width: 0; }
.contact-method-card strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.contact-method-card small { margin-top: 1px; color: var(--body); font-size: 11px; line-height: 1.3; }
.contact-method-card i { width: 17px; height: 17px; margin-left: auto; border: 1.5px solid #c3c0cd; border-radius: 50%; transition: border-color .18s ease, box-shadow .18s ease; }
.contact-method input:checked + .contact-method-card i { border: 4px solid var(--brand); box-shadow: 0 0 0 1px #b4adfa; }
.contact-input[hidden] { display: none; }

/* Step 1 keeps the contact decision as one clear, full-width row. */
.form-step[data-step="1"] .contact-input { grid-column: 1 / -1; }

/* Step 3 is intentionally one question per row: it is a longer, reflective step. */
.form-step[data-step="3"] .form-grid { grid-template-columns: minmax(0, 1fr); }
.form-step[data-step="3"] .form-grid > * { grid-column: 1 / -1; }
.form-step[data-step="3"] .radio-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.choice-field { margin: 0; padding: 0; border: 0; }
.choice-field .field-help { margin-top: -3px; margin-bottom: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices label, .radio-list label { position: relative; display: inline-flex; cursor: pointer; }
.choices input, .radio-list input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 11px; color: #484552; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 11px; font-weight: 600; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.choices label:hover span { border-color: #aea6ef; background: var(--brand-soft); }
.choices input:checked + span { color: var(--brand-strong); border-color: #b8afff; background: var(--brand-soft); }
.choices input:focus-visible + span, .radio-list input:focus-visible + span { outline: 3px solid rgb(89 73 237 / 20%); outline-offset: 2px; }
.radio-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.radio-list span { position: relative; display: flex; align-items: center; width: 100%; min-height: 42px; padding: 8px 10px 8px 34px; color: #484552; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-size: 11px; font-weight: 600; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.radio-list span::before { position: absolute; left: 11px; width: 14px; height: 14px; content: ""; border: 1.5px solid #aaa7b5; border-radius: 50%; }
.radio-list label:hover span { border-color: #aea6ef; background: var(--brand-soft); }
.radio-list input:checked + span { color: var(--brand-strong); border-color: #b8afff; background: var(--brand-soft); }
.radio-list input:checked + span::before { border: 4px solid var(--brand); }
.choice-field.invalid legend { color: var(--danger); }
.choice-field.invalid .choices span, .choice-field.invalid .radio-list span { border-color: #efb9c2; }

.error-summary { margin: 0 0 20px; padding: 12px 14px; color: #8a1427; border: 1px solid #efb9c2; border-radius: var(--radius-sm); background: var(--danger-soft); font-size: 13px; font-weight: 700; }
.error-summary a { color: inherit; }
.contact-error { min-height: 18px; margin: 12px 0 0; color: var(--danger); font-size: 12px; font-weight: 700; }

.form-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "notice reset" "actions actions"; gap: 10px 12px; margin-top: 22px; }
.form-footer > p { grid-area: notice; margin: 0; color: var(--body); font-size: 11px; line-height: 1.45; }
.form-actions { grid-area: actions; display: flex; gap: 10px; }
.form-footer button, .success button, .otp-verify-button, .dialog-confirm { min-height: 48px; color: #fff; border: 0; border-radius: var(--radius-sm); background: linear-gradient(180deg, #3d3c3d 0%, #181719 100%); box-shadow: var(--shadow-button); font-size: 14px; font-weight: 600; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.form-footer button:hover, .success button:hover, .otp-verify-button:hover, .dialog-confirm:hover { filter: brightness(1.08); box-shadow: 0 10px 22px rgb(20 16 35 / 24%); transform: translateY(-1px); }
.form-footer button:active, .success button:active, .otp-verify-button:active, .dialog-confirm:active { transform: translateY(0); }
.form-footer button:focus-visible, .success button:focus-visible, .otp-verify-button:focus-visible, .dialog-confirm:focus-visible, .dialog-cancel:focus-visible, .reset-button:focus-visible, .otp-back:focus-visible, .resend-button:focus-visible { outline: 3px solid rgb(89 73 237 / 25%); outline-offset: 3px; }
.form-footer button:disabled, .success button:disabled, .otp-verify-button:disabled { opacity: .62; transform: none; }
.form-footer button.secondary-button, .dialog-cancel { color: #4a4853; border: 1px solid var(--line-strong); background: #fff; box-shadow: none; }
.form-footer button.secondary-button:hover, .dialog-cancel:hover { color: var(--ink); border-color: #aaa6be; background: #fff; box-shadow: none; }
.form-actions button { flex: 1; }
.form-footer button span { margin-left: 10px; color: #d9d6d6; }
.submission-status { margin: 12px 0 0; color: var(--brand-strong); font-size: 12px; font-weight: 600; }
.form-footer button.reset-button { grid-area: reset; align-self: center; width: auto; min-height: 28px; margin: 0; padding: 4px 0; color: var(--body); border: 0; background: transparent; box-shadow: none; font-size: 11px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.form-footer button.reset-button:hover { color: var(--brand); background: transparent; box-shadow: none; transform: none; }

/* The verification view inherits the exact same column and progress layout as every other step. */
.form-panel.is-verification > form { display: block; }
.form-panel.is-verification .form-footer { display: none; }
.otp-step { width: 100%; max-width: 700px; margin: 0; padding: 4px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.otp-brand { display: none; }
.otp-back { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; margin: 0 0 16px; padding: 0; color: var(--body); border: 0; background: transparent; font-size: 13px; font-weight: 600; }
.otp-back span { color: var(--ink); font-size: 19px; line-height: 1; }
.otp-back:hover { color: var(--brand); }
.otp-title { margin: 0 0 6px; color: var(--ink); font-size: 24px; font-weight: 500; letter-spacing: -.045em; line-height: 1.15; }
.otp-subtitle { margin: 0 0 16px; color: var(--body); font-size: 14px; line-height: 1.5; }
.otp-subtitle strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.mail-provider-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 18px; }
.mail-provider-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--ink); font-size: 11px; font-weight: 600; text-decoration: none; }
.mail-provider-links a:hover { color: var(--brand); }
.provider-logo { flex: 0 0 auto; width: 18px; height: 18px; }
.otp-entry { margin: 0; }
.otp-boxes { display: grid; max-width: 410px; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.otp-entry .otp-boxes .otp-digit { width: 100%; min-width: 0; height: 54px; min-height: 54px; padding: 0; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; background: #fff; box-shadow: none; font-size: 21px; font-weight: 600; letter-spacing: 0; text-align: center; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.otp-entry .otp-boxes .otp-digit:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(89 73 237 / 16%); transform: translateY(-1px); }
.otp-resend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 14px 0 0; color: var(--body); font-size: 12px; }
.resend-button { min-height: 32px; margin: 0; padding: 0; color: var(--body); border: 0; background: transparent; font-size: 12px; font-weight: 600; }
.resend-button:not(:disabled) { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.resend-button:disabled { opacity: 1; }
.otp-verify-button { width: 100%; min-height: 48px; margin-top: 16px; font-size: 14px; }
.otp-security { margin: 20px 0; padding: 0 0 20px; color: var(--body); border-bottom: 1px solid var(--line); font-size: 12px; }
.otp-support { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 0; border: 0; }
.otp-support h3 { width: 100%; margin: 0; color: var(--ink); font-size: 13px; }
.otp-support p { display: block; width: 100%; max-width: 520px; margin: 0 0 4px; color: var(--body); font-size: 11px; line-height: 1.55; }
.otp-support a { display: flex; align-items: center; gap: 7px; width: max-content; margin: 0; color: #46434f; font-size: 11px; text-decoration: none; }
.otp-support a:hover { color: var(--brand); }
.otp-support a .support-icon { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: var(--brand); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }

.success { width: 100%; max-width: 620px; padding-top: 38px; }
.form-panel.is-success .form-heading { margin-bottom: 0; }
.success-mark { display: grid; width: 52px; height: 52px; place-items: center; margin: 0 0 26px; color: #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 9px var(--brand-wash); font-size: 23px; font-weight: 800; }
.success .step { color: var(--brand); }
.success h2 { margin-bottom: 10px; }
.success button { display: block; width: 100%; max-width: 520px; margin-top: 28px; }

.confirmation-dialog, .duplicate-dialog { width: min(calc(100% - 32px), 520px); margin: auto; padding: 34px 36px 30px; color: var(--ink); border: 1px solid #ddd9ff; border-radius: 20px; background: #fff; box-shadow: 0 30px 90px rgb(29 23 60 / 22%); }
.confirmation-dialog::backdrop, .duplicate-dialog::backdrop { background: rgb(22 18 37 / 48%); backdrop-filter: blur(7px); }
.confirmation-mark, .duplicate-mark { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 24px; border-radius: 50%; font-weight: 800; }
.confirmation-mark { color: #fff; background: var(--brand); box-shadow: 0 0 0 9px var(--brand-wash); }
.duplicate-mark { color: var(--danger); border: 1px solid #f0c5cc; background: var(--danger-soft); font-size: 20px; }
.confirmation-dialog .step, .duplicate-dialog .step { margin-bottom: 8px; }
.duplicate-dialog .step { color: var(--danger); }
.confirmation-dialog h2, .duplicate-dialog h2 { margin: 0 0 12px; font-size: 29px; font-weight: 500; letter-spacing: -.05em; line-height: 1.1; }
.confirmation-dialog > p:not(.step), .duplicate-dialog > p:not(.step) { margin: 0; color: var(--body); font-size: 14px; line-height: 1.65; }
.confirmation-dialog strong { color: var(--ink); overflow-wrap: anywhere; }
.confirmation-actions { display: flex; gap: 10px; margin-top: 28px; }
.confirmation-actions button, .duplicate-dialog .dialog-cancel { min-height: 50px; padding: 0 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.dialog-cancel { min-width: 150px; }
.dialog-confirm { flex: 1; min-width: 220px; }
.dialog-confirm span { margin-left: 8px; color: #d9d6d6; }
.duplicate-dialog > p:not(.step) { margin-bottom: 26px; }
.duplicate-dialog .dialog-cancel { width: 100%; }

.intro, .communication { display: none; }

@media (max-width: 900px) {
  .form-panel { padding-right: max(24px, 10vw); padding-left: max(24px, 10vw); }
}
@media (max-width: 640px) {
  .form-panel { padding: 34px 20px 48px; }
  .form-brand { margin-bottom: 28px; }
  .form-logo { width: 103px; }
  .form-heading h1 { font-size: 31px; }
  .form-grid { grid-template-columns: 1fr; gap: 19px; }
  .contact-methods, .radio-list { grid-template-columns: 1fr; }
  .form-step[data-step="3"] .form-grid > .full { grid-column: 1 / -1; }
  .form-step[data-step="3"] .radio-list { grid-template-columns: 1fr; }
  .choices span { min-height: 42px; }
  .radio-list span { min-height: 46px; }
  .stepper { gap: 7px; margin-bottom: 28px; font-size: 11px; }
  .stepper-line { flex-basis: 16px; }
  .stepper-item { gap: 6px; }
  .stepper-item b { width: 22px; height: 22px; }
  .otp-step { padding: 4px 0 0; }
  .otp-back, .mail-provider-links a, .resend-button { min-height: 44px; }
  .otp-support { align-items: flex-start; }
  .otp-boxes { gap: 8px; }
  .otp-entry .otp-boxes .otp-digit { height: 54px; min-height: 54px; font-size: 21px; }
  .confirmation-dialog, .duplicate-dialog { padding: 28px 22px 22px; border-radius: 18px; }
  .confirmation-actions { flex-direction: column-reverse; }
  .confirmation-actions button, .dialog-cancel, .dialog-confirm { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
