:root {
  --navy: #130c39;
  --navy-2: #130c39;
  --navy-3: #130c39;
  --green: #259e48;
  --green-bright: #259e48;
  --mint: rgba(37, 158, 72, 0.11);
  --mint-2: rgba(37, 158, 72, 0.055);
  --paper: #f6f7f4;
  --white: #ffffff;
  --ink: #17172a;
  --muted: #676778;
  --line: rgba(17, 16, 61, 0.12);
  --warning: #bf6a16;
  --danger: #b93e43;
  --shadow: 0 28px 90px rgba(17, 16, 61, 0.14);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.screening-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(410px, 41vw) minmax(0, 1fr);
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 10%, rgba(37, 174, 95, 0.08), transparent 25%),
    var(--paper);
}

.prototype-ribbon {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 16px 8px;
  border-radius: 0 0 14px 14px;
  background: rgba(17, 16, 61, 0.9);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.04em;
  backdrop-filter: blur(14px);
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 58px clamp(34px, 4vw, 72px) 38px;
  background:
    radial-gradient(circle at 95% 8%, rgba(68, 207, 120, 0.24), transparent 30%),
    radial-gradient(circle at 0 82%, rgba(64, 55, 158, 0.5), transparent 44%),
    var(--navy);
  color: white;
}

.brand-panel::after {
  position: absolute;
  right: -170px;
  bottom: -220px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 55px rgba(255, 255, 255, 0.025),
    0 0 0 120px rgba(255, 255, 255, 0.018);
  content: "";
  pointer-events: none;
}

.brand-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-surface {
  width: min(245px, 66%);
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.14);
}

.logo-surface img {
  width: 100%;
  height: auto;
}

.private-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 650;
}

.private-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #55dc87;
  box-shadow: 0 0 0 5px rgba(85, 220, 135, 0.12);
}

.brand-story {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: clamp(60px, 8vh, 110px) 0 42px;
}

.mini-label,
.tool-eyebrow {
  margin: 0 0 18px;
  color: #76dda0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-story h2 {
  max-width: 590px;
  margin: 0 0 24px;
  font-size: clamp(40px, 4.2vw, 66px);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 1;
}

.brand-story > p:last-child {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.69);
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.6;
}

.brand-photo {
  position: relative;
  z-index: 2;
  min-height: 290px;
  margin-top: auto;
}

.brand-photo > img {
  width: 100%;
  height: clamp(260px, 30vh, 390px);
  border-radius: 34px;
  object-fit: cover;
  object-position: center 44%;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
}

.photo-caption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(17, 16, 61, 0.78);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  backdrop-filter: blur(18px);
}

.photo-caption strong {
  color: white;
  font-size: 14px;
}

.caption-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--green);
  color: white;
  font-size: 18px;
  font-weight: 850;
}

.brand-trust {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 28px;
}

.brand-trust div {
  display: flex;
  flex-direction: column;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-trust strong {
  font-size: 22px;
  line-height: 1;
}

.brand-trust span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.tool-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 38px clamp(28px, 5vw, 100px) 46px;
}

.tool-header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: flex-end;
}

