/* ------------------------------------------------------------------
   Section rhythm.

   .sec is padded 112px top AND bottom, so two consecutive sections of
   the same band produce 224px of dead space rather than one 112px gap.
   The design files patch some of these by hand with inline padding and
   miss the rest - 85 of 153 boundaries across the set were doubled.

   These rules collapse the gap wherever the band does not change. A
   dark-to-light (or light-to-dark) boundary is left alone: there the
   second section's padding is the internal padding of a visibly
   different block, not space between blocks.
   ------------------------------------------------------------------ */

.light + .light { padding-top: 0; }
.sec:not(.light) + .sec:not(.light) { padding-top: 0; }

/* .final is a full-bleed gradient panel and needs its own 104px inset,
   so the gap is closed on the section before it instead. */
.sec:has( + .final ) { padding-bottom: 0; }

/* ------------------------------------------------------------------
   Band-change boundaries.  (v3.3.0)

   The rules above collapse doubled padding only where the band stays
   the same.  Where a dark section meets a light one the two paddings
   were both left at 112px, so every colour seam carried 224px of dead
   space - twice the rhythm of every other boundary on the page.  That
   is the uneven gap: 43 seams across the 25 pages, all of them double.

   The seam itself already separates the two blocks, so it does not
   need a full 112px on each side.  48px before it and 64px after it
   gives 112px total - the same gap as every other boundary on the
   page, so the whole set runs on one rhythm.
   ------------------------------------------------------------------ */

.sec:not(.light):not(.final):has( + .light ) { padding-bottom: 48px; }
.light:has( + .sec:not(.light):not(.final) ) { padding-bottom: 48px; }

.hero + .light,
.sec:not(.light):not(.final) + .light { padding-top: 64px; }
.light + .sec:not(.light):not(.final) { padding-top: 64px; }

/* A hero has no bottom padding, so on the four pages where it runs
   straight into a light band its last row - the Classic/Pro/Plus tier
   pills - sat flush on the seam and read as cropped. */
.hero:has( + .light ) { padding-bottom: 48px; }

/* ------------------------------------------------------------------
   Heading line breaks.

   Headings wrap on width alone, which drops a stub last line: 23 of
   them across the set, some as short as one word ("...and out the
   door" / "door").  text-wrap:balance evens the lines out instead.
   Unsupported browsers ignore it and wrap exactly as they do now.
   ------------------------------------------------------------------ */

h1, h2, h3,
.ftext .fh,
.nar .big { text-wrap: balance; }

/* .ftext .fh sets a size and a weight but no line-height, so it falls
   back to the body's 1.6 while every other heading on the site runs at
   1.08.  At 34px that is 20px of air between the two lines, which is
   the loose break visible on the 19 pages that use this block. */
.ftext .fh { line-height: 1.14; }
