/* ==============================================
   IMPULSE SEO  - Website check
   Self-check page. Builds on research.css (.research-post typography,
   headline figure, bars, methodology, end CTA) so it reads as a sibling
   of the research it quotes.
   Depends on: reset.css, fonts.css, colors.css, styles.css, research.css
   ============================================== */

/* ── Questions ───────────────────────────────── */
/* Rows divided by rules, not cards: eight boxed cards in a column read as a form wizard. */
.check-list {
  list-style: none;
  counter-reset: check;
  margin: 0;
  padding: 0;
}

/* .research-meta above already draws the top rule. */
.research-post .check-item:first-child {
  padding-top: 0;
}

.check-item:first-child::before {
  top: -2px;
}

/* Scoped so it beats `.research-post li`. */
.research-post .check-item {
  counter-increment: check;
  position: relative;
  margin: 0;
  padding: 32px 0 32px 52px;
  border-bottom: 1px solid var(--border);
}

/* The count matters here: the whole comparison is "how many of eight". */
.check-item::before {
  content: counter(check);
  position: absolute;
  left: 0;
  top: 30px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-light);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.check-item[data-answer]::before {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--white);
}

.research-post .check-question {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0 0 8px;
}

.research-post .check-how {
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.check-how a,
.check-stat a,
.check-page .research-methodology a {
  color: var(--cta);
  font-weight: 600;
}

/* ── Answer control ──────────────────────────── */
.check-answer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: none;
  margin: 0;
  padding: 0;
}

.check-answer label {
  position: relative;
  cursor: pointer;
}

/* Native radio stays in the tree for keyboard and screen readers; the span is the visual. */
.check-answer input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.check-answer span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.check-answer label:hover span {
  border-color: var(--cta-light);
}

.check-answer input:checked + span {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--white);
}

.check-answer input:focus-visible + span {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
}

/* Revealed on answer - motion here answers the visitor's own action. */
.research-post .check-stat {
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 14px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--cta-light);
  animation: check-reveal 0.3s ease both;
}

@keyframes check-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* ── Submit ──────────────────────────────────── */
.check-submit {
  text-align: center;
  margin: 40px 0 8px;
}

.check-submit .cta:disabled {
  background: var(--border);
  color: var(--text-light);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.research-post .check-progress {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 14px 0 0;
}

/* ── Result ──────────────────────────────────── */
.check-result {
  margin-top: 48px;
  scroll-margin-top: 100px;
}

.check-result:focus {
  outline: none;
}

.check-score {
  animation: check-reveal 0.4s ease both;
}

/* The visitor's row is the one memorable element on the page. */
.research-bar-row[data-you="true"] .research-bar-fill {
  background: var(--cta);
}

.research-bar-row[data-you="true"] .research-bar-label {
  color: var(--cta);
}

.research-bar-row[data-could="true"] .research-bar-track {
  outline: 1.5px dashed var(--cta-light);
  outline-offset: 2px;
}

.check-you-tag,
.check-could-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 2px;
}

.check-you-tag {
  background: var(--cta);
  color: var(--white);
}

.check-could-tag {
  border: 1.5px dashed var(--cta-light);
  color: var(--cta);
}

.research-post .check-findings {
  list-style: none;
  padding: 0;
}

.research-post .check-findings li {
  padding: 14px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.research-post .check-findings li:first-child {
  border-top: 1px solid var(--border);
}

.research-post .check-findings strong {
  display: block;
  margin-bottom: 2px;
}

/* ── Handoff with Calendly ───────────────────── */
/* .research-end-cta is a two-column grid for button pairs; the calendar needs the full row. */
.check-handoff {
  display: block;
}

.check-handoff [hidden] {
  display: none;
}

.check-calendly {
  width: 100%;
  height: 700px;
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.check-restart {
  text-align: center;
  margin-top: 24px;
}

.check-restart-btn {
  height: auto;
  padding: 6px 4px;
  border: none;
  background: none;
  color: var(--text-light);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.check-restart-btn:hover {
  color: var(--cta);
}

@media (max-width: 600px) {
  .research-post .check-item {
    padding-left: 0;
    padding-top: 64px;
  }

  .check-item::before {
    top: 24px;
  }

  /* Number sits above the question here, so the first item still needs room for it. */
  .research-post .check-item:first-child {
    padding-top: 44px;
  }

  .check-item:first-child::before {
    top: 0;
  }

  .check-answer label {
    flex: 1;
  }

  .check-answer span {
    justify-content: center;
    width: 100%;
    padding: 0 10px;
  }

  .check-calendly {
    height: 760px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .research-post .check-stat,
  .check-score {
    animation: none;
  }
}
