:root {
  --olive: #6b7f3a;
  --olive-dark: #55652f;
  --choice-accent: #2f4a43;
  --choice-accent-soft: rgba(47, 74, 67, 0.14);
  --choice-bg: rgba(243, 244, 241, 0.78);
  --choice-key-border: rgba(47, 74, 67, 0.28);
  --text: #1a1d18;
  --muted: #5b6357;
  --muted-soft: #798175;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --stroke: rgba(107, 127, 58, 0.2);
  --stroke-strong: rgba(107, 127, 58, 0.45);
  --danger: #bf2a2a;
  --shadow: 0 12px 38px rgba(40, 46, 34, 0.1);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background: #f6f7f4;
  overflow-x: hidden;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      155deg,
      rgba(248, 249, 247, 0.56) 0%,
      rgba(248, 249, 247, 0.48) 50%,
      rgba(248, 249, 247, 0.56) 100%
    ),
    url("./alyssa-hurley-yekIZ4ltv1o-unsplash.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -1;
}

.quiz-shell {
  min-height: 100svh;
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 10px 14px 24px;
  display: flex;
  flex-direction: column;
}

.progress-shell {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 8px 0 12px;
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted-soft);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.progress-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(107, 127, 58, 0.15);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--olive), #82994a);
  transition: width 350ms ease;
}

.welcome-logo {
  width: 58px;
  height: auto;
  display: block;
  margin-bottom: 20px;
}

.screen {
  flex: 1;
  display: grid;
  align-items: center;
  min-height: calc(100svh - 146px);
}

.screen.is-booking-screen {
  align-items: flex-start;
}

.content-wrap {
  width: min(100%, 650px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: screen-in 380ms ease;
}

.screen.is-booking-screen .content-wrap {
  animation: none;
  transform: none;
}

.content-wrap.center {
  text-align: center;
  align-items: center;
}

.title {
  margin: 0;
  font-size: clamp(1rem, 3vw, 1.5rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  font-size: clamp(0.84rem, 2vw, 1rem);
  line-height: 1.4;
  color: var(--muted);
  max-width: 700px;
}

.trust-badges {
  list-style: none;
  margin: 8px 0 2px;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 6px;
  max-width: 620px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.trust-badges::-webkit-scrollbar {
  display: none;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(107, 127, 58, 0.28);
  background: rgba(255, 255, 255, 0.8);
  color: #2f3b27;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.1;
  box-shadow: 0 6px 14px rgba(40, 46, 34, 0.08);
  white-space: nowrap;
}

.trust-badge-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(107, 127, 58, 0.58);
  background: rgba(107, 127, 58, 0.15);
  position: relative;
  flex: 0 0 auto;
}

.trust-badge-icon::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 4px;
  width: 3px;
  height: 6px;
  border-right: 1.5px solid #445229;
  border-bottom: 1.5px solid #445229;
  transform: rotate(38deg);
}

.disclaimer {
  margin: -4px 0 2px;
  color: var(--muted-soft);
  font-size: 0.85rem;
  line-height: 1.45;
}

.prompt {
  margin: 12px 0 0;
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 600;
}

.options {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.option {
  border: 1px solid rgba(47, 74, 67, 0.12);
  border-radius: 14px;
  background: var(--choice-bg);
  color: #2d3531;
  text-align: left;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease,
    box-shadow 180ms ease;
}

.option:hover,
.option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(47, 74, 67, 0.32);
  outline: none;
  box-shadow: 0 8px 18px rgba(31, 36, 26, 0.08);
}

.option.is-selected {
  border-color: var(--choice-accent);
  background: rgba(242, 245, 242, 0.92);
  color: #21332d;
  box-shadow: inset 0 0 0 1px rgba(47, 74, 67, 0.2);
}

.option-key {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--choice-key-border);
  color: var(--choice-accent);
  background: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.option-text {
  display: inline-block;
  line-height: 1.2;
}

.option.is-selected .option-key {
  background: var(--choice-accent);
  border-color: var(--choice-accent);
  color: #ffffff;
}

.option.is-selected .option-text {
  color: #273d35;
}

.btn {
  border: 0;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 15px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, background 180ms ease, opacity 180ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:focus-visible {
  outline: 2px solid rgba(107, 127, 58, 0.3);
  outline-offset: 1px;
}

.btn-primary {
  background: var(--olive);
  color: #fff;
  align-self: flex-start;
}

.content-wrap.center .btn-primary {
  align-self: center;
}

.btn-primary:hover {
  background: var(--olive-dark);
  transform: translateY(-1px);
}

.btn-primary.is-disabled,
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

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

.iti {
  width: 100%;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--surface-strong);
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 4px rgba(107, 127, 58, 0.14);
}

.error {
  margin: 0;
  min-height: 20px;
  font-size: 0.93rem;
  color: var(--danger);
}

.free-banner {
  background: rgba(107, 127, 58, 0.14);
  color: #2b341a;
  border: 1px solid rgba(107, 127, 58, 0.3);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 600;
}

.transition-wrap {
  min-height: 260px;
  justify-content: center;
}

.matching-loader {
  width: 108px;
  height: 108px;
  position: relative;
}

.matching-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(107, 127, 58, 0.24);
}

