:root {
  --teal: #059aa1;
  --teal-strong: #047c82;
  --navy: #002360;
  --navy-hover: #001a49;
  --yellow: #f0b415;
  --white: #ffffff;
  --pale-teal: #eaf8f8;
  --pale-navy: #eef2f8;
  --body-text: #1e2d3d;
  --muted: #5c6b78;
  --border: #cbd8df;
  --error: #a12626;
  --error-bg: #fff4f4;
  --shadow: 0 16px 45px rgba(0, 35, 96, 0.10);
  --radius: 18px;
  --focus: 0 0 0 4px rgba(5, 154, 161, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--body-text);
  background: #f7fbfc;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(5, 154, 161, 0.08), transparent 28rem),
    #f7fbfc;
  color: var(--body-text);
  line-height: 1.6;
}

button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

img { display: block; max-width: 100%; height: auto; }

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

h1, h2 {
  color: var(--navy);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3.7rem);
  max-width: 19ch;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
}

p { margin-bottom: 1rem; }

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  transform: translateY(-180%);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  color: var(--white);
  background: var(--navy);
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.page-shell {
  width: min(100% - 2rem, 820px);
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.brand-frame {
  width: min(100%, 510px);
  margin: 0 auto 1rem;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 35, 96, 0.08);
}

.brand-frame-compact { width: min(78%, 390px); }

.screen {
  border: 1px solid rgba(0, 35, 96, 0.09);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  animation: screen-in 220ms ease-out both;
}

.landing-card,
.quiz-card,
.contact-card,
.result-card {
  padding: clamp(1.3rem, 5vw, 3.25rem);
}

.landing-card { text-align: center; }
.landing-card h1 { margin-right: auto; margin-left: auto; }

.eyebrow {
  margin-bottom: 0.65rem;
  color: var(--teal-strong);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.intro-copy,
.section-intro {
  max-width: 61ch;
  margin-right: auto;
  margin-left: auto;
  color: #334555;
  font-size: 1.04rem;
}

.reassurance,
.storage-note,
.field-help {
  color: var(--muted);
  font-size: 0.9rem;
}

.reassurance { margin: 0.9rem auto 0; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 11px;
  padding: 0.78rem 1.2rem;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

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

.button:focus-visible,
.text-link:focus-visible,
input:focus-visible,
.answer-choice:has(input:focus-visible),
.compact-choice:has(input:focus-visible),
.consent-choice:has(input:focus-visible) {
  outline: none;
  box-shadow: var(--focus);
}

.button-primary {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.button-primary:hover:not(:disabled) {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
}

.button-secondary {
  color: var(--navy);
  background: var(--white);
  border-color: #aabac6;
}

.button-secondary:hover { border-color: var(--navy); }

.button-large {
  min-height: 56px;
  padding: 0.95rem 1.45rem;
  font-size: 1.03rem;
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.progress-block { margin-bottom: 1.8rem; }

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 800;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dcecee;
}

.progress-fill {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 220ms ease;
}

.question-fieldset,
.choice-fieldset,
.connected-fields {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.question-legend {
  width: 100%;
  margin-bottom: 1.2rem;
  color: var(--navy);
  font-size: clamp(1.45rem, 3.8vw, 2rem);
  font-weight: 800;
  line-height: 1.23;
  letter-spacing: -0.02em;
}

.answer-list {
  display: grid;
  gap: 0.72rem;
}

.answer-choice {
  position: relative;
  display: grid;
  min-height: 52px;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 0.85rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0.78rem 0.95rem;
  background: var(--white);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.answer-choice:hover { border-color: var(--teal); }

.answer-choice:has(input:checked) {
  border-color: var(--teal-strong);
  background: var(--pale-teal);
}

.answer-choice input,
.compact-choice input,
.consent-choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--teal-strong);
}

.answer-choice:has(input:checked)::after {
  content: "Selected";
  position: absolute;
  right: 0.75rem;
  top: 0.35rem;
  color: var(--teal-strong);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer-choice:has(input:checked) span { padding-right: 4.3rem; }

.conditional-field {
  margin-top: 1rem;
  padding: 1rem;
  border-left: 4px solid var(--teal);
  border-radius: 0 10px 10px 0;
  background: var(--pale-teal);
}

.field-group { margin-bottom: 1.25rem; }

.field-group label,
.connected-fields legend,
.choice-fieldset legend {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--navy);
  font-weight: 800;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  min-height: 49px;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  color: var(--body-text);
  background: var(--white);
}

input[aria-invalid="true"] { border-color: var(--error); }

.field-help { margin: 0.35rem 0 0; }

.field-error,
.error-message {
  min-height: 1.3em;
  margin: 0.4rem 0 0;
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 650;
}

.error-message { margin-top: 1rem; }

.error-summary {
  border-left: 4px solid var(--error);
  border-radius: 0 8px 8px 0;
  padding: 0.8rem 1rem;
  color: #731f1f;
  background: var(--error-bg);
  font-weight: 700;
}

.form-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.form-actions-split { justify-content: space-between; }

.phone-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(180px, 1.7fr);
  gap: 0.9rem;
}

.connected-fields { margin-bottom: 0.2rem; }

.inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.compact-choice {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 0.55rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}

.compact-choice:has(input:checked) {
  border-color: var(--teal-strong);
  background: var(--pale-teal);
}

.consent-choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  cursor: pointer;
}

.consent-choice input { margin-top: 0.18rem; }

.storage-note {
  margin: 1rem 0 0;
  text-align: center;
}

.results-shell { width: min(100% - 2rem, 900px); }

.result-header {
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}

.result-lead {
  max-width: 68ch;
  color: #334555;
  font-size: 1.06rem;
}

.result-lead p:last-child { margin-bottom: 0; }

.result-section { padding: 1.7rem 0 0; }

.check-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 2rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.05rem;
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--teal-strong);
  font-size: 0.84rem;
  font-weight: 900;
}