.mobile-brand {
  display: none;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.icon-button:hover {
  transform: rotate(5deg);
  background: white;
}

.icon-button span {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.welcome-screen,
.question-screen,
.result-screen {
  width: min(780px, 100%);
  margin: auto;
  padding: 50px 0;
  animation: screen-enter 440ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

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

.welcome-orbit {
  position: relative;
  display: grid;
  width: 88px;
  height: 88px;
  margin-bottom: 38px;
  place-items: center;
}

.welcome-orbit::before,
.welcome-orbit::after,
.orbit-one,
.orbit-two {
  position: absolute;
  border: 1px solid rgba(22, 139, 71, 0.18);
  border-radius: 50%;
  content: "";
}

.welcome-orbit::before {
  inset: 0;
  background: var(--mint);
}

.welcome-orbit::after {
  inset: -10px;
}

.orbit-one {
  inset: -20px;
}

.orbit-two {
  inset: -30px;
}

.welcome-orbit b {
  z-index: 1;
  color: var(--green);
  font-size: 32px;
}

.tool-eyebrow {
  color: var(--green);
}

.welcome-screen h1,
.question-copy h1,
.result-screen h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(48px, 5.1vw, 78px);
  font-weight: 640;
  letter-spacing: -0.058em;
  line-height: 0.99;
}

.welcome-copy,
.question-copy > p:last-child,
.result-description {
  max-width: 690px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.62;
}

.welcome-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 40px 0 32px;
}

.welcome-points > div {
  min-height: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.welcome-points > div > span {
  color: var(--green);
  font-size: 11px;
  font-weight: 820;
}

.welcome-points p {
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.welcome-points strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 14px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 780;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.primary-action {
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  box-shadow: 0 16px 38px rgba(22, 139, 71, 0.22);
}

.primary-action:hover:not(:disabled) {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--green) 82%, var(--navy));
  box-shadow: 0 20px 46px rgba(22, 139, 71, 0.28);
}

.primary-action:disabled {
  border-color: #d8d9d5;
  background: #e3e4e0;
  color: #999a96;
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-action {
  border: 1px solid var(--line);
  background: white;
  color: var(--navy);
}

.secondary-action:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 16, 61, 0.26);
}

.medical-note,
.clinical-review {
  max-width: 690px;
  margin: 22px 0 0;
  color: #898991;
  font-size: 11px;
  line-height: 1.55;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.back-button,
.restart-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 730;
  cursor: pointer;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.back-button span {
  color: var(--green);
  font-size: 18px;
}

.progress-track {
  height: 4px;
  margin: 16px 0 clamp(46px, 6vh, 80px);
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 16, 61, 0.09);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), rgba(37, 158, 72, 0.68));
  transition: width 360ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.question-copy h1 {
  max-width: 730px;
  font-size: clamp(42px, 4.4vw, 67px);
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 40px;
}

.option-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  min-height: 82px;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.77);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.option-card:hover {
  transform: translateX(4px);
  border-color: rgba(22, 139, 71, 0.35);
  background: white;
  box-shadow: 0 12px 36px rgba(17, 16, 61, 0.07);
}

.option-card.selected {
  border-color: rgba(22, 139, 71, 0.55);
  background: var(--mint-2);
  box-shadow: 0 12px 38px rgba(22, 139, 71, 0.09);
}

.option-index,
.option-check {
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 11px;
  font-weight: 830;
}

.option-check {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(22, 139, 71, 0.08);
  font-size: 16px;
}

.selected .option-check {
  background: var(--green);
  color: white;
}

.option-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.option-text strong {
  color: var(--navy);
  font-size: 15px;
  line-height: 1.35;
}

.option-text small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.question-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 30px;
}

.question-actions > span {
  max-width: 350px;
  color: #8a8a93;
  font-size: 10px;
  line-height: 1.45;
}

.result-screen {
  max-width: 760px;
}

.result-icon {
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 34px;
  place-items: center;
  border-radius: 24px;
  background: var(--mint);
  color: var(--green);
  font-size: 30px;
  font-weight: 850;
  box-shadow: 0 18px 46px rgba(22, 139, 71, 0.12);
}

.result-attention .result-icon {
  background: #fff2e1;
  color: var(--warning);
  box-shadow: 0 18px 46px rgba(191, 106, 22, 0.1);
}

.result-urgent .result-icon {
  background: #fdebec;
  color: var(--danger);
  box-shadow: 0 18px 46px rgba(185, 62, 67, 0.1);
}

.result-personal .result-icon {
  background: #ecebfb;
  color: var(--navy-3);
}

.result-screen h1 {
  font-size: clamp(44px, 4.6vw, 70px);
}

.route-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 34px 0 22px;
  padding: 20px 22px;
  border: 1px solid rgba(22, 139, 71, 0.2);
  border-radius: 20px;
  background: var(--mint-2);
}

