:root {
  --ink: #0d1b2a;
  --navy: #10293f;
  --navy-2: #173b57;
  --teal: #17b8a6;
  --teal-dark: #0b8f83;
  --aqua: #dff8f4;
  --paper: #ffffff;
  --mist: #f4f7f9;
  --line: #d9e3e8;
  --muted: #667987;
  --danger: #b42318;
  --shadow: 0 30px 80px rgba(7, 30, 48, 0.13);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 0%, rgba(23, 184, 166, 0.12), transparent 29rem),
    linear-gradient(135deg, #edf4f7 0%, #f8fafb 48%, #eef6f5 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
a { color: var(--teal-dark); }

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

.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px 2px 10px 2px;
  background: var(--navy);
  color: white;
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.13em; }

.beta-pill {
  padding: 7px 12px;
  border: 1px solid rgba(16, 41, 63, 0.14);
  border-radius: 999px;
  color: var(--navy-2);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

main { padding: 24px 0 44px; }

.questionnaire-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.76fr) minmax(560px, 1.24fr);
  gap: clamp(28px, 5vw, 82px);
  align-items: start;
}

.context-panel {
  position: sticky;
  top: 28px;
  padding: 56px 0 32px;
}

.eyebrow, .step-label {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.context-panel h1 {
  max-width: 650px;
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 4vw, 4.7rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.context-lead {
  max-width: 590px;
  margin: 28px 0;
  color: #435969;
  font-size: 1.1rem;
}

blockquote {
  max-width: 610px;
  margin: 30px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--teal);
  background: rgba(255, 255, 255, 0.62);
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.55;
}

.pilot-benefits { display: grid; gap: 15px; margin-top: 34px; }
.pilot-benefits > div { display: flex; gap: 14px; align-items: flex-start; }
.pilot-benefits > div > span {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 184, 166, 0.35);
  border-radius: 50%;
  color: var(--teal-dark);
  font-size: 0.7rem;
  font-weight: 800;
}
.pilot-benefits p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.pilot-benefits strong { display: block; color: var(--navy); font-size: 0.98rem; }

