:root {
  color-scheme: light;
  --sgp-purple: #624097;
  --sgp-purple-dark: #4f327c;
  --sgp-gold: #d5ad43;
  --surface: #f1f0f3;
  --field: #ffffff;
  --text: #1d1b20;
  --secondary: #65606d;
  --border: #d8d2df;
  --positive: #237a4b;
  --critical: #b3261e;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--sgp-purple);
  color: var(--text);
}

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

.page-shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 20px 28px;
}

.brand-header {
  display: flex;
  justify-content: center;
  padding: 12px 0 26px;
}

.brand-logo {
  display: block;
  width: min(280px, 72vw);
  height: auto;
}

.form-card {
  padding: 24px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgb(34 19 56 / 24%);
}

.form-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.form-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--sgp-purple);
  color: white;
  font-size: 20px;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.form-heading p,
.success-state p {
  margin: 7px 0 0;
  color: var(--secondary);
  line-height: 1.45;
}

.form-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.form-options a {
  display: grid;
  min-height: 44px;
  padding: 8px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--sgp-purple);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.form-options a[aria-current="page"] {
  border-color: var(--sgp-purple);
  background: var(--sgp-purple);
  color: white;
}

form {
  display: grid;
  gap: 8px;
}

label {
  margin-top: 8px;
  font-size: 0.93rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 132px;
  padding: 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sgp-purple);
  box-shadow: 0 0 0 3px rgb(98 64 151 / 18%);
}

#property-fields {
  display: contents;
}

#property-fields[hidden] {
  display: none;
}

#submit-button,
.secondary-action {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--sgp-purple);
  color: white;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

#submit-button:hover,
#submit-button:focus-visible {
  background: var(--sgp-purple-dark);
}

#submit-button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.consent-copy {
  margin: 8px 0 0;
  color: var(--secondary);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.form-error {
  margin: 10px 0 0;
  color: var(--critical);
  font-size: 0.9rem;
  font-weight: 600;
}

.success-state {
  padding: 24px 0 8px;
  text-align: center;
}

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

.secondary-action {
  margin-top: 24px;
  background: white;
  color: var(--sgp-purple);
  border: 1px solid var(--border);
}

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

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 22px 0 0;
  color: rgb(255 255 255 / 78%);
  font-size: 0.78rem;
}

footer a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .page-shell {
    padding: 22px 14px 24px;
  }

  .form-card {
    padding: 20px 16px;
  }

  .form-options {
    grid-template-columns: 1fr;
  }

  .form-options a {
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #submit-button,
  .form-options a {
    transition: background-color 150ms ease, border-color 150ms ease;
  }
}
