:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #111113;
  --text: #f7f7f8;
  --muted: #97979f;
  --line: #34343a;
  --red: #ff214f;
  --red-dark: #d6153e;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 33, 79, 0.08), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.application {
  min-height: 100svh;
  padding: 34px 24px 24px;
}

.application-shell {
  width: min(100%, 470px);
  min-height: calc(100svh - 58px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.progress-header {
  color: #b5b5bb;
  font-size: 15px;
  font-weight: 600;
}

.progress-track {
  height: 6px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #303034;
}

.progress-track span {
  display: block;
  width: 16.666%;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
  transition: width 220ms ease;
}

#application-form {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-step {
  width: 100%;
  margin: 86px 0 0;
  padding: 0;
}

.form-step[hidden],
.success-state[hidden] {
  display: none;
}

.step-logo {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 28px;
  object-fit: cover;
}

.question {
  display: block;
  margin: 0 0 13px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  letter-spacing: 0;
}

.question-help {
  margin: -5px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.text-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
  background: rgba(5, 5, 5, 0.76);
  color: var(--text);
  padding: 0 17px;
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.text-input::placeholder {
  color: #68686f;
}

.text-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.phone-field,
.instagram-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.phone-prefix,
.instagram-field > span {
  min-width: 88px;
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  border-radius: 4px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}

.instagram-field > span {
  min-width: 58px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.choice {
  position: relative;
  cursor: pointer;
}

.choice:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(17, 17, 19, 0.84);
  color: #d6d6da;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.choice:hover span,
.choice input:focus-visible + span {
  border-color: rgba(255, 33, 79, 0.75);
}

.choice input:checked + span {
  border-color: var(--red);
  background: rgba(255, 33, 79, 0.14);
  color: var(--text);
  box-shadow: inset 4px 0 0 var(--red);
}

.field-error,
.submit-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: #ff6686;
  font-size: 12px;
}

.form-actions {
  margin-top: auto;
  padding: 22px 0 4px;
}

.next-button,
.back-button {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.next-button {
  min-height: 52px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  transition: background 160ms ease, opacity 160ms ease;
}

.next-button:hover:not(:disabled) {
  background: var(--red-dark);
}

.next-button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.back-button {
  margin-top: 15px;
  background: transparent;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.success-state {
  min-height: calc(100svh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.success-logo {
  width: 96px;
  height: 96px;
  object-fit: cover;
}

.success-kicker {
  margin: 32px 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.success-state h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.success-state > p:not(.success-kicker) {
  max-width: 620px;
  margin: 24px auto 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.success-state a {
  color: var(--text);
  font-weight: 700;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
}

@media (max-width: 640px) {
  .application {
    padding: 24px 18px;
  }

  .application-shell,
  .success-state {
    min-height: calc(100svh - 48px);
  }

  .progress-header {
    font-size: 16px;
  }

  .form-step {
    margin: auto 0;
    padding: 34px 0 22px;
  }

  .step-logo {
    width: 62px;
    height: 62px;
    margin-bottom: 24px;
  }

  .question {
    margin-bottom: 20px;
    font-size: 25px;
    text-align: center;
  }

  .question-help {
    text-align: center;
  }

  .text-input,
  .phone-prefix,
  .instagram-field > span {
    min-height: 64px;
  }

  .text-input {
    padding: 0 17px;
    font-size: 20px;
  }

  .phone-prefix {
    min-width: 82px;
    font-size: 21px;
  }

  .instagram-field > span {
    min-width: 64px;
    font-size: 22px;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .choice:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .choice span {
    min-height: 58px;
    justify-content: flex-start;
    text-align: left;
  }

  .next-button {
    min-height: 64px;
    font-size: 17px;
  }
}
