:root {
  --carolina-blue: #4b9cd3;
  --unc-navy: #13294b;
  --unc-dark: #151515;
  --unc-gray: #e1e1e1;
  --text: #172033;
  --muted: #5e6f82;
  --line: #d7e5f1;
  --surface: #ffffff;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f6f9fc;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0, #ffffff 64px, transparent 64px),
    linear-gradient(180deg, #eef6fc 0, #f7fafc 360px, #f6f9fc 100%);
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 max(28px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--unc-navy);
  font-size: 16px;
  font-weight: 800;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.hero {
  padding-bottom: 28px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--unc-navy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 720px;
  color: var(--unc-navy);
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: none;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.access-panel {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 22px 54px rgba(19, 41, 75, 0.08);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid #e6eef5;
  background: #f3f8fc;
}

.mode-tab {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--unc-navy);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.7);
}

.mode-tab.active {
  border-color: #c9dceb;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(19, 41, 75, 0.08);
}

.form {
  display: grid;
  gap: 24px;
  padding: 34px;
}

.form-pane[hidden] {
  display: none;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6eef5;
}

.section-heading.compact {
  padding-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: var(--unc-navy);
  font-size: 20px;
  letter-spacing: 0;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.required-marker {
  color: #b42318;
  font-weight: 850;
}

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

.field-grid.single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--unc-navy);
}

.field.full {
  max-width: none;
}

.field.narrow {
  max-width: 520px;
}

.field span {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
}

.spacer {
  display: block;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c7d8e8;
  border-radius: 6px;
  padding: 12px 13px;
  font: inherit;
  color: var(--text);
  background: #fbfcfd;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--carolina-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(75, 156, 211, 0.24);
}

.form.was-validated input:invalid,
.form.was-validated select:invalid,
.form.was-validated textarea:invalid {
  border-color: #c8302a;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(200, 48, 42, 0.12);
}

.form.was-validated .check input:invalid {
  outline: 2px solid rgba(200, 48, 42, 0.6);
  outline-offset: 2px;
}

.form.was-validated .check input:invalid + span {
  color: #9f1d18;
}

.terms {
  border: 1px solid #cfe1f1;
  border-radius: 6px;
  padding: 16px 18px;
  background: #f4f9fd;
  line-height: 1.5;
}

.terms strong {
  color: var(--unc-navy);
}

.terms p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.checks {
  display: grid;
  gap: 12px;
}

.check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--carolina-blue);
}

.cf-turnstile {
  min-height: 65px;
}

.actions {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 18px;
  align-items: center;
  padding-top: 4px;
}

.actions button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--unc-navy);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.actions button:hover {
  background: #0d1f3c;
}

.actions button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.message.error {
  color: #a12121;
}

.message.success {
  color: var(--unc-navy);
}

.contact-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.contact-note a {
  color: var(--unc-navy);
  font-weight: 800;
  text-decoration-color: rgba(75, 156, 211, 0.55);
  text-underline-offset: 3px;
}

@media (max-width: 840px) {
  .topbar {
    height: 58px;
    padding: 18px 20px;
  }

  .shell {
    width: min(100% - 28px, 1120px);
    padding: 24px 0 48px;
  }

  .hero {
    padding-bottom: 28px;
  }

  h1 {
    font-size: 34px;
  }

  .access-panel {
    margin-top: 22px;
  }

  .mode-tabs {
    grid-template-columns: 1fr;
  }

  .form {
    padding: 22px;
  }

  .section-heading {
    display: grid;
    gap: 8px;
  }

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

  .actions button {
    width: 100%;
  }
}
