/* Section headings and CTAs for rich guides (prototype, 29 Oct 2026; candidate for guides-rich.css).
 * Built only from the existing rich-guide vocabulary in guides-rich.css:
 *   drift gradient + lavender/mint hairline, 2px #303030 frame (as .gd-glance / the closing card),
 *   step-palette number circle (gd-kicker__num), outline pill (gd-outline__list a), gd-cta-glow.
 * Opt-in classes, so they work at any nesting depth (the shared .gd-content > h1/h2 rules
 * only reach direct children, which is how page wrappers drifted out of them).
 *
 *   A  h1 underline   .gd-rich .gd-content > h1::after (existing, unchanged; keep H1 a direct child)
 *   B  h2.gd-sec      major section heading (established hairline, spacing, type)
 *   C  .gd-pattern    numbered research-pattern header (framed, faint lavender tint, no offset shadow; for H3 sections)
 *   D  .gd-cta--interim   bounded mid-article CTA;  .gd-cta-glow > .gd-cta > h2 + .gd-cta-row   closing CTA (existing)
 */

/* ---------- B. Major section heading: the guides' hairline (as .gd-content > h2), more air, clear type ---------- */

.gd-rich h2.gd-sec {
  position: relative;
  margin: 60px 0 18px;
  padding-top: 28px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.gd-rich h2.gd-sec::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, #E0BBF5, #BBFFF0 60%, transparent);
}

/* anchors clear the sticky site nav (site convention: guides.css uses 88-96px) */
.gd-rich h2.gd-sec {
  scroll-margin-top: 96px;
}

.gd-rich .gd-pattern__h {
  scroll-margin-top: 116px;  /* also shows the frame's top edge */
}

/* ---------- C. Numbered research-pattern header ---------- */

.gd-rich .gd-pattern {
  margin: 44px 0 22px;
  padding: 18px 22px 16px;
  border: 2px solid #303030;
  border-radius: 12px;
  background-color: #fcfaff;
}

.gd-rich .gd-pattern__h {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 10px;
  align-items: center;
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.gd-rich .gd-pattern__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #E0BBF5;
  color: #303030;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gd-rich .gd-pattern__seq {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #6d6d6d;
}

.gd-rich .gd-pattern__step {
  display: inline-block;
  padding: 4px 11px;
  border: 1.5px solid #303030;
  border-radius: 999px;
  background-color: white;
  color: #303030;
}

.gd-rich .gd-pattern__next {
  white-space: nowrap;
}

.gd-rich .gd-pattern__when {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed #e3dedd;
  font-size: 15.5px;
}

/* visually hidden text that keeps the heading's accessible name identical to its plain-text form */
.gd-rich .gd-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- D. CTAs ---------- */

/* Interim: one bounded card, full 2px #303030 frame (the closing card's frame, without the glow) */
.gd-rich .gd-cta.gd-cta--interim {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: center;
  margin: 32px 0 40px;
  padding: 20px 22px;
  border: 2px solid #303030;
  border-radius: 10px;
  background-color: white;
  text-align: left;
}

.gd-rich .gd-cta--interim .gd-cta__h {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: #303030;
}

.gd-rich .gd-cta--interim .gd-cta__p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #4a4a4a;
}

.gd-rich .gd-cta--interim .button {
  white-space: nowrap;
}

/* Resource strip: a compact, hot-pink pointer to a companion resource (the site's accent pink #F90473, as the
   nav's outline button). Text stays dark; the link pink is darkened to #B8005C for AA contrast. */
.gd-rich .gd-resource-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 22px;
  align-items: center;
  margin: 4px 0 26px;
  padding: 14px 18px;
  border: 2px solid #F90473;
  border-radius: 10px;
  background-color: #FFF0F7;
}

.gd-rich .gd-resource-strip__h {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 800;
  color: #303030;
}

.gd-rich .gd-resource-strip__p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: #3d3d3d;
}

.gd-rich .gd-resource-strip__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.gd-rich .gd-resource-strip__links a {
  font-size: 14.5px;
  font-weight: 800;
  color: #B8005C;
  white-space: nowrap;
}

.gd-rich .gd-resource-strip__go {
  padding: 9px 16px;
  border: 2px solid #F90473;
  border-radius: 999px;
  background-color: white;
  text-decoration: none;
}

.gd-rich .gd-resource-strip__go:hover {
  background-color: #B8005C;
  border-color: #B8005C;
  color: white;
}

.gd-rich .gd-resource-strip a:focus-visible {
  outline: 2px solid #303030;
  outline-offset: 2px;
}

/* two actions (a button and a text link, as the How It Works CTA row) */
.gd-rich .gd-cta--interim .gd-cta__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.gd-rich .gd-cta--interim .gd-cta__actions a:not(.button) {
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .gd-rich h2.gd-sec {
    margin: 48px 0 16px;
    padding-top: 24px;
    font-size: 22px;
  }

  .gd-rich .gd-pattern {
    padding: 16px 16px 14px;
  }

  .gd-rich .gd-pattern__h {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 12px;
    font-size: 19px;
  }

  .gd-rich .gd-pattern__num {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .gd-rich .gd-pattern__seq {
    grid-column: 1 / -1;
  }

  .gd-rich .gd-cta.gd-cta--interim {
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }

  .gd-rich .gd-cta--interim .button {
    justify-self: start;
  }

  .gd-rich .gd-cta--interim .gd-cta__actions {
    align-items: flex-start;
  }

  .gd-rich .gd-resource-strip {
    grid-template-columns: 1fr;
    padding: 14px 14px;
  }

  .gd-rich .gd-resource-strip__links {
    align-items: flex-start;
  }
}