.support-panel,
.context-panel,
.closing-panel {
  margin-top: 1.7rem;
  border-radius: 14px;
  padding: clamp(1.1rem, 4vw, 1.6rem);
}

.support-panel { background: var(--pale-teal); }

.context-panel {
  border: 1px solid #d8e2e8;
  background: #fbfdfe;
}

.context-panel p:last-child,
.support-panel p:last-child,
.closing-panel p:last-child { margin-bottom: 0; }

.urgency-line {
  margin: 1.7rem 0 1rem;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 800;
}

.result-card > .button-large { width: 100%; }

.closing-panel {
  position: relative;
  margin-top: 2rem;
  overflow: hidden;
  text-align: center;
  background: var(--pale-navy);
}

.closing-panel h2 { margin-top: 0.2rem; }

.yellow-accent {
  display: block;
  width: 42px;
  height: 5px;
  margin: 0 auto 1rem;
  border-radius: 99px;
  background: var(--yellow);
}

.text-link {
  display: block;
  margin: 1rem auto 0;
  border: 0;
  padding: 0.4rem;
  color: var(--navy);
  background: transparent;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.disclaimer {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.empty-state { text-align: center; }
.empty-state h1 { margin-right: auto; margin-left: auto; }
.empty-state p { max-width: 52ch; margin-right: auto; margin-left: auto; }

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

@media (max-width: 560px) {
  .page-shell { width: min(100% - 1rem, 820px); padding-top: 0.6rem; }
  .brand-frame { margin-bottom: 0.6rem; border-radius: 10px; }
  .landing-card, .quiz-card, .contact-card, .result-card { padding: 1.15rem; }
  h1 { font-size: clamp(1.85rem, 9.5vw, 2.45rem); }
  .phone-grid { grid-template-columns: 1fr; gap: 0; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .answer-choice { padding: 0.78rem; }
  .answer-choice:has(input:checked)::after { display: none; }
  .answer-choice:has(input:checked) span { padding-right: 0; }
}

@media (min-width: 900px) {
  .page-shell { padding-top: 2rem; }
}

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

.retry-button {
  width: 100%;
  margin-top: 0.8rem;
}

.booking-config-message {
  min-height: 0;
  margin-top: 0.75rem;
  text-align: center;
}

.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}
