/**
 * Branch Writing vertical rhythm — margin-based spacing only (no flex/grid row gap).
 */

html.bw-sales-page-branch-writing #__next {
  --bw-space-section: clamp(2.5rem, 5vw, 3.75rem);
  --bw-space-block: clamp(1.75rem, 3.5vw, 2.5rem);
  --bw-space-testimonial: clamp(2.25rem, 4.5vw, 3.25rem);
}

/* ----- Testimonial embed stacks ----- */

html.bw-sales-page-branch-writing #__next .bw-inline-007,
html.bw-sales-page-branch-writing #__next .bw-inline-013 {
  gap: 0 !important;
  row-gap: 0 !important;
}

html.bw-sales-page-branch-writing #__next .bw-inline-007 > * + *,
html.bw-sales-page-branch-writing #__next .bw-inline-013 > * + * {
  margin-top: var(--bw-space-testimonial) !important;
}

/* Direct mount-to-mount spacing (must beat testimonial-sales-page mount margins) */
html.bw-sales-page-branch-writing #__next .bw-inline-007 > .bw-youtube-comment-mount ~ .bw-youtube-comment-mount,
html.bw-sales-page-branch-writing #__next .bw-inline-013 > .bw-youtube-comment-mount ~ .bw-youtube-comment-mount {
  margin-top: var(--bw-space-testimonial) !important;
}

html.bw-sales-page-branch-writing #__next .bw-inline-007 > .bw-youtube-comment-mount,
html.bw-sales-page-branch-writing #__next .bw-inline-013 > .bw-youtube-comment-mount,
html.bw-sales-page-branch-writing #__next .bw-inline-008 > .bw-youtube-comment-mount {
  flex: 0 0 auto;
  width: 100%;
  margin-bottom: 0 !important;
}

html.bw-sales-page-branch-writing #__next .bw-inline-007 > .bw-youtube-comment-mount:first-child,
html.bw-sales-page-branch-writing #__next .bw-inline-013 > .bw-youtube-comment-mount:first-child,
html.bw-sales-page-branch-writing #__next .bw-inline-008 > .bw-youtube-comment-mount {
  margin-top: 0 !important;
}

html.bw-sales-page-branch-writing #__next .bw-narrow > .bw-youtube-comment-mount {
  margin-top: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html.bw-sales-page-branch-writing #__next .bw-youtube-comment-mount > .bw-testimonial-db,
html.bw-sales-page-branch-writing #__next .bw-youtube-comment-mount > .youtube-comment {
  flex: 0 0 auto;
  width: 100%;
}

html.bw-sales-page-branch-writing #__next .bw-narrow--block-gutter {
  margin-top: var(--bw-space-block) !important;
  margin-bottom: var(--bw-space-block) !important;
}

html.bw-sales-page-branch-writing #__next .bw-inline-007--after-video {
  margin-top: var(--bw-space-section) !important;
  margin-bottom: var(--bw-space-block) !important;
}

html.bw-sales-page-branch-writing #__next .bw-inline-007--hero-band {
  margin-top: var(--bw-space-block) !important;
  margin-bottom: var(--bw-space-block) !important;
}

html.bw-sales-page-branch-writing #__next .bw-section-title--hero-demo {
  margin-bottom: clamp(1.25rem, 3vw, 2rem) !important;
}

/* ----- Flex column stacks ----- */

html.bw-sales-page-branch-writing #__next .flex.flex-col {
  gap: 0 !important;
  row-gap: 0 !important;
}

html.bw-sales-page-branch-writing #__next .flex.flex-col > * + * {
  margin-top: 2rem !important;
}

html.bw-sales-page-branch-writing #__next .flex.flex-col.gap-10 > * + *,
html.bw-sales-page-branch-writing #__next .flex.flex-col.lg\:gap-10 > * + * {
  margin-top: 2.5rem !important;
}

/* ----- Feature card stacks ----- */

html.bw-sales-page-branch-writing #__next .bw-feature-card-stack,
html.bw-sales-page-branch-writing #__next .bw-feature-pair-stack {
  gap: 0 !important;
}

html.bw-sales-page-branch-writing #__next .bw-feature-card-stack > * + *,
html.bw-sales-page-branch-writing #__next .bw-feature-pair-stack > * + * {
  margin-top: 1rem !important;
}

/* ----- Grids: column gap only; rows use margin ----- */

