@import url("/wellness-tokens.css");

/* Overa telehealth intake.
 *
 * The public quiz runs on the BRAND system, not the console's. It was importing
 * the console tokens wholesale, which put a teal #1a5f6b accent and Google-hosted
 * DM Sans / Fraunces on a public page: neither is in the four ratified colours
 * (bone / evergreen / amber / text), and third-party font loading is blocked by
 * our CSP and by the ruling that licensed faces are replaced with free
 * self-hosted ones.
 *
 * The console keeps its own look. These overrides are scoped to .hers-quiz.
 */
@font-face{font-family:'Archivo';font-style:normal;font-weight:400 700;font-display:swap;
  src:url('/fonts/archivo-latin.woff2') format('woff2');}
@font-face{font-family:'DM Serif Display';font-style:italic;font-weight:400;font-display:swap;
  src:url('/fonts/dmserifdisplay-italic-latin.woff2') format('woff2');}

.hers-quiz {
  --hq-bg: #F7F4EF;          /* bone */
  --hq-surface: #FFFFFF;
  --hq-ink: #1A1A1A;         /* text */
  --hq-muted: rgba(26, 26, 26, 0.68);
  --hq-line: rgba(31, 61, 51, 0.16);
  --hq-accent: #1F3D33;      /* evergreen */
  --hq-accent-hover: #162C25;
  --hq-accent-soft: rgba(31, 61, 51, 0.10);
  /* Rust, matching the logo. Replaced amber #D98E45, which failed WCAG AA on
     both grounds (2.42:1 on bone, 4.46:1 on evergreen) and so could never be
     anything but a fill. Rust is 4.61:1 on bone and can carry text. */
  --hq-cta: #B5502E;
  --hq-cta-hover: #9C4527;
  /* White on rust is 5.06:1 and passes; ink on rust is 3.44:1 and fails. */
  --hq-on-cta: #FFFFFF;
  --hq-success: #1F3D33;
  /* The quiz asks for an email and marks it required, with nothing in the
     palette to show an invalid entry. This is that colour. 4.96:1 on bone. */
  --hq-error: #C0392B;
  --hq-radius-pill: 40px;    /* the pill radius used everywhere else */
  --hq-radius-card: 20px;    /* the default surface radius */
  --hq-max: 440px;
  --hq-serif: "DM Serif Display", Georgia, serif;
  --hq-sans: "Archivo", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--hq-bg);
  color: var(--hq-ink);
  font-family: var(--hq-sans);
  font-size: 16px;
  line-height: 1.5;
}

/* Men's health flows — warmer clay accent on progress + selection */
.hers-quiz[data-theme="men"] {
  --hq-accent: var(--w-cta);
  --hq-accent-hover: var(--w-cta-hover);
  --hq-accent-soft: var(--w-cta-soft);
}

.hers-quiz__header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 1rem 1.25rem 0.5rem;
  max-width: calc(var(--hq-max) + 3rem);
  width: 100%;
  margin: 0 auto;
}

.hers-quiz__header-spacer {
  width: 40px;
}

.hers-quiz__logo {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 0;
}

.hers-quiz__logo-img {
  display: block;
  width: auto;
  height: 1.75rem;
}

.hers-quiz__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -0.5rem;
  background: none;
  border: none;
  border-radius: var(--hq-radius-pill);
  color: var(--hq-ink);
  cursor: pointer;
  transition: background 0.15s ease;
}

.hers-quiz__back:hover {
  background: color-mix(in srgb, var(--hq-accent) 8%, transparent);
}

.hers-quiz__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.25rem 0.25rem;
  max-width: calc(var(--hq-max) + 3rem);
  margin: 0 auto;
  width: 100%;
}

.hers-quiz__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--hq-radius-pill);
  background: var(--hq-line);
  transition: width 0.22s ease, background 0.22s ease;
}

.hers-quiz__dot.is-done {
  background: var(--hq-accent);
}

.hers-quiz__dot.is-active {
  width: 22px;
  background: var(--hq-accent);
}

.hers-quiz__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--hq-max);
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2rem;
}

.hers-quiz__panel {
  animation: hq-fade-in 0.22s ease-out;
}

@keyframes hq-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hers-quiz__panel {
    animation: none;
  }
  .hers-quiz__dot {
    transition: none;
  }
}

.hers-quiz__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.hers-quiz__chips--intro {
  margin-bottom: 1.75rem;
}

.hers-quiz__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hq-accent);
  background: var(--hq-accent-soft);
  border: 1px solid color-mix(in srgb, var(--hq-accent) 22%, transparent);
  border-radius: var(--hq-radius-pill);
  white-space: nowrap;
}

.hers-quiz__topic-chip {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hq-accent);
  background: var(--hq-surface);
  border: 1px solid color-mix(in srgb, var(--hq-accent) 25%, var(--hq-line));
  border-radius: var(--hq-radius-pill);
}

