/* Guide layer styles — loaded ONLY on /guides/<slug>/ pages via extraHead.
   Scoped under .guide / .guide-* so it cannot affect any existing page. */

.guide {
  max-width: 820px;
  margin: 0 auto;
}

.guide-hero {
  margin: 0 0 2rem;
}

.guide-hero h1 {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.guide-hero .lead {
  font-size: 1.125rem;
  color: var(--secondary-light);
  margin-bottom: 1rem;
}

.guide-byline {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  margin-bottom: 1.25rem;
}

.guide-hero .cta-btn {
  display: inline-block;
}

.guide-toc {
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}

.guide-toc h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.guide-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.guide-toc a {
  font-weight: 500;
}

.guide-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.75rem;
  scroll-margin-top: 1rem;
}

.guide-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.guide-body p {
  margin: 0 0 1rem;
}

.guide-body ul,
.guide-body ol {
  margin: 0 0 1rem 1.25rem;
}

.guide-body li {
  margin-bottom: 0.4rem;
}

.guide-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.guide-body th,
.guide-body td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.guide-body th {
  background: var(--primary-soft);
  font-weight: 600;
}

.guide-body blockquote {
  border-left: 3px solid var(--primary-light);
  background: var(--bg);
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  color: var(--secondary-light);
}

/* Builder renders guide sections inline; give their headings the same
   treatment as .guide-body without leaking onto the funnel blocks. */
.guide-body-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.75rem;
  scroll-margin-top: 1rem;
}

.guide-body-section p {
  margin: 0 0 1rem;
}

.guide-faq,
.guide-related,
.guide-cities,
.guide-more,
.guide-sources {
  margin-top: 2.5rem;
}

.guide-faq h2,
.guide-related h2,
.guide-cities h2,
.guide-more h2,
.guide-sources h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.guide-sources ol {
  margin: 0 0 0 1.25rem;
  font-size: 0.92rem;
  color: var(--secondary-light);
}

.guide-sources li {
  margin-bottom: 0.5rem;
}

.guide-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem 1.25rem;
}

.guide-link-list a {
  font-weight: 500;
}

.guide-editorial {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--secondary-light);
}

@media (max-width: 640px) {
  .guide-toc ul {
    grid-template-columns: 1fr;
  }
}

/* AI-citation blocks: answer-first quick answer + key takeaways */
.guide-answer {
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}

.guide-answer h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  margin: 0 0 0.4rem;
}

.guide-answer p {
  margin: 0;
  font-size: 1.05rem;
}

.guide-takeaways {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}

.guide-takeaways h2 {
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}

.guide-takeaways ul {
  margin: 0 0 0 1.1rem;
}

.guide-takeaways li {
  margin-bottom: 0.4rem;
}

/* ------------------------------------------------------------------ */
/* Guide funnel overlay — offer hero, trust bar, steps, value block,  */
/* bottom CTA band and sticky mobile CTA. Scoped under .guide-* so it  */
/* cannot affect any other page. Uses the shared design tokens.        */
/* ------------------------------------------------------------------ */

.guide-btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.9rem 1.7rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.guide-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.guide-btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.guide-btn-ghost {
  background: #fff;
  color: var(--primary-dark);
  border: 1.5px solid #c7d7f8;
}

.guide-btn-ghost:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.guide-btn-lg {
  padding: 1.05rem 2.2rem;
  font-size: 1.05rem;
}

/* Offer hero (immediately after the guide hero, before Quick Answer) */
.guide-offer {
  background: linear-gradient(160deg, var(--primary-soft) 0%, var(--bg) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 0 0 1.75rem;
  text-align: center;
}

.guide-offer-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: #dbeafe;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.guide-offer-headline {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.15;
  color: var(--secondary);
  margin: 0 0 0.6rem;
}

.guide-offer-lead {
  font-size: 1.05rem;
  color: var(--secondary-light);
  max-width: 60ch;
  margin: 0 auto 1.4rem;
}

.guide-offer-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.guide-offer-microcopy {
  display: block;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.guide-affiliate-disclosure {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Trust bar */
.guide-trust {
  background: var(--secondary);
  color: #fff;
  border-radius: var(--radius);
  margin: 0 0 1.75rem;
}

.guide-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 1.6rem 1.5rem;
}

.guide-trust-item strong {
  display: block;
  font-size: 1rem;
  color: #fff;
}

.guide-trust-item span {
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* How it works */
.guide-steps {
  margin: 2.5rem 0;
}

.guide-steps h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  color: var(--secondary);
  margin: 0 0 0.4rem;
}

.guide-steps-sub {
  display: block;
  color: var(--secondary-light);
  margin: 0 0 1.5rem;
}

.guide-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.guide-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.guide-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.guide-step h3 {
  margin: 0.2rem 0 0.4rem;
  color: var(--secondary);
}

.guide-step-desc {
  display: block;
  margin: 0;
  color: var(--secondary-light);
  font-size: 0.95rem;
}

/* Value / price block */
.guide-value {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2.5rem 0;
}

.guide-value-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}

.guide-value h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  color: var(--secondary);
  margin: 0 0 0.6rem;
}

.guide-check {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.guide-check li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  color: var(--secondary-light);
}

.guide-check li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 800;
}

.guide-value-card {
  background: var(--primary-soft);
  border: 1px solid #c7d7f8;
  border-radius: var(--radius);
  padding: 1.9rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
}

.guide-value-card strong {
  display: block;
  color: var(--secondary);
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.guide-value-card-text {
  display: block;
  color: var(--secondary-light);
  margin: 0;
  max-width: 34ch;
  line-height: 1.5;
}

/* Full-width, centered CTA scoped to the value card only
   (does not alter the global .guide-btn used elsewhere). */
.guide-value-card .guide-btn {
  align-self: stretch;
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  text-align: center;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Bottom CTA band */
.guide-cta-band {
  background: var(--secondary);
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  padding: 2.5rem 1.75rem;
  margin: 2.5rem 0 0;
}

.guide-cta-band h2 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 0.6rem;
}

.guide-cta-band p {
  color: #cbd5e1;
  max-width: 55ch;
  margin: 0 auto 1.5rem;
}

.guide-cta-disclaimer {
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: 70ch;
  margin: 1.4rem auto 0;
}

/* Related tests hybrid: internal card + affiliate button */
.guide-related-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guide-related-item .card {
  flex: 1;
}

.guide-related-cta {
  display: block;
  text-align: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  transition: background 0.12s ease, transform 0.12s ease;
}

.guide-related-cta:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* Sticky mobile CTA */
.guide-sticky-cta {
  display: none;
}

@media (max-width: 820px) {
  .guide-trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .guide-steps-grid {
    grid-template-columns: 1fr;
  }
  .guide-value-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .guide-offer {
    padding: 1.5rem 1.25rem;
  }
  .guide-sticky-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
  }
  .guide-sticky-link {
    display: block;
    text-align: center;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    border-radius: 999px;
    padding: 0.95rem;
  }
}
