﻿:root {
  --page-bg: #f5f5f5;
  --ink: #0a0908;
  --navy: #0d2c5b;
  --mint: #80d9ac;
  --mint-dark: #2f986c;
  --white: #ffffff;
  --line: #eaeaeb;
  --green: #218b19;
  --muted: #555;
  --link: #38537a;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 67px;
  background: #f7f7f7;
}

.header-inner {
  position: relative;
  width: min(800px, 100%);
  height: 67px;
  margin: 0 auto;
}

.brand-logo {
  position: absolute;
  top: 12px;
  left: 50%;
  display: flex;
  height: 42px;
  align-items: center;
  transform: translateX(-50%);
  color: var(--navy);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -2.8px;
  line-height: 1;
  user-select: none;
}

.brand-symbol {
  position: relative;
  display: inline-block;
}

.brand-symbol::after {
  position: absolute;
  top: 17px;
  left: 9px;
  width: 7px;
  height: 10px;
  border-radius: 70% 30% 70% 30%;
  background: var(--mint-dark);
  content: "";
  transform: rotate(45deg);
}

.back-button {
  position: absolute;
  top: 23px;
  left: 10px;
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.67;
}

.back-button:hover {
  opacity: 1;
}

.back-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

#app {
  min-height: calc(100vh - 67px);
}

.screen {
  width: 100%;
  padding: 0 10px 10px;
  animation: screen-in 220ms ease both;
}

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

