:root {
  color-scheme: light;
  --background: #eef2f7;
  --surface: #ffffff;
  --text: #182230;
  --muted: #5d6b7d;
  --border: #d7dee8;
  --primary: #185adb;
  --primary-hover: #1048b6;
  --success: #18794e;
  --success-bg: #ecfdf3;
  --error: #b42318;
  --error-bg: #fff1f0;
  --focus: rgba(24, 90, 219, 0.25);
  --section-heading-size: clamp(1.25rem, 3vw, 1.55rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(24, 90, 219, 0.10), transparent 34rem),
    var(--background);
  color: var(--text);
}

button,
input,
select { font: inherit; }

.page-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 16px;
}

.card {
  width: min(980px, 100%);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid rgba(215, 222, 232, 0.85);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(21, 38, 67, 0.12);
}

.heading-group {
  margin-bottom: 30px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--primary);
  font-size: var(--section-heading-size);
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  margin-bottom: 14px;
  font-size: var(--section-heading-size);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.intro {
  color: var(--muted);
  line-height: 1.65;
}

.form-section {
  position: relative;
  min-width: 0;
  margin: 0 0 34px;
  padding: 0 0 34px;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 -1px 0 #e8edf4;
}

.form-section legend,
.section-title {
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: var(--section-heading-size);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.form-section legend {
  display: block;
  margin-bottom: 24px;
}

.form-section legend::after,
.section-title::after {
  display: block;
  width: 54px;
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
}

.section-heading-row .section-title {
  flex: 1 1 auto;
}


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

.field-full { grid-column: 1 / -1; }

.field {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field select {
  cursor: pointer;
  line-height: normal;
  border-radius: 11px;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus);
}

.checkbox-field {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.checkbox-field span {
  white-space: nowrap;
}

.checkbox-field input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

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

.button-row {
  display: flex;
  margin-top: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--primary-hover);
}

.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.button:disabled,
.field input:disabled,
.field select:disabled,
.checkbox-field input:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.results {
  margin-top: 26px;
  padding: 22px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f6f9ff, #eef4ff);
  box-shadow: 0 12px 30px rgba(24, 90, 219, 0.08);
}

.results h2 {
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.status {
  min-height: 24px;
  margin-top: 18px;
  padding: 0;
  color: var(--muted);
  line-height: 1.5;
}

.status:not(:empty) {
  padding: 12px 14px;
  border-radius: 11px;
}

.status-info:not(:empty) {
  background: #eef4ff;
  color: #174ea6;
}

.status-success:not(:empty) {
  background: var(--success-bg);
  color: var(--success);
}

.status-error:not(:empty) {
  background: var(--error-bg);
  color: var(--error);
}

@media (max-width: 700px) {
  .field-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
  }

  .button-row,
  .button { width: 100%; }
}