.form-card {
  min-height: 690px;
  overflow: hidden;
  border: 1px solid rgba(16, 41, 63, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.progress-wrap { padding: 27px 38px 0; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.78rem; font-weight: 650; }
.progress-track { height: 4px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: #e9eff2; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-dark), var(--teal)); transition: width 300ms ease; }

#pilotForm { padding: 34px 38px 28px; }
.form-step { display: none; animation: reveal 240ms ease-out; }
.form-step.is-active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.form-step h2, .invite-gate h2 {
  max-width: 660px;
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.step-intro { margin: 13px 0 25px; color: var(--muted); }
.question-block { margin: 29px 0 0; padding: 0; border: 0; }
.question-block legend { width: 100%; margin-bottom: 13px; color: var(--navy); font-weight: 700; }
.question-block legend em { color: var(--muted); font-size: 0.86rem; font-style: normal; font-weight: 500; }

.choice-grid { display: grid; gap: 11px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.five-col { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.choice-stack { display: grid; gap: 10px; margin-top: 22px; }
.choice-stack.compact { margin-top: 0; }

.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px 14px 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  transition: border-color 150ms, background 150ms, box-shadow 150ms, transform 150ms;
}
.choice > span::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 1.5px solid #9aabb6;
  border-radius: 50%;
  transform: translateY(-50%);
}
.choice input:checked + span { border-color: var(--teal-dark); background: #f0fbf9; box-shadow: 0 0 0 1px var(--teal-dark); }
.choice input:checked + span::before { border: 5px solid var(--teal-dark); background: white; }
.choice input:focus-visible + span { outline: 3px solid rgba(23, 184, 166, 0.25); outline-offset: 2px; }
.choice:hover > span { border-color: #91aab5; transform: translateY(-1px); }
.choice b { color: var(--navy); font-size: 0.94rem; }
.choice small { margin-top: 2px; color: var(--muted); font-size: 0.78rem; }
.choice.tile > span { min-height: 66px; padding: 12px; text-align: center; }
.choice.tile > span::before { display: none; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: #314b5d;
  font-size: 0.88rem;
  font-weight: 600;
  transition: 150ms;
}
.chip input:checked + span { border-color: var(--teal-dark); background: var(--aqua); color: #086d65; box-shadow: 0 0 0 1px var(--teal-dark); }
.chip input:focus-visible + span { outline: 3px solid rgba(23, 184, 166, 0.25); outline-offset: 2px; }
.chip:hover span { border-color: #91aab5; }

.segmented { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { min-height: 48px; display: grid; place-items: center; padding: 8px; border-right: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; font-weight: 650; text-align: center; }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--aqua); color: #086d65; box-shadow: inset 0 0 0 1px var(--teal-dark); }
.segmented input:focus-visible + span { outline: 3px solid rgba(23, 184, 166, 0.25); outline-offset: -3px; }

[data-visible-if] { transition: opacity 180ms; }
[data-visible-if].is-hidden { display: none !important; }

.field-label { display: grid; gap: 8px; margin-top: 24px; color: var(--navy); font-size: 0.9rem; font-weight: 700; }
.field-label span { color: var(--muted); font-size: 0.78rem; font-weight: 500; }
input[type="text"], input[type="email"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  color: var(--ink);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
input[type="text"], input[type="email"] { min-height: 50px; padding: 11px 13px; }
textarea { display: block; padding: 13px 14px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(23, 184, 166, 0.14); }
input.is-invalid, textarea.is-invalid { border-color: var(--danger); }
.char-count { margin-top: 6px; color: var(--muted); font-size: 0.75rem; text-align: right; }
.field-grid { display: grid; gap: 14px; }
.field-grid .field-label { margin-top: 18px; }
.optional-field { margin-top: 25px; }

.offer-card {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid rgba(23, 184, 166, 0.35);
  border-radius: 13px;
  background: linear-gradient(135deg, #effbf9, #f8fcfc);
}
.offer-card strong { color: var(--navy); }
.offer-card p { margin: 5px 0 0; color: var(--muted); font-size: 0.9rem; }
.offer-question { padding: 20px; border: 1px solid #cfe4e1; border-radius: 14px; background: #f7fbfb; }
.legal-note, .privacy-copy { color: var(--muted); font-size: 0.78rem; }

.consent { display: flex; gap: 11px; align-items: flex-start; margin-top: 26px; color: #435969; font-size: 0.84rem; cursor: pointer; }
.consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal-dark); }

.form-actions { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-top: 34px; padding-top: 22px; border-top: 1px solid #edf1f3; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 21px;
  border: 0;
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms, box-shadow 150ms, opacity 150ms;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(23, 184, 166, 0.3); outline-offset: 2px; }
.button.primary { background: var(--navy); color: white; box-shadow: 0 10px 20px rgba(16, 41, 63, 0.16); }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--navy); }
.button.back { padding-left: 0; background: transparent; color: var(--muted); }
.button[disabled] { opacity: 0.55; cursor: wait; transform: none; }
.time-note { color: var(--muted); font-size: 0.75rem; text-align: center; }

.form-error, .notice.error { margin-top: 20px; padding: 12px 14px; border: 1px solid #f2c2be; border-radius: 10px; background: #fff5f4; color: var(--danger); font-size: 0.86rem; }
.group-error { margin: 8px 0 0; color: var(--danger); font-size: 0.8rem; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; }

.success-step { padding: 34px 0; text-align: center; }
.success-step h2 { margin-left: auto; margin-right: auto; }
.success-step > p:not(.step-label) { max-width: 560px; margin: 14px auto 24px; color: var(--muted); }
.success-mark { width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 50%; background: var(--aqua); color: var(--teal-dark); font-size: 1.8rem; font-weight: 800; }
.fit-preview { max-width: 560px; margin: 28px auto; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--mist); text-align: left; }
.fit-label { margin: 0 0 10px; color: var(--navy); font-weight: 750; }
.fit-preview ul { margin: 0; padding-left: 20px; color: #435969; }
.fit-preview li + li { margin-top: 6px; }
.suggested-pilot { max-width: 560px; margin: -10px auto 28px; color: #435969; font-size: 0.9rem; }

.invite-gate { padding: 76px 56px; }
.invite-gate p:not(.step-label) { max-width: 540px; margin: 18px 0 26px; color: var(--muted); }

footer { min-height: 74px; display: flex; justify-content: space-between; gap: 20px; align-items: center; border-top: 1px solid rgba(16, 41, 63, 0.08); color: var(--muted); font-size: 0.76rem; }
footer a { color: inherit; }

@media (max-width: 1040px) {
  .page-shell { padding: 0 24px; }
  .questionnaire-layout { grid-template-columns: 1fr; gap: 22px; }
  .context-panel { position: static; padding: 18px 0 6px; }
  .context-panel h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); }
  .context-lead { margin-bottom: 18px; }
  blockquote { display: none; }
  .pilot-benefits { grid-template-columns: repeat(3, 1fr); margin-top: 22px; }
}

@media (max-width: 720px) {
  .page-shell { padding: 0 14px; }
  .topbar { height: 72px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1.05rem; }
  .beta-pill { font-size: 0.64rem; }
  main { padding-top: 6px; }
  .context-panel h1 { font-size: 2.45rem; }
  .context-lead { font-size: 1rem; }
  .pilot-benefits { display: none; }
  .form-card { min-height: 620px; border-radius: 17px; }
  .progress-wrap { padding: 21px 20px 0; }
  #pilotForm { padding: 27px 20px 22px; }
  .two-col, .five-col { grid-template-columns: 1fr; }
  .five-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented { grid-template-columns: repeat(2, 1fr); }
  .segmented label:nth-child(2) span { border-right: 0; }
  .segmented label:nth-child(-n+2) span { border-bottom: 1px solid var(--line); }
  .form-actions { grid-template-columns: auto 1fr; }
  .time-note { display: none; }
  .button.primary { justify-self: end; }
  .invite-gate { padding: 50px 24px; }
  footer { flex-direction: column; align-items: flex-start; justify-content: center; padding: 22px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
