/* Page rhythm (V2 3.13.0, owner 2026-11-12: the line under a section title was "a little squeezed", and there was
   "a little too much space between the title and whatever panel is right above it", most often in the last two
   panels of a page). Loaded after every page's own stylesheet and before phone.css (functions.php), so these few
   rules set the spacing site-wide instead of each page's head and closer setting its own. */

:root{
  --th-end-step:clamp(56px,5.6vw,80px); /* the page's last content to its ending (the FAQ, then the closing card) */
  --th-end-foot:clamp(48px,4.4vw,64px); /* the closing card to the awards band */
}

/* 1. A section heading and the line under it. The gap is about half the heading's size (22px under headings of 40px
   and up, 16px under the 28px phone headings, 11px under a 20px one), where it was a flat 14px. It sits on the
   heading, so it scales with it. Not in articles, forms or the calculator's steps, and not where the line sits
   beside the heading (For Clinicians' heads and Resources' Planning tools on laptops); heads laid out as a wrapping
   row or a grid get the same gap as their row gap instead. */
main :is(section,header,footer,aside) h2:not(.th-vh,.th-article h2,.th-prose h2,.roi2 h2,form h2,.rh2-head > h2,.cs3-results-head > h2,.cl5-head > h2,.cl3 .fc-head > h2):has(+ p){margin-bottom:clamp(10px,.57em,22px)!important}
main :is(section,header,footer,aside) h2:not(.th-vh,.th-article h2,.th-prose h2,.roi2 h2,form h2,.rh2-head > h2,.cs3-results-head > h2,.cl5-head > h2,.cl3 .fc-head > h2) + p{margin-top:0!important}
.th-resources-hub .rh2-head{row-gap:16px}
.cs3-results-head{row-gap:clamp(16px,1.5vw,22px)!important}
@media (max-width:960px){
  .th-page.cl3 :is(.cl5-head,.fc-head){row-gap:16px!important}
  .th-page.cl3 :is(.cl5-head,.fc-head) > h2{margin-bottom:0!important}
  .th-page.cl3 :is(.cl5-head,.fc-head) > h2 + p{margin-top:0!important}
}
/* The FAQ's questions start a clear step below its "More in the full FAQ" line (29px before), and Your Benefits'
   residency questions a little further below their title (16px before). */
.fc-faq-grid{row-gap:clamp(28px,2.8vw,40px)!important}
.th-benefits .bn5-res-faq h3{margin-bottom:clamp(18px,1.7vw,24px)!important}

/* 3. Titles use the whole line they sit on (owner, 2026-11-12: titles were "cut off and made into two lines" with
   room to spare). The caps in ch that page styles gave headings are lifted, so a title wraps only when its column
   or the screen runs out, and text-wrap:balance still evens the lines when it does. The homepage film's headline
   keeps its width so it stays on the film's darkened side. */
main :is(h1,h2,h3):not(.th-prose *,details *,.hm-film h1){max-width:none!important}

/* 2. Page endings on laptops and tablets. Every page that has an FAQ now ends FAQ, then the closing card (For
   Clients, For Clinicians and Consulting had the FAQ after the card). One step leads from the last content into the
   ending and from the FAQ to the card (112px before, 80px now), and the card sits a shorter, even step above the
   awards band (52 to 121px before, 64px now). Panels and bands keep their own inner padding. */
@media (min-width:761px){
  .th-page :is(.sv-section:not(.sv-section--green,.sv-section--dark),.fc-section,.cx-sec,.cl3-sec):has(+ :is(.sv-close,.fc-faq)){padding-bottom:0!important}
  .th-page .fc-faq{padding-top:var(--th-end-step)!important;padding-bottom:0!important}
  .th-page .sv-close{padding-top:var(--th-end-step)!important;padding-bottom:var(--th-end-foot)!important}
  .th-about .ab5-sec:has(+ .ab5-next),.bn6 .bn5-res:has(+ .bn6-close){padding-bottom:0!important}
  .th-about .ab5-next,.bn6 .bn6-close{padding-top:var(--th-end-step)!important;padding-bottom:var(--th-end-foot)!important}
}
/* Phones: the FAQ runs straight into the closing band (each band keeps its own top padding). */
@media (max-width:760px){
  .th-page .fc-faq:has(+ .sv-close){padding-bottom:0!important}
}
