:root {
  color-scheme: light;
  --navy-950: #061b23;
  --navy-900: #092c35;
  --navy-800: #123f49;
  --teal-700: #08796f;
  --teal-600: #0a8f82;
  --teal-100: #d9f0eb;
  --teal-50: #edf8f5;
  --paper: #f7f5ee;
  --white: #fffefa;
  --ink: #102f37;
  --muted: #526c70;
  --line: #cad8d5;
  --danger: #9d352c;
  --success: #126c4c;
  --shadow: 0 18px 50px rgba(6, 27, 35, .12), 0 3px 10px rgba(6, 27, 35, .07);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  line-height: 1.6;
  accent-color: var(--teal-700);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--teal-700); text-underline-offset: .2em; }
svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--teal-100); color: var(--navy-950); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  background: var(--white);
  color: var(--navy-950);
  border-radius: .35rem;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.evaluation-banner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .55rem 1rem;
  background: var(--navy-950);
  color: #dceeed;
  font-size: .86rem;
  letter-spacing: .01em;
  text-align: center;
}
.evaluation-banner svg { width: 1rem; color: #73d1c2; }

.site-header {
  width: min(1180px, calc(100% - 48px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid rgba(9, 44, 53, .14);
}
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--navy-900); font-weight: 650; text-decoration: none; letter-spacing: -.02em; }
.brand b { color: var(--teal-700); }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 12%;
  background: var(--navy-900);
  color: var(--white);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}
.text-button, .quiet-button, .footer-link {
  min-height: 44px;
  padding: .4rem 0;
  border: 0;
  background: transparent;
  color: var(--teal-700);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .25em;
}
.text-button:hover, .quiet-button:hover, .footer-link:hover { text-decoration-color: currentColor; }

