:root {
  --ivory: #FFFFF0;
  --gunmetal: #1F262A;
  --light-gunmetal: #5B676D;
  --champagne: #C89A65;
  --surface: #242C30;
  --surface-2: #293236;
  --surface-3: #313B3F;
  --line: rgba(200, 154, 101, 0.38);
  --soft-line: rgba(255, 255, 240, 0.10);
  --muted: rgba(255, 255, 240, 0.64);
  --faint: rgba(255, 255, 240, 0.42);
  --success: #9DC6A8;
  --error: #D69B9B;
  --radius-lg: 24px;
  --radius-md: 15px;
  --radius-sm: 11px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ivory);
  background: var(--gunmetal);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.page-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 28px;
}

.site-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--soft-line);
}

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

.brand-logo {
  display: block;
  width: auto;
  height: 58px;
  max-width: 280px;
  object-fit: contain;
}

.brand-text {
  display: none;
}

.brand-logo {
  height: 46px;
  max-width: 220px;
}

.track {
  color: var(--champagne);
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.secure-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--champagne);
}

main {
  padding-bottom: 64px;
}

.intro {
  max-width: 780px;
  margin: 0 auto;
  padding: 38px 0 28px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--champagne);
  font-size: 0.7rem;
  line-height: 1.4;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.intro h1 {
  margin: 0;
  font-size: clamp(2rem, 3.3vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.intro > p:last-child {
  max-width: 680px;
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 1.65;
}

.registration-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-column {
  min-width: 0;
  padding: clamp(24px, 4vw, 52px);
}

.stepper {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 46px;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: default;
  text-align: left;
}

.step-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 240, 0.25);
  border-radius: 50%;
  font-weight: 700;
}

.step-label {
  font-size: 0.76rem;
  white-space: nowrap;
}

.step-line {
  height: 1px;
  background: rgba(255, 255, 240, 0.16);
}

.step.is-active {
  color: var(--champagne);
}

.step.is-active .step-number {
  border-color: var(--champagne);
}

.step.is-complete {
  color: var(--ivory);
}

.step.is-complete .step-number {
  border-color: var(--champagne);
  background: rgba(200, 154, 101, 0.12);
  color: var(--champagne);
}

.form-step {
  display: none;
}

.form-step.is-active {
  display: block;
  animation: step-in 180ms ease;
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--soft-line);
}

.section-heading h2,
.success-panel h2,
.next-panel h2,
.policy-dialog h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.7vw, 2.35rem);
  letter-spacing: -0.025em;
}

.section-heading > p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.field-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

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

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

label,
legend {
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

label span,
legend span {
  color: var(--champagne);
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 240, 0.14);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ivory);
  outline: none;
  padding: 13px 14px;
  transition: border-color 150ms ease, background 150ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 240, 0.30);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ivory);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset;
  caret-color: var(--ivory);
  border-color: rgba(255, 255, 240, 0.14);
  transition: background-color 9999s ease-out 0s;
}

input[type="date"] {
  color-scheme: dark;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--champagne);
  background: var(--surface-3);
}

input:disabled {
  opacity: 0.55;
}

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

.field small {
  justify-self: end;
  color: var(--faint);
  font-size: 0.66rem;
}

.inline-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  cursor: pointer;
}

.inline-option input,
.consent-row input,
.service-card input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--champagne);
}

.choice-group {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin-bottom: 10px;
}

.registration-type-group {
  margin: 0;
}

.registration-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.registration-type-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 240, 0.14);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 11px 13px;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.registration-type-option:hover {
  border-color: var(--line);
}

.registration-type-option:has(input:checked) {
  border-color: var(--champagne);
  background: rgba(200, 154, 101, 0.08);
}

.registration-type-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--champagne);
}

.registration-type-option span {
  color: var(--ivory);
  font-size: 0.76rem;
  font-weight: 600;
}

#family-relationship-field {
  margin-bottom: 18px;
}

.medical-choice-group {
  margin-bottom: 18px;
}

.medical-choice-group .registration-type-options {
  max-width: 360px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  position: relative;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  border: 1px solid rgba(255, 255, 240, 0.14);
  border-radius: 13px;
  background: var(--surface-2);
  padding: 13px;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease;
}

.service-card:hover {
  border-color: var(--line);
  transform: translateY(-1px);
}

.service-card input {
  position: absolute;
  top: 12px;
  right: 12px;
}

.service-card:has(input:checked) {
  border-color: var(--champagne);
  background: rgba(200, 154, 101, 0.08);
}

.service-code {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--champagne);
  font-size: 0.68rem;
  font-weight: 700;
}

.service-card strong {
  color: var(--ivory);
  font-size: 0.74rem;
}

.service-card small {
  color: var(--faint);
  font-size: 0.61rem;
  line-height: 1.4;
}

.review-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 14px;
  background: var(--soft-line);
}

.review-card > div {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px;
  background: var(--surface-2);
}

.review-card span {
  color: var(--faint);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.review-card strong {
  font-size: 0.82rem;
  line-height: 1.45;
}

.consent-list {
  display: grid;
  gap: 12px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 13px;
  background: var(--surface-2);
  padding: 14px;
  line-height: 1.55;
  cursor: pointer;
}

.consent-row.optional {
  border-style: dashed;
}

.consent-row input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.consent-row strong {
  color: var(--champagne);
}

.final-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px;
  border-left: 2px solid var(--champagne);
  background: rgba(200, 154, 101, 0.07);
}

