/* Waitlist form */

.waitlist-form {
  max-width: 400px;
  margin: 0 auto;
}

.waitlist-input-row {
  display: flex;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
}

.waitlist-email {
  flex: 1;
  /* Without this the input keeps its intrinsic ~350px min-content and refuses
     to shrink, overflowing the 400px form (and the viewport) at 481-768px. */
  min-width: 0;
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: var(--font-size-sm);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-white);
}

.waitlist-email:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
  border-color: var(--color-primary);
}

.waitlist-submit {
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.waitlist-submit:hover {
  background: #6FA84E;
}

.waitlist-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.waitlist-consent-row {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xs);
  /* Stay left-aligned even inside a center-aligned parent (e.g. the report-page
     waitlist wrapper), so the checkbox + (possibly wrapping) label render the
     same here and on the landing page. */
  text-align: left;
}

.waitlist-consent-row input[type="checkbox"] {
  margin-top: 0.3em;
  flex-shrink: 0;
}

.waitlist-consent-row label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.waitlist-consent-row a {
  color: var(--color-primary);
}

.waitlist-status {
  font-size: var(--font-size-xs);
  text-align: center;
  margin-top: var(--spacing-xs);
}

.waitlist-success {
  color: var(--color-primary);
}

.waitlist-error {
  color: var(--band-high-concern);
}

/* In CTA section — override colors */
#cta .waitlist-email {
  border-color: rgba(55, 55, 28, 0.2);
}

#cta .waitlist-submit {
  background: var(--color-dark);
  color: var(--color-white);
}

#cta .waitlist-submit:hover {
  background: rgba(55, 55, 28, 0.8);
}

#cta .waitlist-consent-row label {
  color: var(--color-dark);
}

@media (max-width: 480px) {
  .waitlist-input-row {
    flex-direction: column;
  }

  .waitlist-submit {
    width: 100%;
  }
}

/* "Become a Tester" benefits list (hero card) */
/* Become-a-tester section (full-width). Heading + intro, a centered panel with
   the two install steps side by side, the optional updates form, then a
   secondary "take the assessment on the web" line. */
.tester-intro {
  max-width: 680px;
  margin: 0 auto var(--spacing-lg);
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.tester-panel {
  max-width: 760px;
  margin: 0 auto;
}

/* Report-page tester block — divider above, centered, sits inside the report
   column (narrower than the landing's full-width panel). */
.tester-section {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.tester-alt {
  max-width: 620px;
  margin: var(--spacing-lg) auto 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.tester-alt a {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

/* Self-serve install steps (group join → Play opt-in). Numbered, each step a
   labelled full-width CTA. The --row modifier lays the two steps out as
   side-by-side cards inside the tester panel (used on the landing page); the
   base vertical layout is used on the report page. */
.install-steps {
  list-style: none;
  counter-reset: install-step;
  margin: 0 0 var(--spacing-sm);
  padding: 0;
  text-align: left;
}

.install-steps li {
  counter-increment: install-step;
  margin-bottom: var(--spacing-sm);
}

.install-steps--row {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
}

/* Stacked variant (report page): the steps run vertically in a narrow column,
   so they fit alongside the 3rd token-gated install step + its disclosure. */
.install-steps--stacked {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* Card chrome shared by the row (landing) and stacked (report) layouts. */
.install-steps--row li,
.install-steps--stacked li {
  display: flex;
  flex-direction: column;
  padding: var(--spacing-md);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
}

.install-steps--row li {
  flex: 1 1 0;
  max-width: 340px;
  margin-bottom: 0;
}

/* A step the JS hasn't enabled yet (the token-gated install step on the report)
   — the card-chrome `display: flex` would otherwise win over the UA [hidden]
   rule and leave it visible with a dead button. */
.install-steps li[hidden] {
  display: none;
}

.install-step-desc {
  flex: 1;
  margin: 0 0 var(--spacing-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.install-steps--row .install-step-btn {
  margin-top: auto;
}

@media (max-width: 768px) {
  .install-steps--row {
    flex-direction: column;
    align-items: stretch;
  }

  .install-steps--row li {
    max-width: none;
  }
}

.install-step-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.install-step-label::before {
  content: counter(install-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.install-step-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.install-note {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin: 0 0 var(--spacing-md);
}

/* Optional product-updates capture, demoted below the install steps. */
.updates-optin {
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
}

.updates-optin-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xs);
}

/* Deep-link target for invitations (e.g. /#become-tester) — offset for any
   sticky header, plus a one-shot highlight so the invited visitor's eye lands
   on the card. */
#become-tester {
  scroll-margin-top: 96px;
}

#become-tester:target {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: 16px;
  animation: become-tester-pulse 1.6s ease-out 1;
}

@keyframes become-tester-pulse {
  0% { box-shadow: 0 0 0 0 rgba(127, 168, 78, 0.45); }
  100% { box-shadow: 0 0 0 16px rgba(127, 168, 78, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #become-tester:target {
    animation: none;
  }
}