.hero {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 136px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  padding: clamp(4.5rem, 9vh, 7.5rem) 0;
}
.hero-copy { max-width: 720px; }
.intro-line { margin: 0 0 1.5rem; color: var(--teal-700); font-weight: 650; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; color: var(--navy-950); letter-spacing: -.035em; line-height: 1.06; text-wrap: balance; }
h1 { max-width: 13ch; font-size: clamp(2.75rem, 5.5vw, 5.35rem); }
h2 { font-size: clamp(2rem, 4vw, 3.7rem); }
.hero-lede { max-width: 64ch; margin: 2rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.22rem); }
.hero-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 2.25rem; }
.time-note { color: var(--muted); font-size: .92rem; }
.legal-short { max-width: 62ch; margin: 1.4rem 0 0; color: var(--muted); font-size: .86rem; }

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .8rem 1.2rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.button-primary { background: var(--teal-700); color: #fff; box-shadow: 0 9px 22px rgba(6, 27, 35, .16), 0 2px 4px rgba(6, 27, 35, .1); }
.button-primary:hover { background: #066c64; box-shadow: 0 13px 28px rgba(6, 27, 35, .2), 0 3px 6px rgba(6, 27, 35, .12); }
.button-secondary { border-color: var(--line); background: transparent; color: var(--navy-900); }
.button-secondary:hover { border-color: var(--navy-800); background: rgba(255, 255, 255, .45); }

.path-map { position: relative; padding: 1.6rem; background: var(--navy-900); color: #ecf7f5; border-radius: 1rem; box-shadow: var(--shadow); overflow: hidden; }
.path-map::after { content: ""; position: absolute; width: 180px; height: 180px; right: -100px; top: -100px; border: 1px solid rgba(115, 209, 194, .25); border-radius: 50%; box-shadow: 0 0 0 28px rgba(115, 209, 194, .05), 0 0 0 56px rgba(115, 209, 194, .035); }
.map-heading { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(220, 238, 237, .17); color: #a9c8c8; font-size: .76rem; text-transform: uppercase; letter-spacing: .11em; }
.path-map ol { position: relative; z-index: 1; list-style: none; margin: 0; padding: 1.1rem 0; }
.map-step { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 86px; }
.map-step:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 62px; width: 1px; height: 46px; background: rgba(220, 238, 237, .2); }
.step-index { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px solid rgba(220, 238, 237, .28); border-radius: 50%; color: #a9c8c8; font-variant-numeric: tabular-nums; }
.map-step-active .step-index { background: #9ce0d5; border-color: #9ce0d5; color: var(--navy-950); }
.map-step strong, .map-step small { display: block; }
.map-step strong { font-size: .96rem; }
.map-step small { margin-top: .15rem; color: #c3dcda; }
.path-map > p { display: flex; gap: .6rem; margin: 0; padding-top: 1rem; border-top: 1px solid rgba(220, 238, 237, .17); color: #b8d1d0; font-size: .84rem; }
.path-map > p svg { flex: 0 0 auto; width: 1.1rem; color: #73d1c2; }

.wizard-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: 680px;
  margin: 3.5rem auto 5rem;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.journey-panel { display: flex; flex-direction: column; padding: 2rem; background: var(--navy-900); color: #dceeed; }
.journey-top, .progress-copy { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.journey-top p { margin: 0; font-weight: 750; }
.journey-panel .quiet-button { color: #9ce0d5; }
.progress-copy { margin-top: 2rem; color: #b8d1d0; font-size: .8rem; }
.progress-track { height: 4px; margin-top: .65rem; background: rgba(220, 238, 237, .16); border-radius: 99px; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: #78d4c5; transition: width .45s var(--ease); }
.answer-history { list-style: none; margin: 1.5rem 0 2rem; padding: 0; }
.answer-history li { position: relative; padding: .7rem 0 .7rem 1.45rem; color: #b8d1d0; font-size: .84rem; }
.answer-history li::before { content: ""; position: absolute; left: 0; top: 1.08rem; width: 7px; height: 7px; border: 2px solid #5d8586; border-radius: 50%; }
.answer-history li.is-complete { color: #eef7f5; }
.answer-history li.is-complete::before { background: #78d4c5; border-color: #78d4c5; }
.answer-history strong, .answer-history span { display: block; }
.answer-history span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c6ddda; }
.journey-promise { display: flex; align-items: flex-start; gap: .7rem; margin-top: auto; padding-top: 1.5rem; border-top: 1px solid rgba(220, 238, 237, .16); color: #c6ddda; font-size: .8rem; }
.journey-promise svg { flex: 0 0 auto; color: #78d4c5; }
.journey-promise p { margin: 0; }
.journey-promise strong { color: #eef7f5; }

.question-stage { display: flex; min-width: 0; flex-direction: column; padding: clamp(2.2rem, 5vw, 4.5rem); }
.question-card { max-width: 720px; width: 100%; margin: auto 0; }
.question-section, .outcome-heading > p, .contact-intro > p, .success-panel > p:first-of-type { margin: 0 0 1rem; color: var(--teal-700); font-weight: 700; }
.question-card h2 { max-width: 18ch; font-size: clamp(2rem, 4vw, 3.4rem); }
.question-help { max-width: 65ch; margin: 1rem 0 1.8rem; color: var(--muted); }
.options { display: grid; gap: .75rem; margin: 0; padding: 0; border: 0; }
.option-control { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: .9rem; min-height: 76px; padding: 1rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; cursor: pointer; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s var(--ease), transform .2s var(--ease); }
.option-control:hover { border-color: var(--teal-600); transform: translateX(3px); }
.option-control:has(input:checked) { border-color: var(--teal-700); background: var(--teal-50); box-shadow: 0 0 0 1px var(--teal-700); }
.option-control input { width: 20px; height: 20px; margin: .15rem 0 0; }
.option-copy strong, .option-copy span { display: block; }
.option-copy strong { color: var(--navy-900); }
.option-copy span { margin-top: .15rem; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.wizard-actions { display: flex; justify-content: space-between; gap: 1rem; padding-top: 2rem; margin-top: auto; }
.field-error { margin: .8rem 0 0; color: var(--danger); font-size: .9rem; font-weight: 650; }

.outcome, .contact-section, .success-panel { width: min(920px, calc(100% - 48px)); margin: 4rem auto 6rem; }
.outcome-heading { max-width: 760px; }
.outcome-heading > p:last-child { max-width: 65ch; color: var(--muted); }
.review-list { margin: 2.5rem 0; border-top: 1px solid var(--line); }
.review-row { display: grid; grid-template-columns: minmax(160px, .65fr) minmax(0, 1.35fr); gap: 2rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.review-row dt { color: var(--muted); }
.review-row dd { margin: 0; font-weight: 700; color: var(--navy-900); }
.review-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.contact-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(380px, 1.2fr); gap: 4rem; }
.contact-intro h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
.contact-intro > p:not(:first-child) { color: var(--muted); }
.api-status { display: flex; align-items: center; gap: .55rem; margin-top: 1.5rem; color: var(--muted); font-size: .84rem; }
.api-status span { width: 9px; height: 9px; border-radius: 50%; background: #9aa7a6; box-shadow: 0 0 0 4px rgba(154, 167, 166, .15); }
.api-status.is-online span { background: var(--success); box-shadow: 0 0 0 4px rgba(18, 108, 76, .14); }
.api-status.is-offline span { background: var(--danger); box-shadow: 0 0 0 4px rgba(157, 53, 44, .12); }
.contact-form { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: .8rem; box-shadow: var(--shadow); }
.demo-fields { display: grid; gap: 1rem; }
.demo-fields label { display: grid; gap: .35rem; color: var(--navy-900); font-size: .84rem; font-weight: 700; }
.demo-fields input { width: 100%; min-height: 48px; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: .4rem; background: #fff; color: var(--ink); }
.form-note { margin: .7rem 0 1.2rem; color: var(--muted); font-size: .78rem; }
.fill-test-button { width: 100%; margin-bottom: 1.2rem; }
.consent-row { display: grid; grid-template-columns: 24px 1fr; gap: .7rem; align-items: flex-start; padding-top: 1.2rem; border-top: 1px solid var(--line); cursor: pointer; font-size: .9rem; }
.consent-row input { width: 20px; height: 20px; margin: .15rem 0 0; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1.2rem; }
.submit-status { min-height: 1.5em; margin: .7rem 0 0; color: var(--muted); font-size: .86rem; text-align: center; }
.submit-status.is-error { color: var(--danger); }

.success-panel, .error-panel { max-width: 700px; padding: clamp(2rem, 6vw, 4.5rem); background: var(--white); border: 1px solid var(--line); border-radius: 1rem; text-align: center; box-shadow: var(--shadow); }
.error-panel { width: min(700px, calc(100% - 48px)); margin: 4rem auto 6rem; }
.success-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 1.2rem; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); }
.success-icon svg { width: 2rem; }
.success-panel h2 { font-size: clamp(2rem, 5vw, 3.3rem); }
.success-panel p, .error-panel p { color: var(--muted); }
.success-panel .sandbox-warning { padding: .9rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--teal-50); color: var(--navy-900); font-weight: 700; }
.success-panel .button { margin-top: 1rem; }

.site-footer { display: grid; grid-template-columns: .7fr 1.3fr; gap: 4rem; padding: 3.5rem max(24px, calc((100% - 1180px) / 2)); background: var(--navy-950); color: #b8d1d0; }
.footer-brand { display: flex; align-items: flex-start; gap: .8rem; }
.footer-brand strong, .footer-brand small { display: block; }
.footer-brand strong { color: #fff; }
.footer-brand small { margin-top: .25rem; }
.footer-content { max-width: 720px; font-size: .84rem; }
.footer-content p { margin-top: 0; }
.footer-content nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-top: 1.2rem; }
.footer-content a, .footer-link { color: #9ce0d5; font-size: .84rem; }

[hidden], .is-hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid #e39a42; outline-offset: 3px; }
input:focus-visible { outline-offset: 1px; }

body:has(dialog[open]) { overflow: hidden; }
dialog { width: min(620px, calc(100% - 32px)); padding: 0; border: 0; border-radius: .85rem; background: var(--white); color: var(--ink); box-shadow: 0 28px 90px rgba(6, 27, 35, .35); }
dialog::backdrop { background: rgba(6, 27, 35, .72); backdrop-filter: blur(3px); }
.dialog-header { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--line); }
.dialog-header p { margin: 0 0 .3rem; color: var(--teal-700); font-size: .82rem; font-weight: 700; }
.dialog-header h2 { font-size: 1.8rem; }
.icon-button { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.dialog-body { padding: 1rem 1.5rem; color: var(--muted); }
.dialog-body li + li { margin-top: .4rem; }
.dialog-action { margin: 0 1.5rem 1.5rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 3.5rem; }
  .hero-copy { max-width: 780px; }
  .path-map { max-width: 620px; }
  .wizard-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .journey-panel { padding: 1.5rem; }
  .question-stage { padding: 2.25rem; }
  .contact-section { grid-template-columns: 1fr; gap: 2.5rem; }
  .site-footer { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 700px) {
  .evaluation-banner { align-items: flex-start; font-size: .78rem; }
  .evaluation-banner svg { margin-top: .15rem; }
  .site-header { width: min(100% - 32px, 1180px); min-height: 76px; }
  .text-button { max-width: 130px; line-height: 1.25; text-align: right; }
  .brand > span:last-child { max-width: 120px; line-height: 1.15; }
  .hero { width: min(100% - 32px, 1180px); padding: 3.5rem 0 4.5rem; }
  h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .time-note { padding-left: .2rem; }
  .hero .button { width: 100%; }
  .path-map { padding: 1.25rem; }
  .wizard-shell { width: 100%; margin: 0; min-height: calc(100vh - 44px); grid-template-columns: 1fr; border: 0; border-radius: 0; box-shadow: none; }
  .journey-panel { padding: 1.2rem 1rem; }
  .progress-copy { margin-top: 1rem; }
  .answer-history, .journey-promise { display: none; }
  .question-stage { min-height: 590px; padding: 2.5rem 1rem 1.25rem; }
  .question-card h2 { font-size: clamp(2rem, 10vw, 3rem); }
  .wizard-actions { position: sticky; bottom: 0; margin: 2rem -1rem -1.25rem; padding: 1rem; background: rgba(255, 254, 250, .96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
  .wizard-actions .button { flex: 1; padding-inline: .75rem; }
  .outcome, .contact-section, .success-panel { width: min(100% - 32px, 920px); margin: 3rem auto 4.5rem; }
  .review-row { grid-template-columns: 1fr; gap: .25rem; }
  .review-actions { flex-direction: column-reverse; }
  .review-actions .button { width: 100%; }
  .contact-form { padding: 1rem; }
  .form-actions { grid-template-columns: 1fr; }
  .site-footer { padding: 2.5rem 1rem; }
  .footer-content nav { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .footer-link { padding: 0; }
}

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

@media (prefers-contrast: more) {
  :root { --line: #526c70; --muted: #334f54; }
  .button, .option-control, .contact-form { border-width: 2px; }
}

@media (forced-colors: active) {
  .brand-mark, .button-primary, .path-map, .journey-panel { forced-color-adjust: none; }
}

@media print {
  .evaluation-banner, .site-header, .hero, .wizard-shell, .contact-section, .success-panel, .error-panel, .site-footer, dialog, .review-actions { display: none; }
  body { background: #fff; color: #000; }
  .outcome { display: block; width: 100%; margin: 0; }
}
