:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --ink: #1b3a56;
  --ink-soft: #4f657d;
  --line: #d8e1e8;
  --brand-1: #2488cc;
  --brand-2: #2e9fd0;
  --brand-3: #32b8be;
  --ok: #1d7a49;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Lato", sans-serif;
  background: linear-gradient(180deg, #f4f9ff 0%, #f8fbff 42%, #ffffff 100%);
  color: var(--ink);
  font-size: 18px;
}

.app {
  min-height: 100vh;
  padding: 10px;
  display: grid;
  place-items: start center;
}

.shell {
  width: 100%;
  height: calc(100dvh - 20px);
  max-height: 860px;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(22, 47, 68, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.quiz-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 8px 12px 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.logo {
  width: 136px;
  max-width: 42vw;
  height: auto;
  display: block;
  margin-bottom: 4px;
}

.header-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #c7d9e8;
  background: #f5f9fd;
  color: #55718a;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}

.progress-wrap {
  width: 100%;
  height: 6px;
  background: #deecf6;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 9.1%;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-3));
  box-shadow: 0 0 10px rgba(45, 166, 207, 0.4);
  transition: width 260ms ease;
}

.content {
  padding: 14px 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.content.landing-layout {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding-top: 10px;
  padding-bottom: 12px;
}

.content.trust-layout {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.content.is-advancing {
  opacity: 0.85;
  transform: translateY(2px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.content.is-entering > article {
  animation: stepSlide 300ms ease;
}

.kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  line-height: 1.2;
  font-family: "Nunito Sans", sans-serif;
}

h1 {
  font-size: 1.85rem;
}

h2 {
  font-size: 1.56rem;
}

h3 {
  font-size: 1.2rem;
}

.lead {
  margin: 0 0 10px;
  color: var(--ink-soft);
  line-height: 1.58;
  font-size: 1.2rem;
}

.hero {
  background: linear-gradient(110deg, var(--brand-1), var(--brand-2));
  border-radius: 18px;
  color: #fff;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(35, 133, 196, 0.28);
}

.hero-entry {
  animation: heroFadeIn 300ms ease;
}

.hero .lead,
.hero .micro-proof,
.hero .micro-note {
  color: rgba(255, 255, 255, 0.95);
}

.micro-proof {
  margin: 0 0 10px;
  font-size: 1rem;
}

.landing-trust {
  margin: 18px 0 0;
  text-align: center;
  color: #6b8198;
  font-size: 0.84rem;
  line-height: 1.3;
}

.landing-authority {
  margin: 22px 0 24px;
  text-align: center;
  color: #5e748a;
  font-size: 0.8rem;
  line-height: 1.45;
}

.landing-benefits {
  margin-top: 0;
  border: 1px solid #dbe8f2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 16px 15px;
}

.landing-benefits-title {
  margin: 0 0 10px;
  color: #6a8299;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.landing-benefits-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.landing-benefits-list li {
  position: relative;
  padding-left: 20px;
  color: #375871;
  font-size: 17px;
  line-height: 1.45;
}

.landing-benefits-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #3197c8;
  font-size: 0.85rem;
  font-weight: 800;
}

.micro-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
}

.helper {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.5;
}

.option-list,
.scale-list,
.badges,
.proof-list {
  display: grid;
  gap: 10px;
}

.choice {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d3e2ee;
  border-radius: 16px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 1.02rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(34, 80, 119, 0.06);
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

.choice.selected {
  border-color: #6dbdd4;
  background: linear-gradient(90deg, #e8f8ff, #e9fbf7);
  box-shadow: 0 8px 18px rgba(48, 155, 204, 0.2);
}

.choice:active {
  transform: translateY(1px);
}

.choice:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(34, 80, 119, 0.12);
}

.scale-list {
  grid-template-columns: 1fr;
}

.scale {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  padding-right: 16px;
}

.scale-labels {
  display: none;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.scale-num {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e6f1f8;
  color: #3c5f7d;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}

.age-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.trust-card,
.result-card,
.loader-card {
  border: 1px solid #d8e5ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(28, 74, 112, 0.08);
  padding: 14px;
}

.trust-bridge-card {
  border: 1px solid #d8e5ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(28, 74, 112, 0.08);
  padding: 14px;
}

.trust-bridge-title {
  margin: 0 0 8px;
  font-size: 1.55rem;
  line-height: 1.22;
  color: #1f3f5d;
}

.trust-bridge-subline {
  margin: 0 0 12px;
  color: #4f657d;
  font-size: 1rem;
  line-height: 1.45;
}

.trust-bridge-brand {
  margin: 0 0 8px;
  color: #4f657d;
  font-size: 1rem;
  line-height: 1.45;
}

.trust-strip {
  margin: 0 0 12px;
  border-radius: 14px;
  background: #f8fcff;
  padding: 10px;
}

.trust-strip-label {
  margin: 0 0 8px;
  text-align: center;
  color: #6a8298;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.trust-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.trust-logos img {
  height: 30px;
  width: auto;
  max-width: 22%;
  object-fit: contain;
  filter: grayscale(1) saturate(0) contrast(1.02) brightness(0.88);
  opacity: 0.84;
}

.micro-testimonial {
  border: 1px solid #d9e7f2;
  border-radius: 14px;
  background: #fbfdff;
  padding: 10px;
}

.micro-testimonials {
  display: grid;
  gap: 8px;
}

.micro-rating {
  margin: 0 0 6px;
  color: #2e9fd0;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
}

.micro-rating span {
  color: #5e748a;
  font-size: 0.82rem;
  margin-left: 6px;
}

.micro-quote {
  margin: 0 0 6px;
  color: #2a4b66;
  font-size: 0.98rem;
  line-height: 1.42;
}

.micro-author {
  margin: 0;
  color: #647c92;
  font-size: 0.86rem;
}

.result-v2 {
  border: 0;
  background: transparent;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom));
}

.result-hero {
  background: linear-gradient(145deg, #ffffff, #f2fbff);
  border: 1px solid #d6e8f5;
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 14px;
}

.result-v2 .primary-card {
  border-color: #d7e7f2;
  background: #f8fcff;
}

.result-v2 .primary-card h3 {
  margin-bottom: 10px;
}

.result-v2 .soft-card.primary-card + .soft-card.primary-card {
  margin-top: 14px;
}

.more-details {
  margin-top: 14px;
}

.more-details-label {
  margin: 0 0 8px;
  color: #6e8397;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.collapse-light {
  border-color: #e3edf5;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  padding: 9px 11px;
  margin-bottom: 6px;
}

.collapse-light summary {
  font-size: 1rem;
}

.more-details .collapse:last-child {
  margin-bottom: 0;
}

.score-meter {
  margin: 18px 0 14px;
}

.score-meter-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.score-label {
  color: #5f7387;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

.score-value strong {
  font-size: 1.35rem;
  color: #2a4a66;
  font-weight: 800;
}

.score-value small {
  margin-top: 2px;
  color: #5b7389;
  font-size: 0.78rem;
  font-weight: 600;
}

.score-helper {
  margin: 2px 0 8px;
  color: #4f6f82;
  font-size: 0.86rem;
  line-height: 1.4;
}

.score-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ebf7f8 0%, #e4f3f5 100%);
  border: 1px solid #cbe4e7;
  overflow: hidden;
}

.score-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2aa3a0, #2bb6ad, #35c6b4);
  box-shadow: 0 0 10px rgba(46, 170, 157, 0.32);
  transition: width 420ms ease;
}

.score-reassurance {
  margin: 16px 0 0;
  color: #3f5e78;
  font-size: 1.06rem;
  line-height: 1.62;
}

.result-explainer {
  margin: 14px 0 0;
  color: #2f4d67;
  font-size: 1.06rem;
  line-height: 1.62;
}

.soft-card {
  border: 1px solid #dbe8f3;
  border-radius: 16px;
  background: #f8fcff;
  padding: 12px;
  margin-bottom: 8px;
}

.icon-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.icon-list li {
  position: relative;
  padding-left: 24px;
  line-height: 1.62;
  font-size: 1.06rem;
}

.icon-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-3));
  transform: translateY(-50%);
}

.collapse {
  border: 1px solid #dbe7f1;
  border-radius: 16px;
  padding: 10px 12px;
  background: #fff;
  margin-bottom: 8px;
}

.collapse summary {
  cursor: pointer;
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}

.collapse summary::-webkit-details-marker {
  display: none;
}

.collapse summary::after {
  content: "+";
  float: right;
  font-weight: 700;
  color: #68839a;
}

.collapse[open] summary::after {
  content: "-";
}

.collapse .icon-list {
  margin-top: 10px;
}

.trust-card ul,
.proof-list {
  margin: 0;
  padding-left: 18px;
}

.trust-card li,
.proof-list li {
  margin-bottom: 8px;
  line-height: 1.62;
  font-size: 1.06rem;
}

.badges {
  margin: 12px 0 0;
  grid-template-columns: 1fr;
}

.badges-inline {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.badge {
  border: 1px solid #cbe0ee;
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 14px;
  background: #f1f9ff;
  font-size: 0.96rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.loader-line {
  margin: 0;
  font-weight: 700;
  min-height: 24px;
  font-size: 1.08rem;
}

.loader-steps {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.loader-step {
  min-height: 44px;
  border: 1px solid #dce8f2;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5f758a;
  background: #ffffff;
}

.loader-step.done {
  color: #1f5f8d;
  border-color: #bcd7ea;
  background: #f3f9fd;
}

.loader-check {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #c7d9e8;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  color: #2e7fb7;
  flex: 0 0 20px;
}

.loader-progress {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: #deecf6;
  overflow: hidden;
}

.loader-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-3));
  transition: width 500ms ease;
}

.mini-qs {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.mini-q {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.mini-q p {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.yes-no {
  display: flex;
  gap: 8px;
}

.yes-no button {
  flex: 1;
}

.cta-note {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.result-sticky {
  position: sticky;
  bottom: 0;
  margin-top: 18px;
  border-top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), #f8fbfe 28%);
  padding: 4px 0 6px;
  z-index: 5;
}

.cta-bridge {
  margin: 0 0 12px;
  color: #3c5a74;
  font-size: 1.03rem;
  line-height: 1.56;
}

.result-cta {
  width: 100%;
  box-shadow: 0 10px 22px rgba(28, 116, 178, 0.28);
  animation: softPulse 2.2s ease-in-out infinite;
}

.review-note {
  margin: 10px 0 8px;
  color: #637b90;
  font-size: 0.82rem;
}

.review-item {
  border: 1px solid #e5edf4;
  border-radius: 12px;
  background: #fdfefe;
  padding: 9px;
  margin-bottom: 7px;
}

.review-stars {
  margin: 0 0 6px;
  color: #2f9ccf;
  letter-spacing: 0.02em;
}

.review-quote {
  margin: 0 0 6px;
  color: #2e4e68;
  line-height: 1.5;
  font-size: 1rem;
}

.review-author {
  margin: 0;
  color: #5f778e;
  font-size: 0.84rem;
}

.footer-nav {
  border-top: 0;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.footer-disclaimer {
  width: min(100%, 800px);
  margin: 18px auto 0;
  padding: 0 14px;
  color: #6d8195;
  font-size: 0.68rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: left;
}

.footer-links {
  width: min(100%, 800px);
  margin: 10px auto calc(8px + env(safe-area-inset-bottom));
  padding: 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.footer-links a {
  color: #6d8195;
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.landing-footer-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.landing-footer-links a {
  color: #6d8195;
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn {
  min-height: 56px;
  border-radius: 999px;
  border: 0;
  padding: 13px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.btn-ghost {
  background: #edf3f8;
  color: #425a72;
  min-width: 84px;
  min-height: 48px;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 13px;
}

.btn-primary {
  flex: 1;
  color: #fff;
  background: linear-gradient(95deg, var(--brand-1), var(--brand-2), var(--brand-3));
  box-shadow: 0 8px 20px rgba(35, 145, 196, 0.24);
}

.btn-primary.entry-cta {
  animation: entryPulse 4.6s ease-in-out infinite;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.disclaimer {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.result-restart-link {
  appearance: none;
  display: block;
  margin: 16px auto 0;
  padding: 4px 8px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #6a8095;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.result-restart-link:hover {
  color: #526a81;
}

.medical-disclaimer {
  margin: 14px 0 0;
  color: #6d8195;
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hide {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 33, 43, 0.46);
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(18, 41, 61, 0.2);
}

.modal-card p {
  margin: 0 0 10px;
  line-height: 1.45;
  color: #355069;
}

@keyframes softPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.012);
  }
}

@keyframes stepSlide {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes entryPulse {
  0%,
  88%,
  100% {
    transform: scale(1);
  }
  94% {
    transform: scale(1.02);
  }
}

@media (min-width: 700px) {
  .app {
    padding: 16px;
    place-items: center;
  }

  .shell {
    max-width: 800px;
    height: calc(100dvh - 32px);
  }

  .quiz-header,
  .content,
  .footer-nav {
    padding-left: 18px;
    padding-right: 18px;
  }

  .result-cta {
    animation: none;
  }

  h1 {
    font-size: 2.2rem;
  }

  .badges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (min-width: 390px) {
  .landing-authority {
    white-space: nowrap;
  }
}
