:root {
  --accent-1: #8b5cf6;
  --accent-2: #22d3ee;
  --bg: #07070a;
  --text: #f7f7fb;
  --muted: #a9a9b6;
  --panel: rgba(16, 16, 24, 0.82);
  --field: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.12);
  --radius: 18px;
  --max-width: 900px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
}

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

button {
  color: inherit;
}

.background-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.background-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--accent-1) 20%, transparent), transparent 34%),
    radial-gradient(circle at 85% 12%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 30%),
    linear-gradient(rgba(0, 0, 0, var(--overlay, .72)), rgba(0, 0, 0, var(--overlay, .72)));
}

.page-shell {
  width: min(100%, calc(var(--max-width) + 48px));
  margin: 0 auto;
  padding: 34px 24px 64px;
}

.hidden {
  display: none !important;
}

.state-card,
.application-card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.state-card {
  width: min(520px, 100%);
  margin: 12vh auto 0;
  padding: 40px;
  text-align: center;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-1) 18%, transparent), color-mix(in srgb, var(--accent-2) 16%, transparent));
  font-weight: 900;
  font-size: 20px;
}

.application-card {
  overflow: hidden;
}

.application-header {
  position: relative;
  padding: 48px 48px 38px;
  border-bottom: 1px solid var(--border);
}

.application-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

.business-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 38px;
}

.business-logo {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
}

.logo-fallback {
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-1) 24%, transparent), color-mix(in srgb, var(--accent-2) 20%, transparent));
}

.business-copy {
  min-width: 0;
}

.business-name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.application-label {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 12px;
  color: color-mix(in srgb, var(--accent-2) 82%, white);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .17em;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: .98;
  letter-spacing: -.055em;
}

.subtitle {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.55;
}

.intro {
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * .7);
  background: rgba(255, 255, 255, .035);
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  font-size: 14px;
  line-height: 1.55;
}

.progress-wrap {
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, .12);
}

.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .075);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width .22s ease;
}

.application-form {
  padding: 10px 48px 46px;
}

.form-section {
  padding: 38px 0 8px;
}

.form-section + .form-section {
  border-top: 1px solid var(--border);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .85fr);
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -.035em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.field {
  min-width: 0;
}

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

.field-label,
.group-label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
}

.required-mark {
  color: color-mix(in srgb, var(--accent-2) 80%, white);
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * .62);
  outline: none;
  background: var(--field);
  color: var(--text);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.input,
.select {
  height: 50px;
  padding: 0 15px;
}

.textarea {
  min-height: 130px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.5;
}

.input::placeholder,
.textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.select option {
  color: #111;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: color-mix(in srgb, var(--accent-2) 55%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 14%, transparent);
  background: color-mix(in srgb, var(--field) 88%, white 2%);
}

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

.choice-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * .62);
  background: var(--field);
  cursor: pointer;
}

.choice-option input {
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--accent-2);
}

.choice-option span {
  font-size: 13px;
  line-height: 1.45;
}

.field-help {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.file-input {
  padding-top: 13px;
}

.consent-box {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 34px 0 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * .72);
  background: rgba(255, 255, 255, .03);
}

.consent-box input {
  margin-top: 3px;
  accent-color: var(--accent-2);
}

.consent-box span {
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  font-size: 13px;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
}

.submit-button {
  min-width: 210px;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: calc(var(--radius) * .68);
  background: linear-gradient(110deg, var(--accent-1), var(--accent-2));
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent-1) 22%, transparent);
}

.submit-button:hover {
  filter: brightness(1.08);
}

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

.mode-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.application-footer {
  padding: 18px 48px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, .14);
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.success-card {
  padding: 70px 48px;
  text-align: center;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-1) 28%, transparent), color-mix(in srgb, var(--accent-2) 24%, transparent));
  border: 1px solid var(--border);
  font-size: 26px;
  font-weight: 900;
}

.success-card h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -.045em;
}

.success-card p {
  width: min(560px, 100%);
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .page-shell {
    padding: 14px 12px 36px;
  }

  .application-header,
  .application-form {
    padding-left: 22px;
    padding-right: 22px;
  }

  .application-header {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .business-row {
    margin-bottom: 30px;
  }

  .progress-wrap,
  .application-footer {
    padding-left: 22px;
    padding-right: 22px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .field-grid,
  .choice-group {
    grid-template-columns: 1fr;
  }

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

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .submit-button {
    width: 100%;
  }
}
