:root {
  color-scheme: light;
  --page: #f9fafb;
  --surface: #ffffff;
  --text: #1b1f23;
  --muted: #50657c;
  --border: #d0dae0;
  --field-border: #637e9c;
  --blue: #006dc0;
  --error: #e33b4e;
  --radius-card: 16px;
  --radius-control: 4px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: "AmericanSans Var", "American Sans";
  font-size: 16px;
  line-height: 1.5;
}
h1 {
    margin: 0;
    font-size: 32px;
	font-family: "AmericanSans Var";
    font-weight: 700;
    line-height: 40px;
	color: #1B1F23;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  padding: 32px;
}

.content-column {
  width: min(100%, 1184px);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.form-card,
.terms-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.form-card {
  display: grid;
  gap: 24px;
  padding: 32px;
}

.form-heading {
  display: grid;
  gap: 8px;
}

h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
}

.intro {
  margin: 0;
  line-height: 24px;
}

a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: #00579a;
}

.required-legend,
.field-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.required-legend {
  width: fit-content;
  font-size: 14px;
  line-height: 20px;
}

.required-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--error);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.field-label {
  width: fit-content;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.field-label::before {
  display: none;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: "!";
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-control);
  color: var(--text);
  background: var(--surface);
}

.field input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.field.has-error .field-label {
  color: #c30019;
}

.field.has-error .field-label::before {
  display: inline-flex;
}

.field.has-error input {
  border-color: #c30019;
}

.field-error {
  margin: -4px 0 0;
  color: #c30019;
  font-size: 12px;
  line-height: 16px;
}

.field-error[hidden] {
  display: none;
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 16px 8px 8px;
  border-radius: var(--radius-control);
  color: var(--text);
  background: #ffe2e6;
}

.form-alert[hidden] {
  display: none;
}

.form-alert-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 2px solid #c30019;
  border-radius: 50%;
  color: #c30019;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.form-alert p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.terms-card {
  display: grid;
  gap: 32px;
  padding: 32px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 24px;
  cursor: pointer;
}

.consent-label input {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  margin: 0;
  accent-color: var(--blue);
}

.consent-label input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

.submit-button {
  width: 285px;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-control);
  color: #ffffff;
  background: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.submit-button:hover {
  background: #00579a;
}

.submit-button:disabled,
.submit-button:disabled:hover {
  background: var(--muted);
  cursor: not-allowed;
}

.submit-button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

@media (max-width: 760px) {
  .page-shell {
    padding: 24px;
  }

  .form-card,
  .terms-card {
    padding: 24px;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 16px;
  }

  .form-card,
  .terms-card {
    padding: 20px;
  }

  h1 {
    font-size: 26px;
    line-height: 34px;
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .submit-button {
    width: 100%;
  }

  .form-status {
    text-align: left;
  }
}
