:root {
  color-scheme: light;
  --navy: #0b2c55;
  --navy-deep: #071f3e;
  --red: #df2b2f;
  --blue: #1768ac;
  --ink: #15233a;
  --muted: #59677a;
  --line: #d8e0ea;
  --surface: #ffffff;
  --page: #f2f5f8;
  --error: #a51d24;
  --success: #16734a;
}

* {
  box-sizing: border-box;
}

html {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.5;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: var(--blue);
}

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

.site-header {
  background: var(--surface);
  border-bottom: 4px solid var(--red);
  padding: 16px max(20px, calc((100vw - 1080px) / 2));
}

.brand {
  align-items: center;
  color: var(--navy);
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  color: var(--red);
  font-size: 1.45rem;
  font-style: italic;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
}

.page-shell,
.form-shell,
.message-shell {
  margin: 0 auto;
  max-width: 1080px;
  padding: 40px 20px 64px;
}

.form-shell {
  max-width: 820px;
}

.message-shell {
  background: var(--surface);
  border-top: 5px solid var(--red);
  margin-top: 64px;
  max-width: 680px;
  padding: 44px;
  text-align: center;
}

.intro,
.form-heading {
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  color: var(--navy-deep);
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
  margin: 0 0 16px;
}

h2 {
  color: var(--navy-deep);
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 4px 0 10px;
}

.job-list {
  display: grid;
  gap: 14px;
}

.job-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--navy);
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr auto;
  padding: 24px;
}

.job-meta,
.pay,
.field-help,
.privacy-note {
  color: var(--muted);
}

.job-meta,
.pay {
  margin: 0;
}

.primary-button {
  align-items: center;
  background: var(--blue);
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  text-align: center;
  text-decoration: none;
}

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

.primary-button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #f0b429;
  outline-offset: 2px;
}

.steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 36px;
}

.steps span {
  align-items: center;
  background: #e3e9f0;
  color: var(--muted);
  display: flex;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
}

.steps b,
.question-number {
  align-items: center;
  background: var(--muted);
  color: #fff;
  display: inline-flex;
  height: 25px;
  justify-content: center;
  min-width: 25px;
}

.steps .active {
  background: #dbeaf7;
  color: var(--navy);
}

.steps .active b,
.question-number {
  background: var(--red);
}

.back-link {
  display: inline-block;
  font-weight: 700;
  margin-bottom: 22px;
}

.application-form,
.questionnaire-form {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  color: var(--navy-deep);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
}

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

.field {
  margin: 20px 0;
}

.field label,
.question legend {
  display: block;
  font-weight: 750;
}

.field label span,
.question legend small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 6px;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
textarea {
  background: #fff;
  border: 2px solid #9ca9b9;
  border-radius: 3px;
  color: var(--ink);
  display: block;
  margin-top: 7px;
  min-height: 48px;
  padding: 11px 12px;
  width: 100%;
}

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

[aria-invalid="true"] {
  border-color: var(--error) !important;
}

.check-field,
.choice {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.check-field {
  background: #f6f8fa;
  border: 1px solid var(--line);
  margin-top: 24px;
  padding: 16px;
}

.check-field input,
.choice input {
  flex: 0 0 auto;
  height: 20px;
  margin-top: 2px;
  width: 20px;
}

.field-error {
  color: var(--error);
  font-weight: 750;
  margin: 6px 0 0;
}

.alert {
  background: #fff1f1;
  border-left: 5px solid var(--error);
  color: #721c24;
  font-weight: 750;
  margin-bottom: 20px;
  padding: 14px 16px;
}

.submit-button {
  margin-top: 28px;
  width: 100%;
}

.privacy-note {
  font-size: 0.9rem;
  margin: 14px 0 0;
}

.questionnaire-form {
  display: grid;
  gap: 16px;
}

.question {
  border-bottom: 1px solid var(--line);
  padding: 12px 0 26px;
}

.question legend {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  line-height: 1.35;
  width: 100%;
}

.choice-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.choice {
  background: #f6f8fa;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 12px;
}

.success-mark {
  align-items: center;
  background: var(--success);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 2rem;
  font-weight: 900;
  height: 64px;
  justify-content: center;
  margin-bottom: 20px;
  width: 64px;
}

.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 30px;
}

@media (max-width: 680px) {
  .site-header {
    padding: 14px 16px;
  }

  .page-shell,
  .form-shell,
  .message-shell {
    padding: 24px 14px 44px;
  }

  .message-shell {
    margin: 24px 14px;
  }

  .job-card,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .job-card .primary-button {
    width: 100%;
  }

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

  .steps span {
    display: none;
  }

  .steps .active {
    display: flex;
  }

  .application-form,
  .questionnaire-form {
    padding: 20px 16px;
  }
}