.final-note > span,
.review-notice > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--champagne);
  border-radius: 50%;
  color: var(--champagne);
  font-weight: 700;
  font-family: Georgia, serif;
}

.final-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.form-feedback {
  display: none;
  margin-top: 18px;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.75rem;
  line-height: 1.5;
}

.form-feedback.is-visible {
  display: block;
}

.form-feedback.error {
  color: var(--error);
  border: 1px solid rgba(214, 155, 155, 0.35);
  background: rgba(214, 155, 155, 0.08);
}

.form-feedback.success {
  color: var(--success);
  border: 1px solid rgba(157, 198, 168, 0.35);
  background: rgba(157, 198, 168, 0.08);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 11px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

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

.button.primary {
  border: 1px solid var(--champagne);
  background: var(--champagne);
  color: var(--gunmetal);
}

.button.secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ivory);
}

.button.text-button {
  border: 0;
  background: transparent;
  color: var(--champagne);
  text-decoration: underline;
  text-underline-offset: 4px;
}

#next-button,
#submit-button {
  min-width: 190px;
  margin-left: auto;
}

#back-button {
  display: none;
}

#submit-button {
  display: none;
}

.security-note {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--soft-line);
}

.shield {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.shield img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.security-note > div {
  display: grid;
  gap: 4px;
}

.security-note strong {
  font-size: 0.75rem;
}

.security-note small {
  max-width: 520px;
  color: var(--faint);
  font-size: 0.65rem;
  line-height: 1.5;
}

.next-panel {
  min-width: 0;
  border-left: 1px solid var(--soft-line);
  background: #22292D;
  padding: 54px 34px;
}

.next-panel-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border: 1px solid var(--champagne);
  border-radius: 50%;
}

.next-panel-icon img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.next-panel h2 {
  color: var(--champagne);
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.65rem;
}

.next-list {
  display: grid;
  gap: 0;
  margin: 38px 0;
  padding: 0;
  list-style: none;
}

.next-list li {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 13px;
  padding-bottom: 31px;
}

.next-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 38px;
  bottom: 0;
  left: 18px;
  border-left: 1px dashed rgba(255, 255, 240, 0.22);
}

.next-list li > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--champagne);
  font-size: 0.72rem;
  font-weight: 700;
}

.next-list strong {
  font-size: 0.75rem;
}

.next-list p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.55;
}

.review-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 24px;
  border: 1px solid var(--soft-line);
  border-radius: 13px;
  padding: 16px;
}

.review-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.65;
}

.privacy-contact {
  margin: 22px 0 0;
  color: var(--faint);
  font-size: 0.65rem;
  line-height: 1.6;
  text-align: center;
}

.success-panel {
  display: none;
  max-width: 680px;
  margin: 40px auto;
  text-align: center;
}

.success-panel.is-visible {
  display: block;
  animation: step-in 180ms ease;
}

.success-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border: 1px solid var(--champagne);
  border-radius: 50%;
}

.success-icon img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.success-panel > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.reference-box {
  max-width: 360px;
  display: grid;
  gap: 7px;
  margin: 24px auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  padding: 17px;
}

.reference-box span {
  color: var(--faint);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reference-box strong {
  color: var(--champagne);
  letter-spacing: 0.08em;
}

footer {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--soft-line);
  color: var(--faint);
  font-size: 0.68rem;
}

.policy-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(10, 13, 15, 0.78);
}

.policy-modal.is-visible {
  display: grid;
}

.policy-dialog {
  position: relative;
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 34px;
}

.policy-dialog > p:not(.eyebrow):not(.modal-small) {
  color: var(--muted);
  line-height: 1.7;
}

.modal-small {
  color: var(--faint);
  font-size: 0.68rem;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 15px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--soft-line);
  border-radius: 50%;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
  font-size: 1.2rem;
}

@media (max-width: 1120px) {
  .registration-card {
    grid-template-columns: 1fr;
  }

  .next-panel {
    border-top: 1px solid var(--soft-line);
    border-left: 0;
  }

  .next-list {
    max-width: 760px;
    margin-inline: auto;
  }

  .review-notice {
    max-width: 620px;
    margin-inline: auto;
  }
}

@media (max-width: 860px) {
  .stepper {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .step {
    display: grid;
    justify-items: center;
    gap: 7px;
    text-align: center;
  }

  .step-line {
    display: none;
  }

  .step-label {
    white-space: normal;
    font-size: 0.63rem;
  }

  .section-heading {
    display: grid;
    gap: 10px;
    align-items: start;
  }

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

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 0 14px;
  }

.site-header {
  min-height: 64px;
}

  .brand-text {
    display: none;
  }

  .secure-label {
    font-size: 0.6rem;
  }

.intro {
  padding: 30px 0 24px;
}

.intro h1 {
  font-size: 1.9rem;
  line-height: 1.12;
}

  .intro > p:last-child {
    font-size: 0.8rem;
  }

  .registration-card {
    border-radius: 18px;
  }

  .form-column {
    padding: 24px 16px;
  }

  .stepper {
    margin-bottom: 34px;
  }

  .step-number {
    width: 34px;
    height: 34px;
  }

  .field-grid.two,
  .field-grid.three,
  .review-card {
    grid-template-columns: 1fr;
  }

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

  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #next-button,
  #submit-button {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    margin: 0;
  }

  #back-button,
  #save-button {
    width: 100%;
  }

  .security-note {
    align-items: flex-start;
  }

  .next-panel {
    padding: 42px 20px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 22px 0;
  }
}
