:root {
  color-scheme: light;
  --page: #f4f8f8;
  --surface: #fbfdfd;
  --surface-strong: #ffffff;
  --text: #17344f;
  --text-muted: #4f6578;
  --border: #cbd9dc;
  --accent: #58bdb1;
  --accent-soft: #dff3f0;
  --primary: #17344f;
  --primary-hover: #214a6d;
  --focus: #287f78;
  --shadow: 0 24px 70px rgb(23 52 79 / 0.13);
  --radius: 16px;
  font-family: Aptos, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgb(244 248 248 / 0.94), rgb(244 248 248 / 0.94)),
    url("/assets/medical-pattern.svg") center / cover fixed;
}

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

button {
  font: inherit;
}

a {
  color: inherit;
}

.site-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  padding-right: max(18px, env(safe-area-inset-right));
  padding-left: max(18px, env(safe-area-inset-left));
}

.site-header {
  display: flex;
  justify-content: center;
  min-height: 76px;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
}

.brand:focus-visible,
.site-footer a:focus-visible,
.secondary-link:focus-visible,
.back-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.brand img {
  display: block;
  width: min(224px, 62vw);
  height: auto;
}

.main-content {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 12px 0 22px;
}

.qualifier {
  position: relative;
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid rgb(203 217 220 / 0.88);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.96);
  box-shadow: var(--shadow);
}

.qualifier__accent {
  width: 100%;
  height: 7px;
  background: var(--accent);
}

.step {
  padding: clamp(27px, 7vw, 44px);
}

.step.is-entering {
  animation: step-in 240ms ease-out both;
}

.eyebrow {
  margin: 0 0 14px;
  color: #356f6b;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2 {
  max-width: 16ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.82rem, 8vw, 2.7rem);
  font-weight: 720;
  letter-spacing: -0.038em;
  line-height: 1.04;
}

h1:focus,
h2:focus {
  outline: none;
}

.intro {
  max-width: 46ch;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.question-group {
  min-width: 0;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.question-group legend {
  width: 100%;
  padding: 0;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.45;
}

.answer-list {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.answer,
.whatsapp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 13px 20px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 720;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.answer--primary,
.whatsapp-cta {
  color: #f8fbfb;
  background: var(--primary);
}

.answer--primary:hover,
.whatsapp-cta:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.answer--secondary {
  color: var(--primary);
  background: transparent;
}

.answer--secondary:hover {
  background: var(--accent-soft);
}

.answer:focus-visible,
.whatsapp-cta:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.answer:active,
.whatsapp-cta:active,
.back-button:active,
.secondary-link:active {
  transform: scale(0.98);
}

.whatsapp-cta {
  margin-top: 28px;
}

.secondary-link {
  display: inline-flex;
  margin-top: 26px;
  color: var(--primary);
  font-weight: 720;
  line-height: 1.4;
  text-underline-offset: 4px;
}

.back-button {
  display: block;
  min-height: 44px;
  margin: 15px auto 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 650;
  background: transparent;
  cursor: pointer;
}

.back-button:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.status-message {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 10px 0 max(18px, env(safe-area-inset-bottom));
  color: #506878;
  font-size: 0.78rem;
  line-height: 1.4;
}

.site-footer a {
  font-weight: 650;
  text-underline-offset: 3px;
}

.privacy-page .main-content {
  align-items: start;
  padding-top: 18px;
}

.privacy-content {
  width: min(100%, 720px);
  padding: clamp(26px, 6vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 18px 54px rgb(23 52 79 / 0.1);
}

.privacy-content h1 {
  max-width: 18ch;
}

.privacy-content h2 {
  max-width: none;
  margin-top: 30px;
  font-size: 1.22rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.privacy-content p,
.privacy-content li {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.privacy-content ul {
  padding-left: 20px;
}

.privacy-content a {
  color: var(--focus);
  font-weight: 650;
  text-underline-offset: 3px;
}

.privacy-back {
  display: inline-flex;
  margin-top: 32px;
}

.redirect-card h1 {
  max-width: 12ch;
}

.redirect-note {
  max-width: 42ch;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: center;
}

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

@media (min-width: 720px) {
  .site-header {
    min-height: 92px;
    padding-top: 26px;
  }

  .main-content {
    padding-top: 24px;
    padding-bottom: 32px;
  }

  .qualifier::after {
    position: absolute;
    right: -72px;
    bottom: -80px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: var(--accent-soft);
    content: "";
    opacity: 0.55;
    pointer-events: none;
  }

  .step {
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 374px) {
  .site-shell {
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .site-header {
    min-height: 68px;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .main-content {
    padding-top: 7px;
  }

  .step {
    padding: 24px 20px;
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  .intro {
    margin-top: 14px;
  }

  .question-group {
    margin-top: 22px;
  }
}

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