/* Quiz, offer sheet and sign-up form. It loads after style.css and uses its custom properties.
   Light and dark come from those properties. Fallbacks follow for reduced motion, reduced transparency and more contrast. */

/* A button or box with the hidden attribute stays hidden, even where style.css sets display. */
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Sign-up form: the shared base is in style.css. These lines add the hidden field and spacing. */
.signup { margin: 1rem 0 0; max-width: 34rem; }
.signup .small { margin: 0.6rem 0 0; }
.signup button { white-space: normal; text-align: left; }

/* Quiz. */
.quiz { max-width: 40rem; }
main > .quiz { margin-top: 0; }
#quiz-result h2 { padding: 0.15rem 0; }
.quiz h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.quiz fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.quiz legend {
  font: 600 clamp(1.35rem, 3vw, 1.75rem)/1.2 var(--f-serif); letter-spacing: -0.01em; color: var(--ink);
  padding: 0; margin: 0 0 1.25rem; max-width: 30rem;
}
.quiz legend:focus { outline: none; }
.quiz legend:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.opt {
  display: flex; align-items: flex-start; gap: 0.75rem; min-height: 2.75rem; margin: 0 0 0.6rem;
  padding: 0.75rem 1rem; background: var(--surface); border: 1.5px solid var(--rule); border-radius: var(--radius);
  cursor: pointer; line-height: 1.4; transition: border-color 150ms ease, background-color 150ms ease;
}
.opt:hover { border-color: var(--muted); }
.opt input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0.1rem 0 0; accent-color: var(--accent); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--tint); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.quiz-note { min-height: 1.5rem; margin: 0.75rem 0 0; color: var(--ink); font-weight: 600; }
.quiz-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin: 0.25rem 0 0; }
.quiz-nav .small { margin: 0; }
.quiz button.ghost, .offer-close { background: transparent; color: var(--accent); }
#quiz-result { margin-top: 0.5rem; }
#quiz-result h2:focus { outline: none; }
#quiz-result h2:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
#quiz-result > p { color: var(--muted); }
#quiz-result > button { margin-top: 1.5rem; }
.pick {
  margin: 1.25rem 0; padding: 1.25rem 1.25rem 1.25rem 1.5rem; background: var(--surface);
  border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pick h3 { margin: 0 0 0.35rem; font-size: 1.3rem; }
.pick p { margin: 0 0 0.5rem; }
.pick .meta { color: var(--accent); margin: 0 0 1rem; }
.pick .btn { margin: 0; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
.after { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.after h3 { font-family: var(--f-serif); font-size: 1.35rem; }
.paths { list-style: none; margin: 1rem 0 0; padding: 0; }
.paths li { padding: 0.5rem 0 0.5rem 1.25rem; margin: 0 0 1rem; border-left: 3px solid var(--mark, var(--accent)); }
.paths .l-multiunit { --mark: var(--orange); }
.paths .l-clinical { --mark: var(--teal); }
.paths .l-coaching { --mark: var(--plum); }
.paths h3 { margin: 0; }
.paths h3 a { display: inline-block; padding: 0.35rem 0; }
.paths p { margin: 0; color: var(--muted); }

/* Offer sheet: a bottom sheet, not a modal. No scrim, no focus trap. It never covers the header. */
.sheet-offer {
  position: fixed; z-index: 4; left: var(--gutter); bottom: 1rem; width: min(30rem, calc(100% - 2 * var(--gutter)));
  max-height: 70vh; overflow-y: auto; padding: 1.25rem 1.25rem 1rem;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(1rem); transition: opacity 250ms ease, transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet-offer.is-open { opacity: 1; transform: none; }
.sheet-offer h2 { font-size: 1.4rem; margin: 0 0 0.5rem; }
.sheet-offer p { margin: 0 0 0.75rem; }
.offer-act { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.offer-close { border-color: transparent; text-decoration: underline; text-underline-offset: 0.18em; padding-left: 0.5rem; padding-right: 0.5rem; }
.sheet-offer .signup { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.sheet-offer .signup .small { font-size: 0.8125rem; }
@media (max-width: 40rem) {
  .sheet-offer { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; width: auto; max-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-offer { transform: none; transition: none; }
  .opt { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .sheet-offer { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .sheet-offer, .pick, .opt { box-shadow: none; border: 1.5px solid var(--ink); }
  .opt:has(input:checked) { border-width: 3px; }
}
