:root {
  --purple: #3b1f86;
  --purple-2: #5535b6;
  --purple-3: #6a47cf;
  --blue: #78d8f5;
  --ice: #d9f7ff;
  --lavender: #eee8ff;
  --ink: #160b46;
  --text: #263f59;
  --muted: #52677b;
  --lime: #e5ff39;
  --lime-hover: #d8f42f;
  --warm: #ff8d4d;
  --danger: #a32f36;
  --danger-bg: #fff0f1;
  --line: rgba(59, 31, 134, 0.18);
  --line-strong: rgba(59, 31, 134, 0.34);
  --surface: rgba(255, 255, 255, 0.94);
  --shadow: 0 18px 54px rgba(22, 11, 70, 0.12);
  --radius: 18px;
  --content: min(900px, calc(100vw - 40px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--ice);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, var(--ice) 0%, var(--lavender) 58%, #e2f9ff 100%);
  font-family: "Manrope", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--purple);
  text-underline-offset: 0.2em;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: "Bricolage Grotesque", "Manrope", Arial, sans-serif;
  text-wrap: balance;
}

.welcome {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(28px, 6vw, 72px) 20px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(120, 216, 245, 0.36), transparent 28%),
    radial-gradient(circle at 18% 84%, rgba(229, 255, 57, 0.13), transparent 26%),
    linear-gradient(115deg, var(--purple) 0%, var(--purple-2) 58%, #4a65bc 140%);
}

.welcome__inner {
  width: min(760px, 100%);
  text-align: center;
}

