:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --text: #161b22;
  --text-strong: #0f172a;
  --muted: #667085;
  --line: #e6e9ef;
  --soft-line: #f1f3f6;
  --accent: #f26a00;
  --accent-dark: #c94f00;
  --accent-soft: #fff3e8;
  --control: #f3f5f8;
  --danger: #b42318;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 4%, rgba(242, 106, 0, .07), transparent 30rem),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

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

a {
  color: #9a3412;
  text-underline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.candidate-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 56px;
  display: grid;
  grid-template-columns: minmax(380px, 440px) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: start;
}

.candidate-intro {
  position: sticky;
  top: 34px;
  min-width: 0;
}

.candidate-logo {
  display: inline-flex;
  width: 132px;
  margin-bottom: clamp(42px, 7vw, 78px);
}

.candidate-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.intro-copy {
  max-width: 440px;
}

.intro-label {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.intro-copy h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(36px, 3.7vw, 50px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.intro-copy h1 span {
  display: block;
  white-space: nowrap;
}

.intro-copy > p:last-child {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.progress-card {
  max-width: 340px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.progress-copy strong {
  color: var(--text-strong);
  font-size: 14px;
}

.progress-track {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebf0;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .28s ease;
}

.progress-card p {
  margin: 10px 0 0;
  color: #7b8492;
  font-size: 12px;
  line-height: 1.4;
}

.candidate-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .07);
}

.form-flash {
  display: none;
  margin: 24px 30px 0;
  padding: 13px 15px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.4;
}

.form-flash:not(:empty) {
  display: block;
}

.question-section {
  padding: 28px 30px 30px;
  border-bottom: 1px solid var(--soft-line);
}

.section-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 20px;
}

.section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
}

.section-heading h2 {
  margin: 1px 0 0;
  color: var(--text-strong);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.018em;
}

.section-heading p {
  max-width: 58ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.identity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(105px, .55fr) minmax(140px, .8fr);
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  color: #303948;
  font-size: 14px;
  font-weight: 680;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  padding: 13px 14px;
  background: #f9fafb;
  color: var(--text);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field textarea {
  min-height: 124px;
  resize: vertical;
  line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #667085;
}

.field input:hover,
.field textarea:hover {
  border-color: #c9d0db;
  background: #fff;
}

.field input:focus,
.field textarea:focus {
  border-color: #f59a4b;
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #f04438;
  box-shadow: 0 0 0 3px #fff1f0;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 450;
}

.field-error,
.group-error {
  min-height: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 550;
}

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

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

.choice-group > legend,
.compact-group > legend {
  margin: 0 0 10px;
  padding: 0;
  color: #303948;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 680;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-grid-occupations {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card-wide {
  grid-column: 1 / -1;
}

.choice-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-card span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 50px;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  background: var(--control);
  color: #414b5a;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
  transition: transform .14s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.choice-card:hover span {
  border-color: #c9d0db;
  background: #eef1f5;
}

.choice-card input:focus-visible + span {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
  border-color: #f59a4b;
}

.choice-card input:checked + span {
  border-color: #f59a4b;
  background: var(--accent-soft);
  color: #9a3412;
  box-shadow: inset 0 0 0 1px rgba(242, 106, 0, .14);
}

.choice-card:active span {
  transform: translateY(1px);
}

.choice-group.is-invalid .choice-card span {
  border-color: #fda29b;
}

.group-error {
  display: block;
  margin-top: 8px;
}

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

.sheets-group {
  margin-top: 22px;
}

.contact-method-group {
  margin-top: 22px;
}

.conditional-date {
  max-width: 280px;
  margin-top: 16px;
}

.conditional-date[hidden] {
  display: none;
}

.form-footer {
  padding: 26px 30px 30px;
}

.consent-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  color: #5f6875;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}

.consent-row input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--accent);
}

.consent-row input:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.consent-error {
  display: block;
  margin: 8px 0 0 31px;
}

.submit-button {
  width: 100%;
  min-height: 52px;
  margin-top: 22px;
  border: 1px solid var(--text-strong);
  border-radius: 12px;
  background: var(--text-strong);
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .13);
  transition: transform .14s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.submit-button:hover {
  border-color: #273244;
  background: #273244;
}

.submit-button:focus-visible {
  outline: 4px solid var(--accent-soft);
  outline-offset: 3px;
}

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

.submit-button[aria-busy="true"] {
  cursor: wait;
  opacity: .76;
}

.success-state {
  min-height: 540px;
  padding: clamp(48px, 8vw, 90px) 30px;
  display: grid;
  align-content: center;
  justify-items: start;
}

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

.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 28px;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  font-size: 24px;
  font-weight: 900;
}

.success-state h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1;
  letter-spacing: -.04em;
}

.success-state > p:last-child {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .candidate-shell {
    width: min(760px, calc(100% - 36px));
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 24px;
  }

  .candidate-intro {
    position: static;
  }

  .candidate-logo {
    margin-bottom: 34px;
  }

  .intro-copy,
  .progress-card {
    max-width: 620px;
  }

  .intro-copy h1 {
    max-width: 680px;
    font-size: clamp(36px, 6vw, 50px);
  }
}

@media (max-width: 700px) {
  .candidate-shell {
    width: min(100%, calc(100% - 24px));
    padding: 18px 0 34px;
  }

  .candidate-logo {
    width: 112px;
    margin-bottom: 26px;
  }

  .intro-copy h1 {
    font-size: clamp(30px, 8.5vw, 34px);
    line-height: 1.02;
  }

  .intro-copy > p:last-child {
    margin-top: 14px;
    font-size: 15px;
  }

  .progress-card {
    margin-top: 24px;
    padding-top: 16px;
  }

  .candidate-panel {
    border-radius: 16px;
  }

  .form-flash {
    margin: 18px 18px 0;
  }

  .question-section,
  .form-footer {
    padding: 24px 18px;
  }

  .section-heading {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 11px;
    margin-bottom: 17px;
  }

  .section-index {
    width: 30px;
    height: 30px;
  }

  .section-heading h2 {
    font-size: 19px;
  }

  .identity-grid,
  .setup-grid {
    grid-template-columns: 1fr;
  }

  .choice-grid-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setup-grid {
    gap: 22px;
  }

  .success-state {
    min-height: 420px;
    padding: 50px 20px;
  }
}

@media (max-width: 340px) {
  .intro-copy h1 {
    font-size: 28px;
  }

  .choice-grid-two,
  .choice-grid-four,
  .choice-grid-occupations {
    grid-template-columns: 1fr;
  }

  .choice-card-wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