.ring-outer {
  animation: ring-soft-pulse 1800ms ease-in-out infinite;
}

.ring-mid {
  inset: 16px;
  border-color: rgba(107, 127, 58, 0.34);
  animation: ring-soft-pulse 1800ms ease-in-out infinite 180ms;
}

.matching-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(160deg, #7e9648, #5f7431);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 16px rgba(107, 127, 58, 0.36);
  animation: dot-breathe 1400ms ease-in-out infinite;
}

.confetti-shell {
  width: min(100%, 360px);
  height: 84px;
  position: relative;
  margin-bottom: 2px;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 14px;
  border-radius: 999px;
  opacity: 0.88;
  animation: confetti-drift 1550ms ease-in-out forwards;
}

.confetti-piece.c1 {
  left: 12%;
  background: rgba(107, 127, 58, 0.34);
  animation-delay: 0ms;
}

.confetti-piece.c2 {
  left: 27%;
  background: rgba(79, 99, 55, 0.3);
  animation-delay: 80ms;
}

.confetti-piece.c3 {
  left: 43%;
  background: rgba(129, 147, 86, 0.31);
  animation-delay: 150ms;
}

.confetti-piece.c4 {
  left: 57%;
  background: rgba(79, 99, 55, 0.28);
  animation-delay: 110ms;
}

.confetti-piece.c5 {
  left: 73%;
  background: rgba(107, 127, 58, 0.32);
  animation-delay: 210ms;
}

.confetti-piece.c6 {
  left: 86%;
  background: rgba(129, 147, 86, 0.28);
  animation-delay: 50ms;
}

.therapist-wrap {
  max-width: 470px;
}

.card-stack-shell {
  height: 470px;
  margin-top: 8px;
}

.card-stack {
  position: relative;
  height: 100%;
}

.therapist-card {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 280ms ease, opacity 280ms ease;
  touch-action: pan-y;
}

.therapist-card.is-top {
  z-index: 5;
}

.therapist-card.is-second {
  transform: translateY(14px) scale(0.985);
  opacity: 0.82;
  z-index: 4;
}

.therapist-card.is-third {
  transform: translateY(24px) scale(0.97);
  opacity: 0.7;
  z-index: 3;
}

.therapist-card.is-hidden {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.card-photo {
  height: 160px;
  width: 100%;
  object-fit: cover;
  background: #d9ddd1;
}

.card-body {
  padding: 10px;
  display: grid;
  gap: 6px;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge.top-match {
  background: rgba(107, 127, 58, 0.16);
  color: #2f391c;
}

.badge.mode {
  background: rgba(50, 64, 104, 0.09);
  color: #2f3f60;
}

.name {
  margin: 0;
  font-size: 1rem;
}

.meta,
.quote {
  margin: 0;
  color: #556051;
  font-size: 0.82rem;
  line-height: 1.35;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border-radius: 999px;
  border: 1px solid rgba(107, 127, 58, 0.26);
  padding: 3px 8px;
  font-size: 0.66rem;
  color: #334020;
  background: rgba(107, 127, 58, 0.08);
}

.book-btn {
  width: 100%;
  margin-top: 4px;
}

.swipe-note {
  margin: 0;
  color: var(--muted-soft);
  text-align: center;
  font-size: 0.78rem;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.intake-wrap {
  gap: 14px;
}

.intake-embed-shell {
  width: min(100%, 406px);
  min-height: 500px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(107, 127, 58, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

.intake-embed-frame {
  width: 100%;
  min-height: 500px;
  border: none;
  overflow: auto;
  display: block;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(107, 127, 58, 0.28);
  transition: transform 180ms ease, background 180ms ease;
}

.dot.is-active {
  transform: scale(1.2);
  background: var(--olive);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ring-soft-pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.04);
    opacity: 0.95;
  }
}

@keyframes dot-breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0.72;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 1;
  }
}

@keyframes confetti-drift {
  0% {
    transform: translateY(26px) rotate(0deg);
    opacity: 0;
  }

  25% {
    opacity: 0.9;
  }

  100% {
    transform: translateY(0) rotate(18deg);
    opacity: 0;
  }
}

@media (min-width: 760px) {
  .quiz-shell {
    padding-top: 10px;
  }

  .options {
    max-width: 560px;
  }

  .content-wrap {
    gap: 12px;
  }

  .screen {
    min-height: calc(100svh - 94px);
  }
}

@media (max-width: 640px) {
  .quiz-shell {
    padding: 8px 12px 20px;
  }

  .screen {
    align-items: center;
    min-height: calc(100svh - 84px);
    padding-top: 0;
  }

  .content-wrap {
    width: 100%;
  }

  .subtitle {
    max-width: none;
  }

  .trust-badges {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    padding-bottom: 2px;
  }

  .bg-overlay {
    background-size: cover;
    background-position: center center;
  }
}

@media (max-width: 420px) {
  .title {
    font-size: 1.05rem;
  }

  .subtitle {
    font-size: 0.86rem;
  }

  .card-stack-shell {
    height: 450px;
  }

}