.screen-heading {
  width: min(800px, 100%);
  margin: 0 auto;
  padding-top: 20px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.screen-heading em {
  color: var(--navy);
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.screen-heading.small-heading {
  font-size: 24px;
}

.subtitle {
  width: min(600px, 100%);
  margin: 8px auto 0;
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
}

.copy-narrow {
  width: min(400px, 100%);
  margin: 0 auto;
  line-height: 1.35;
}

.intro-copy {
  padding-top: 13px;
  text-align: left;
}

.intro-copy p {
  margin: 14px 0;
}

.intro-start {
  width: min(400px, 100%);
  margin-top: 44px;
  margin-right: auto;
  margin-left: auto;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.consent-copy {
  width: min(800px, 100%);
  margin: 18px auto 0;
  line-height: 1.35;
  text-align: center;
}

.consent-copy p {
  margin: 0 0 13px;
}

.consent-copy a {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
}

.review-note {
  margin-top: 14px !important;
}

.options {
  display: grid;
  width: min(400px, 100%);
  margin: 20px auto 0;
  gap: 10px;
}

.intro-options {
  margin-top: 26px;
}

.option-card {
  position: relative;
  display: flex;
  min-height: 67px;
  margin: 0 10px;
  padding: 21.6px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  cursor: pointer;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.option-card:hover {
  border-color: #c9ced3;
}

.option-card:active {
  transform: scale(0.994);
}

.option-card.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.option-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.option-emoji {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
}

.option-label {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.18;
  text-align: left;
}

.selection-dot {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 1.5px solid #afb4b9;
  border-radius: 50%;
  background: transparent;
}

.option-card.selected .selection-dot {
  border-color: var(--white);
  background: var(--white);
}

.option-card.checkbox-card .selection-dot {
  border-radius: 5px;
}

.option-card.checkbox-card.selected .selection-dot::after {
  position: absolute;
  top: 3px;
  left: 6px;
  width: 6px;
  height: 11px;
  border: solid var(--navy);
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.intro-visual {
  display: block;
  width: min(400px, 100%);
  height: auto;
  margin: 20px auto 0;
  border-radius: 5px;
}

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

.image-option {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0 0 13px;
  border-radius: 12px;
}

.image-option .option-image {
  display: block;
  width: 100%;
  aspect-ratio: 0.94;
  object-fit: cover;
}

.image-option .option-label {
  display: block;
  padding: 12px 34px 0 12px;
  font-size: 13px;
  line-height: 1.28;
}

.image-option .selection-dot {
  position: absolute;
  right: 10px;
  bottom: 14px;
  width: 18px;
  height: 18px;
}

.continue-wrap {
  width: min(400px, 100%);
  margin: 20px auto 0;
  padding: 0 10px 25px;
}

.continue-button,
.submit-button {
  display: flex;
  width: 100%;
  min-height: 50px;
  padding: 13px 22px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 25px;
  background: var(--navy);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.continue-button:hover,
.submit-button:hover {
  background: #111d28;
}

.info-copy {
  width: min(560px, 100%);
  margin: 20px auto 0;
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
}

.info-copy p {
  margin: 0 0 16px;
}

.why-box {
  width: min(500px, calc(100% - 20px));
  margin: 18px auto 0;
  padding: 15px 17px;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #f9f9f9;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.why-box strong {
  display: block;
  margin-bottom: 5px;
}

.summary-page {
  width: min(800px, 100%);
  margin: 20px auto;
  padding: 20px 40px 40px;
  border: 2px solid #dcdcdc;
  border-radius: 10px;
}

.summary-page h3 {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.3;
  text-align: center;
}

.summary-hero-wrap {
  overflow: hidden;
  max-height: 300px;
  border-radius: 10px;
  background: var(--white);
}

.summary-hero {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.summary-warning {
  margin: 20px 0 10px;
  padding: 15px;
  border: 2px solid #e9dec8;
  border-radius: 10px;
  background: #fbf5eb;
  text-align: left;
}

.summary-warning-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #333;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.summary-warning-title .summary-icon {
  color: #d39e00;
}

.summary-warning p {
  margin: 10px 0 0;
  color: #555;
  font-size: 14px;
  line-height: 1.4;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  transform-origin: top left;
}

.summary-item {
  display: flex;
  min-height: 110px;
  padding: 0.9rem;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #f9f9f9;
}

.summary-item.full {
  grid-column: span 2;
}

.summary-icon {
  display: grid;
  flex: 0 0 2.4rem;
  width: 2.4rem;
  height: 2.4rem;
  margin-right: 1rem;
  place-items: center;
  border-radius: 50%;
  background: #ececec;
  font-size: 1.15rem;
}

.summary-content {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.summary-label {
  margin-bottom: 0.5rem;
  color: #777;
  font-size: 0.8rem;
}

.summary-value {
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.medical-note {
  width: min(650px, 100%);
  margin: 18px auto 0;
  color: #666;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.tracker-card {
  width: min(520px, 100%);
  margin: 20px auto 0;
  padding: 22px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
}

.tracker-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.3;
  text-align: center;
}

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

.tracker-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.35;
}

.tracker-list li::before {
  color: var(--navy);
  content: "➡️";
}

.loading-screen {
  width: min(400px, 100%);
  margin: 0 auto;
  padding-top: 20px;
}

.loading-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.35;
  text-align: center;
}

.loading-subtitle {
  margin: 16px 0 20px;
  line-height: 1.35;
  text-align: center;
}

.progress-row {
  margin-bottom: 18px;
}

.progress-label {
  display: flex;
  margin-bottom: 5px;
  justify-content: space-between;
  color: #333;
  font-size: 14px;
  line-height: 1.2;
}

.progress-track {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #e6e6e6;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: var(--mint-dark);
  transition: width 1.35s linear;
}

.submit-wrap {
  margin-top: 40px;
}

.submit-button {
  justify-content: space-between;
  text-decoration: none;
}

.submit-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.modal-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
}

.modal-card {
  width: min(400px, 100%);
  padding: 34px 20px 20px;
  border-radius: 5px;
  background: var(--white);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.modal-card p {
  margin: 0 auto 17px;
  font-size: 16px;
  line-height: 1.35;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.modal-actions button {
  min-width: 63px;
  margin: 10px;
  padding: 9px 20px;
  border: 0;
  border-radius: 5px;
  background: var(--mint-dark);
  color: #fff;
  cursor: pointer;
}

.loading-note {
  margin-top: 22px;
}

.noscript-message {
  padding: 40px 20px;
  text-align: center;
}

@media (max-width: 767px) {
  .screen-heading {
    font-size: 23px;
    line-height: 1.35;
  }

  .screen-heading.small-heading {
    font-size: 22px;
  }

  .intro-copy {
    padding-top: 8px;
  }

  .intro-copy p {
    margin: 11px 0;
  }

  .intro-start {
    margin-top: 46px;
  }

  .consent-copy {
    margin-top: 17px;
  }

  .intro-options {
    margin-top: 29px;
  }

  .summary-page {
    padding: 20px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-item,
  .summary-item.full {
    grid-column: auto;
  }

  .summary-value {
    font-size: 12px;
    line-height: 16px;
  }

  .loading-screen {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (max-width: 370px) {
  .image-options {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}