.hers-quiz__step-chip {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hq-muted);
  background: var(--hq-surface);
  border-radius: var(--hq-radius-pill);
  border: 1px solid var(--hq-line);
}

.hers-quiz__title {
  font-family: var(--hq-serif);
  font-size: clamp(1.65rem, 5vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  color: var(--hq-ink);
}

.hers-quiz__subtitle {
  color: var(--hq-muted);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

.hers-quiz__options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.hers-quiz__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  text-align: left;
  padding: 1rem 1.15rem;
  background: var(--hq-surface);
  border: 1.5px solid var(--hq-line);
  border-radius: var(--hq-radius-card);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--hq-ink);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.hers-quiz__option:hover {
  border-color: color-mix(in srgb, var(--hq-accent) 45%, var(--hq-line));
  box-shadow: var(--w-shadow-md);
}

.hers-quiz__option:active {
  transform: scale(0.99);
}

.hers-quiz__option.is-selected {
  border-color: var(--hq-accent);
  background: color-mix(in srgb, var(--hq-accent) 8%, var(--hq-surface));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--hq-accent) 14%, transparent);
}

.hers-quiz__option-label {
  flex: 1;
  line-height: 1.4;
}

.hers-quiz__option-indicator {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--hq-line);
  border-radius: var(--hq-radius-pill);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.hers-quiz__option.is-selected .hers-quiz__option-indicator {
  border-color: var(--hq-accent);
  background: var(--hq-accent);
  box-shadow: inset 0 0 0 3px var(--hq-surface);
}

/* Primary actions — clay CTA (not Hers pink / monochrome teal) */
.hers-quiz__primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  width: 100%;
  background: var(--hq-cta);
  color: var(--hq-on-cta);
  border: none;
  border-radius: var(--hq-radius-pill);
  font-family: var(--hq-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.12s ease;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--hq-cta) 28%, transparent);
}

.hers-quiz__primary:hover:not(:disabled) {
  background: var(--hq-cta-hover);
}

.hers-quiz__primary:active:not(:disabled) {
  transform: scale(0.99);
}

.hers-quiz__primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.hers-quiz__field {
  display: block;
  margin-bottom: 1.25rem;
}

.hers-quiz__field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hq-muted);
  margin-bottom: 0.5rem;
}

.hers-quiz__input {
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--hq-line);
  border-radius: var(--hq-radius-card);
  font-size: 1rem;
  background: var(--hq-surface);
  font-family: var(--hq-sans);
}

.hers-quiz__input:focus {
  outline: none;
  border-color: var(--hq-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hq-accent) 20%, transparent);
}

/* The field is marked `required` and had no invalid state at all: a bad email
   looked exactly like a good one. `:not(:placeholder-shown)` keeps it quiet
   until something has actually been typed, so an untouched field is never
   shown as an error. */
.hers-quiz__input:invalid:not(:placeholder-shown) {
  border-color: var(--hq-error);
}

.hers-quiz__input:invalid:not(:placeholder-shown):focus {
  border-color: var(--hq-error);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hq-error) 20%, transparent);
}

.hers-quiz__sticky-cta {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hers-quiz__skip {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--hq-accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hers-quiz__legal,
.hers-quiz__privacy,
.hers-quiz__footnote {
  font-size: 0.75rem;
  color: var(--hq-muted);
  margin-top: 1rem;
  line-height: 1.5;
}

.hers-quiz__confirmation {
  text-align: left;
}

.hers-quiz__result-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.25rem;
  border-radius: var(--hq-radius-pill);
  background: color-mix(in srgb, var(--hq-success) 16%, var(--hq-surface));
  color: var(--hq-success);
}

.hers-quiz__care-card {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.15rem;
  background: var(--hq-surface);
  border: 1px solid var(--hq-line);
  border-radius: calc(var(--hq-radius-card) + 2px);
  box-shadow: var(--w-shadow);
}

.hers-quiz__care-card-label {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hq-muted);
}

.hers-quiz__care-card .hers-quiz__chips {
  margin-bottom: 0;
}

.hers-quiz__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem 1.5rem;
}

.hers-quiz__footer .hers-quiz__chips {
  justify-content: center;
  margin-bottom: 0;
}

.hers-quiz__footer .hers-quiz__chip {
  color: var(--hq-muted);
  background: transparent;
  border-color: var(--hq-line);
  font-weight: 500;
}

.hers-quiz__email-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 640px) {
  .hers-quiz__main {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }
}

@media (max-width: 480px) {
  .hers-quiz {
    font-size: 15px;
  }
  .hers-quiz__header,
  .hers-quiz__main,
  .hers-quiz__footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hers-quiz__title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }
  .hers-quiz__option {
    min-height: 3rem;
  }
  .hers-quiz__primary {
    width: 100%;
  }
}