.result-attention .route-summary {
  border-color: rgba(191, 106, 22, 0.22);
  background: #fff8ee;
}

.result-urgent .route-summary {
  border-color: rgba(185, 62, 67, 0.22);
  background: #fff6f6;
}

.route-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.route-summary strong {
  color: var(--navy);
  font-size: 18px;
}

.result-steps {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.result-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.result-steps li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--green);
  font-size: 11px;
  font-weight: 820;
}

.result-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.result-actions {
  display: flex;
  gap: 12px;
}

.restart-link {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prototype-toast {
  position: fixed;
  z-index: 120;
  right: 24px;
  bottom: 24px;
  display: flex;
  max-width: 430px;
  flex-direction: column;
  gap: 3px;
  padding: 17px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(17, 16, 61, 0.94);
  color: white;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: toast-enter 240ms ease-out both;
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.prototype-toast strong {
  font-size: 13px;
}

.prototype-toast span {
  color: rgba(255, 255, 255, 0.67);
  font-size: 11px;
}

@media (max-width: 1180px) {
  .screening-shell {
    grid-template-columns: minmax(350px, 37vw) minmax(0, 1fr);
  }

  .brand-panel {
    padding-right: 36px;
    padding-left: 36px;
  }

  .private-badge {
    display: none;
  }

  .brand-story h2 {
    font-size: clamp(38px, 4.7vw, 54px);
  }

  .welcome-points {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .welcome-points > div {
    display: grid;
    grid-template-columns: 32px 1fr;
    min-height: auto;
    align-items: start;
    gap: 10px;
    padding: 13px 15px;
  }

  .welcome-points p {
    margin: 0;
  }
}

@media (max-width: 820px) {
  .screening-shell {
    display: block;
    min-height: 100svh;
    overflow: visible;
  }

  .prototype-ribbon {
    position: absolute;
    width: max-content;
    max-width: calc(100vw - 30px);
    text-align: center;
  }

  .brand-panel {
    display: none;
  }

  .tool-panel {
    min-height: 100svh;
    padding: 44px 20px 28px;
  }

  .tool-header {
    min-height: 64px;
    justify-content: space-between;
  }

  .mobile-brand {
    display: block;
    width: 205px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
  }

  .mobile-brand img {
    width: 100%;
  }

  .welcome-screen,
  .question-screen,
  .result-screen {
    margin-top: 14px;
    padding: 34px 0 24px;
  }

  .welcome-orbit {
    width: 72px;
    height: 72px;
    margin-bottom: 34px;
  }

  .welcome-screen h1,
  .question-copy h1,
  .result-screen h1 {
    font-size: clamp(42px, 12vw, 58px);
  }

  .welcome-copy,
  .question-copy > p:last-child,
  .result-description {
    margin-top: 22px;
    font-size: 17px;
  }

  .welcome-points {
    margin: 30px 0 25px;
  }

  .welcome-screen > .primary-action {
    width: 100%;
  }

  .progress-track {
    margin-bottom: 52px;
  }

  .option-card {
    min-height: 78px;
    grid-template-columns: 34px 1fr 38px;
    padding: 12px;
    border-radius: 18px;
  }

  .option-card:hover {
    transform: none;
  }

  .question-actions {
    position: sticky;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    margin: 24px -10px -16px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(246, 247, 244, 0.94);
    backdrop-filter: blur(18px);
  }

  .question-actions .primary-action {
    width: 100%;
  }

  .question-actions > span {
    display: block;
    margin: 8px auto 0;
    text-align: center;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions button {
    width: 100%;
  }

  .prototype-toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
}

@media (max-width: 390px) {
  .tool-panel {
    padding-right: 16px;
    padding-left: 16px;
  }

  .mobile-brand {
    width: 178px;
  }

  .welcome-screen h1,
  .question-copy h1,
  .result-screen h1 {
    font-size: 40px;
  }

  .option-text strong {
    font-size: 14px;
  }

  .option-text small {
    font-size: 11px;
  }
}

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