/* Find my support — short intake quiz (MasterClass-inspired, FPA branding) */

.fpa-fms-page {
  background: #ffffff;
  color: var(--fpa-site-ink, #222222);
}

.fpa-fms {
  /* Tall stage matches the issues-step column so steps 2–3 stay the same height. */
  --fpa-fms-stage-h: 44rem;
  background: #111111;
  color: #ffffff;
  min-height: calc(100vh - 72px);
  padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 8vw, 96px);
}

.fpa-fms__shell {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

@media (min-width: 960px) {
  .fpa-fms__shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
    min-height: var(--fpa-fms-stage-h);
  }

  .fpa-fms:not(.is-results) .fpa-fms__copy {
    min-height: var(--fpa-fms-stage-h);
  }
}

.fpa-fms__progress {
  width: 3.5rem;
  height: 2px;
  margin: 0 0 1.25rem;
  background: rgb(255 255 255 / 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.fpa-fms__progress-fill {
  display: block;
  height: 100%;
  width: 33%;
  background: var(--fpa-site-yellow, #ff3a5e);
  transition: width 220ms ease;
}

.fpa-fms__title {
  margin: 0 0 0.75rem;
  font-family: var(--fpa-app-font-display, "Source Serif 4", Georgia, serif);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-wrap: balance;
}

.fpa-fms__lead {
  margin: 0 0 1.5rem;
  max-width: 40ch;
  font-size: 1rem;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.72);
}

.fpa-fms__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.fpa-fms__option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: #1a1a1a;
  color: #ffffff;
  font: inherit;
  font-size: 0.975rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease;
}

.fpa-fms__option:hover {
  background: #222222;
}

.fpa-fms__option.is-selected {
  background: color-mix(in srgb, var(--fpa-site-yellow, #ff3a5e) 16%, #1a1a1a);
}

.fpa-fms__option:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.fpa-fms__check {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgb(255 255 255 / 0.45);
  border-radius: 6px;
  background: transparent;
}

.fpa-fms__option.is-selected .fpa-fms__check {
  border-color: var(--fpa-site-yellow, #ff3a5e);
  background: var(--fpa-site-yellow, #ff3a5e);
  color: #ffffff;
}

.fpa-fms__check .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 20;
}

.fpa-fms__option.is-selected .fpa-fms__check .material-symbols-outlined {
  opacity: 1;
}

.fpa-fms__option-label {
  flex: 1 1 auto;
  min-width: 0;
}

.fpa-fms__choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 1.25rem;
}

.fpa-fms__choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: #1a1a1a;
  color: #ffffff;
  font: inherit;
  font-size: 0.975rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease;
}

.fpa-fms__choice:hover,
.fpa-fms__choice.is-selected {
  background: color-mix(in srgb, var(--fpa-site-yellow, #ff3a5e) 16%, #1a1a1a);
}

.fpa-fms__choice:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.fpa-fms__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.fpa-fms__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.35rem;
  border: none;
  border-radius: 10px;
  background: var(--fpa-site-yellow, #ff3a5e);
  color: #ffffff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, opacity 160ms ease;
}

.fpa-fms__btn:hover {
  background: var(--fpa-site-yellow-hover, #db3251);
  color: #ffffff;
}

.fpa-fms__btn:disabled,
.fpa-fms__btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.fpa-fms__btn--ghost {
  background: transparent;
  border: 1px solid rgb(255 255 255 / 0.28);
  color: #ffffff;
}

.fpa-fms__btn--ghost:hover {
  background: rgb(255 255 255 / 0.06);
  color: #ffffff;
}

.fpa-fms__btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.fpa-fms.is-results .fpa-fms__shell {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
  min-height: 0;
}

.fpa-fms.is-results .fpa-fms__visual {
  display: none;
}

.fpa-fms.is-results .fpa-fms__progress {
  display: none;
}

.fpa-fms__loading {
  display: grid;
  place-items: center;
  min-height: 14rem;
  padding: 2rem 0;
}

.fpa-fms__loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid rgb(255 255 255 / 0.18);
  border-top-color: var(--fpa-site-peach, #ff3a5e);
  border-radius: 50%;
  animation: fpa-fms-spin 0.7s linear infinite;
}

@keyframes fpa-fms-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fpa-fms__loading-spinner {
    animation: none;
    border-top-color: rgb(255 255 255 / 0.55);
  }
}

.fpa-fms__matches {
  margin: 0 0 1.25rem;
}

.fpa-fms__matches-status {
  margin: 0;
  padding: 1rem 0;
  color: rgb(255 255 255 / 0.72);
  line-height: 1.5;
}

.fpa-fms__matches-status a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.fpa-fms__matches-count {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgb(255 255 255 / 0.62);
}

.fpa-fms__matches-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fpa-fms__match {
  margin: 0;
  border-radius: 14px;
  background: #1a1a1a;
  overflow: hidden;
}

.fpa-fms__match-hit {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease;
}

.fpa-fms__match-hit:hover {
  background: #222222;
}

.fpa-fms__match-hit:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
}

.fpa-fms__match-photo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 18%;
  background: #2a2a2a;
}

.fpa-fms__match-photo--ini {
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 650;
  color: #ffffff;
}

.fpa-fms__match-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.fpa-fms__match-name {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  color: #ffffff;
}

.fpa-fms__match-place,
.fpa-fms__match-meta {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: rgb(255 255 255 / 0.62);
}

.fpa-fms__match-cta {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fpa-site-peach, #ff3a5e);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .fpa-fms__match-hit {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .fpa-fms__match-photo {
    width: 64px;
    height: 64px;
  }

  .fpa-fms__match-cta {
    display: none;
  }
}

.fpa-fms__note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgb(255 255 255 / 0.55);
}

.fpa-fms__noscript {
  margin: 1rem 0 0;
  color: rgb(255 255 255 / 0.75);
}

.fpa-fms__noscript a {
  color: #ffffff;
}

.fpa-fms__visual {
  display: none;
}

@media (min-width: 960px) {
  .fpa-fms__visual {
    display: block;
    position: relative;
    align-self: start;
    width: 100%;
    height: var(--fpa-fms-stage-h);
    min-height: var(--fpa-fms-stage-h);
    max-height: var(--fpa-fms-stage-h);
    overflow: hidden;
  }
}

.fpa-fms__marquee {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000 14%,
    #000 86%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000 14%,
    #000 86%,
    transparent 100%
  );
}

.fpa-fms__rail {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

.fpa-fms__rail-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  will-change: transform;
}

.fpa-fms__rail--up .fpa-fms__rail-track {
  animation: fpa-fms-marquee-up 72s linear infinite;
}

.fpa-fms__rail--down .fpa-fms__rail-track {
  animation: fpa-fms-marquee-down 84s linear infinite;
}

.fpa-fms__shot {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
  border: none;
  border-radius: 14px;
  background: #222222;
  flex: 0 0 auto;
}

@keyframes fpa-fms-marquee-up {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

@keyframes fpa-fms-marquee-down {
  from {
    transform: translateY(-50%);
  }
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fpa-fms__rail--up .fpa-fms__rail-track,
  .fpa-fms__rail--down .fpa-fms__rail-track {
    animation: none;
  }

  .fpa-fms__rail--down .fpa-fms__rail-track {
    transform: none;
  }
}