html.bw-sales-page-branch-writing #__next .grid[class*="gap-"] {
  row-gap: 0 !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-4 {
  column-gap: 1rem !important;
  gap: 0 1rem !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-5 {
  column-gap: 1.25rem !important;
  gap: 0 1.25rem !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-6,
html.bw-sales-page-branch-writing #__next .grid.sm\:gap-6 {
  column-gap: 1.5rem !important;
  gap: 0 1.5rem !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-8,
html.bw-sales-page-branch-writing #__next .grid.lg\:gap-8 {
  column-gap: 2rem !important;
  gap: 0 2rem !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-12,
html.bw-sales-page-branch-writing #__next .grid.lg\:gap-12 {
  column-gap: 3rem !important;
  gap: 0 3rem !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-4 > * + * {
  margin-top: 1rem !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-5 > * + * {
  margin-top: 1.25rem !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-6 > * + *,
html.bw-sales-page-branch-writing #__next .grid.sm\:gap-6 > * + * {
  margin-top: 1.5rem !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-8 > * + *,
html.bw-sales-page-branch-writing #__next .grid.lg\:gap-8 > * + * {
  margin-top: 2rem !important;
}

html.bw-sales-page-branch-writing #__next .grid.gap-12 > * + *,
html.bw-sales-page-branch-writing #__next .grid.lg\:gap-12 > * + * {
  margin-top: 3rem !important;
}

/* Hero mini cards: stacked on mobile */
html.bw-sales-page-branch-writing #__next .bw-hero-mini-grid > * + * {
  margin-top: 1rem !important;
}

@media (min-width: 640px) {
  html.bw-sales-page-branch-writing #__next .bw-hero-mini-grid > * + * {
    margin-top: 0 !important;
  }
}

/* Two-column feature / content grids */
@media (min-width: 1024px) {
  html.bw-sales-page-branch-writing #__next .grid.lg\:grid-cols-2 > * + *,
  html.bw-sales-page-branch-writing #__next .grid.lg\:grid-cols-\[2fr_3fr\] > * + *,
  html.bw-sales-page-branch-writing #__next .grid.lg\:grid-cols-\[3fr_2fr\] > * + * {
    margin-top: 0 !important;
  }

  html.bw-sales-page-branch-writing #__next .grid.lg\:grid-cols-2 > *:nth-child(n + 3),
  html.bw-sales-page-branch-writing #__next .grid.lg\:grid-cols-\[2fr_3fr\] > *:nth-child(n + 3),
  html.bw-sales-page-branch-writing #__next .grid.lg\:grid-cols-\[3fr_2fr\] > *:nth-child(n + 3) {
    margin-top: 2rem !important;
  }
}

/* Use-case cards: three columns */
@media (min-width: 768px) {
  html.bw-sales-page-branch-writing #__next .grid.md\:grid-cols-3 > * + * {
    margin-top: 0 !important;
  }

  html.bw-sales-page-branch-writing #__next .grid.md\:grid-cols-3 > *:nth-child(n + 4) {
    margin-top: 1.25rem !important;
  }
}

/* Pricing: stacked on mobile */
html.bw-sales-page-branch-writing #__next .pricing-grid {
  row-gap: 0 !important;
  gap: 0 1.75rem !important;
}

html.bw-sales-page-branch-writing #__next .pricing-grid > * + * {
  margin-top: 1.75rem !important;
}

@media (min-width: 768px) {
  html.bw-sales-page-branch-writing #__next .pricing-grid > * + * {
    margin-top: 0 !important;
  }
}

/* Paper-style cards: large quote mark sits above the box — reserve space when stacked */
html.bw-sales-page-branch-writing #__next .bw-youtube-comment-mount .bw-testimonial-db.bw-testimonial--no-photo,
html.bw-sales-page-branch-writing #__next .bw-youtube-comment-mount .youtube-comment.bw-testimonial--no-photo {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

html.bw-sales-page-branch-writing #__next .bw-inline-007 > .bw-youtube-comment-mount ~ .bw-youtube-comment-mount .bw-testimonial--no-photo,
html.bw-sales-page-branch-writing #__next .bw-inline-013 > .bw-youtube-comment-mount ~ .bw-youtube-comment-mount .bw-testimonial--no-photo {
  margin-top: 0 !important;
}

/* Section title after a testimonial block */
html.bw-sales-page-branch-writing #__next .bw-narrow--block-gutter + .section__title,
html.bw-sales-page-branch-writing #__next .bw-inline-007 + .section__title {
  margin-top: var(--bw-space-section) !important;
}

@media (max-width: 767px) {
  html.bw-sales-page-branch-writing #__next {
    --bw-space-testimonial: clamp(2rem, 5vw, 2.75rem);
    --bw-space-block: clamp(1.5rem, 4vw, 2rem);
  }

  html.bw-sales-page-branch-writing #__next .bw-narrow--block-gutter {
    margin-top: clamp(1.5rem, 4vw, 2rem) !important;
    margin-bottom: clamp(1.5rem, 4vw, 2rem) !important;
  }
}