.welcome__logo {
  width: min(330px, 78vw);
  margin: 0 auto 18px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--purple-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.welcome .eyebrow {
  color: var(--lime);
}

.welcome h1 {
  max-width: 740px;
  margin: 12px auto 18px;
  color: #fff;
  font-size: clamp(2.35rem, 7vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.welcome__lead {
  max-width: 650px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  line-height: 1.72;
  text-wrap: pretty;
}

.welcome__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 30px;
}

.welcome__facts span {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
}

.welcome__pdf {
  display: block;
  width: fit-content;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.88rem;
}

.welcome__pdf:hover {
  color: #fff;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.button--large {
  min-height: 54px;
  padding-inline: 34px;
  font-size: 1rem;
}

.button--primary {
  border-color: rgba(22, 11, 70, 0.14);
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 10px 22px rgba(22, 11, 70, 0.13);
}

.button--primary:hover {
  background: var(--lime-hover);
}

.button--secondary {
  border-color: var(--line-strong);
  color: var(--purple);
  background: rgba(255, 255, 255, 0.72);
}

.button--secondary:hover {
  border-color: var(--purple-2);
  color: var(--ink);
  background: var(--lavender);
}

.form-app {
  min-height: 100vh;
  padding: clamp(22px, 5vw, 46px) 0 50px;
}

.form-brand {
  display: grid;
  width: var(--content);
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin: 0 auto 26px;
  padding: 18px 24px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(115deg, var(--purple) 0%, var(--purple-2) 64%, #566fc1 130%);
  box-shadow: var(--shadow);
}

.form-brand a {
  display: block;
  border-radius: 8px;
}

.form-brand img {
  width: 100%;
}

.form-brand p {
  margin: 0 0 4px;
  color: var(--lime);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.form-brand h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
}

.progress {
  width: var(--content);
  margin: 0 auto 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.progress::-webkit-scrollbar {
  display: none;
}

.progress ol {
  display: flex;
  width: max-content;
  min-width: 100%;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 2px;
  list-style: none;
}

.progress button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.progress button span {
  color: var(--purple-2);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.progress button[aria-current="step"] {
  border-color: var(--purple-2);
  color: var(--ink);
  background: var(--lavender);
}

.progress button[data-complete="true"] {
  border-color: rgba(59, 31, 134, 0.27);
  color: var(--purple);
  background: rgba(217, 247, 255, 0.9);
}

.progress button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.form-alert {
  width: var(--content);
  margin: 0 auto 18px;
  padding: 13px 16px;
  border: 1px solid rgba(163, 47, 54, 0.38);
  border-radius: 10px;
  color: #76252b;
  background: var(--danger-bg);
  font-size: 0.92rem;
  font-weight: 700;
}

.step-card,
.success-card {
  width: var(--content);
  margin: 0 auto;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-card h2,
.success-card h2 {
  margin: 8px 0 10px;
  font-size: clamp(1.8rem, 4.6vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.step-card h2:focus,
.success-card h2:focus {
  outline: none;
}

.section-intro {
  max-width: 70ch;
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.72;
}

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

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 800;
}

.field label > span:not(.optional) {
  color: var(--danger);
}

.optional {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(59, 31, 134, 0.27);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
}

.field input::placeholder {
  color: #667a8e;
  opacity: 1;
}

.field input[readonly] {
  color: var(--muted);
  background: #f5f3fb;
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(163, 47, 54, 0.11);
}

.field-error {
  min-height: 0;
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
}

.field-error:empty {
  display: none;
}

.privacy-note {
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid rgba(85, 53, 182, 0.2);
  border-radius: 12px;
  color: var(--text);
  background: #f7f5ff;
}

.privacy-note strong {
  color: var(--ink);
}

.privacy-note p {
  margin: 4px 0 0;
  font-size: 0.88rem;
}

.warning-banner {
  margin: 22px 0 24px;
  padding: 15px 17px;
  border-left: 4px solid var(--warm);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
  background: #fff4ec;
}

.legal-copy {
  color: #253b52;
  font-size: 0.95rem;
  line-height: 1.72;
}

.legal-copy h3 {
  margin: 28px 0 8px;
  font-size: 1.28rem;
}

.legal-list,
.legal-sublist {
  padding-left: 1.55rem;
}

.legal-list {
  margin: 0;
}

.legal-list > li {
  padding-left: 0.35rem;
  margin-bottom: 20px;
}

.legal-list > li::marker {
  color: var(--purple-2);
  font-weight: 800;
}

.legal-sublist {
  margin: 9px 0 0;
}

.legal-sublist > li {
  padding-left: 0.25rem;
  margin-bottom: 5px;
}

.acknowledgement,
.consent-box {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
}

.acknowledgement:hover,
.consent-box:hover {
  border-color: var(--purple-2);
  background: #faf9ff;
}

.acknowledgement:has(input:checked),
.consent-box:has(input:checked) {
  border-color: var(--purple-2);
  background: var(--lavender);
}

.acknowledgement input,
.consent-box input {
  width: 21px;
  height: 21px;
  margin: 2px 0 0;
  accent-color: var(--purple-2);
}

.acknowledgement span,
.consent-box span {
  min-width: 0;
}

.acknowledgement strong,
.consent-box strong {
  color: var(--ink);
}

.acknowledgement small {
  display: block;
  margin-top: 3px;
  color: var(--purple-2);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signature-group {
  margin: 24px 0 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.signature-group legend {
  padding: 0 8px;
  color: var(--ink);
  font-family: "Bricolage Grotesque", "Manrope", Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.signature-field input {
  font-family: "Bricolage Grotesque", "Manrope", Arial, sans-serif;
  font-size: 1.1rem;
  font-style: italic;
}

.minor-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--purple);
  font-size: 0.86rem;
  font-weight: 800;
}

.minor-notice > span {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--purple-3);
  box-shadow: 0 0 0 5px rgba(85, 53, 182, 0.12);
}

.review-list,
.success-details {
  display: grid;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.review-list > div,
.success-details > div {
  display: grid;
  grid-template-columns: minmax(145px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.review-list > div:last-child,
.success-details > div:last-child {
  border-bottom: 0;
}

.review-list dt,
.success-details dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.review-list dd,
.success-details dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.review-agreement {
  padding: 20px 22px;
  border-radius: 14px;
  color: var(--text);
  background: #f7f5ff;
}

.review-agreement h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.review-agreement ul {
  margin: 0;
  padding-left: 1.25rem;
}

.review-agreement li {
  margin-bottom: 5px;
}

.consent-box--final {
  border-width: 2px;
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: grid;
  width: var(--content);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 24px auto 0;
}

.form-actions .button:first-child {
  justify-self: start;
}

.form-actions .button:last-child,
.form-actions .submit-button {
  justify-self: end;
}

.form-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(22, 11, 70, 0.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.submit-button.is-loading .spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.success-card {
  text-align: center;
}

.success-mark {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  place-items: center;
  border: 2px solid var(--purple-2);
  border-radius: 50%;
  color: var(--purple-2);
  background: var(--lavender);
  font-size: 2rem;
  font-weight: 800;
}

.success-card > p:not(.section-kicker) {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
}

.success-details {
  max-width: 620px;
  margin-inline: auto;
  text-align: left;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.site-footer {
  display: grid;
  width: var(--content);
  grid-template-columns: 1fr auto;
  gap: 14px 26px;
  margin: 34px auto 0;
  padding: 24px 4px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer > div {
  display: flex;
  flex-direction: column;
}

.site-footer > div:nth-child(2) {
  text-align: right;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer a {
  font-weight: 700;
}

.site-footer p {
  grid-column: 1 / -1;
  margin: 0;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.field input:focus-visible {
  border-color: var(--purple-2);
  box-shadow: 0 0 0 3px rgba(85, 53, 182, 0.16);
  outline-color: transparent;
}

@media (max-width: 760px) {
  :root {
    --content: min(100% - 24px, 900px);
  }

  .welcome {
    padding-inline: 16px;
  }

  .welcome__facts {
    margin-block: 22px 26px;
  }

  .form-app {
    padding-top: 18px;
  }

  .form-brand {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 15px;
    padding: 15px 17px;
  }

  .progress ol {
    justify-content: flex-start;
  }

  .step-card,
  .success-card {
    padding: 25px 20px;
    border-radius: 14px;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 19px;
  }

  .field--wide {
    grid-column: auto;
  }

  .field input,
  .field textarea,
  .field select {
    font-size: 16px;
  }

  .signature-group {
    padding: 20px 16px;
  }

  .form-actions {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .form-actions p {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .form-actions .button:first-child {
    grid-column: 1;
    grid-row: 2;
  }

  .form-actions .button:last-child,
  .form-actions .submit-button {
    grid-column: 2;
    grid-row: 2;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer > div:nth-child(2) {
    text-align: left;
  }
}

@media (max-width: 470px) {
  .welcome h1 {
    font-size: clamp(2.05rem, 12vw, 2.9rem);
  }

  .welcome__facts {
    gap: 7px;
  }

  .welcome__facts span {
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  .form-brand {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .form-brand a {
    width: 170px;
    margin: 0 auto;
  }

  .legal-copy {
    font-size: 0.9rem;
  }

  .legal-list,
  .legal-sublist {
    padding-left: 1.25rem;
  }

  .acknowledgement,
  .consent-box {
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 14px;
  }

  .review-list > div,
  .success-details > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .form-actions .button {
    width: 100%;
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  body {
    color: #111;
    background: #fff;
  }

  .skip-link,
  .welcome,
  .progress,
  .form-alert,
  .form-actions,
  .success-actions {
    display: none !important;
  }

  .form-app,
  .success-card,
  .site-footer {
    display: block !important;
  }

  .form-app {
    padding: 0;
  }

  .form-brand,
  .step-card,
  .success-card {
    width: 100%;
    box-shadow: none;
  }

  .form-brand {
    margin-bottom: 18px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .step-card {
    display: block !important;
    margin: 0 0 16px;
    padding: 22px;
    break-inside: avoid;
  }

  .legal-card {
    break-inside: auto;
  }

  .legal-copy,
  .legal-list > li,
  .signature-group,
  .acknowledgement {
    break-inside: avoid;
  }

  .success-card[hidden] {
    display: none !important;
  }

  .site-footer {
    width: 100%;
  }
}
