/**
 * Andersens heading standard (CR-07), staging only.
 *
 * One place that sets alignment, size and line behaviour for every section
 * heading (h1 to h6) in the page content area (#main).
 *
 *  - ALIGNMENT: left (Amy via Bron, 4 Nov 2026), site-wide. One switch,
 *    --and-h-align, flips every rule below between left and center.
 *  - FULL WIDTH: headings and the intro paragraph under them are released from narrow
 *    max-widths so each runs as one line across its container where it fits.
 *  - SIZE: two sizes (lead for H1/H2, sub for H3 to H6), tokens below. Change a size here
 *    and every page follows; nothing else on the site should set a heading size.
 *  - ONE LINE: no manual <br> (removed from the content), and nothing here
 *    forces a wrap. Headings that still wrap because their container is too
 *    narrow are reported, not clipped (see the completion report).
 *
 * Widgets tagged .and-hx-keepsize (four homepage panel headings) keep their own size but follow
 * the alignment and line rules.
 *
 * Eyebrow labels that are heading tags (h4 at 10px) carry .and-hx-label on
 * their widget: they follow the alignment but keep their label size.
 *
 * Two exclusion lists, both visible below:
 *   ALIGN-EXCLUDED (left completely alone): review names in carousel slides, product
 *   card titles, term tiles, post-card titles, tab labels, form titles.
 *   SIZE-EXCLUDED (left aligned, but keep their own size so cards do not break):
 *   the above plus loop / post cards, image-box and icon-box titles, headings
 *   inside a link (a clickable card), Unlimited Elements grids, and .and-hx-label.
 * The footer (#footer) is outside #main and is not covered.
 *
 * Specificity: `body #main` carries an id, and the values use !important,
 * because Elementor writes a per-widget size and alignment rule for every
 * heading (0,4,0) and older rules in flooring-category.css and store-page.css
 * use !important of their own.
 *
 * Rollback: delete this file's enqueue (inc/andersens-brand-typography.php,
 * block marked CR07) or restore the dated backup. No content depends on it.
 */

/* ===== CR07 HEADINGS BLOCK: START ===== */

:root {
	/* left or center: the one switch for heading and lede alignment. */
	--and-h-align: left;
	/* Two sizes site-wide, both fluid so a heading can stay on one line.
	   LEAD: H1 and H2. 68px on desktop, the size the homepage and the original H1 already use.
	   SUB:  H3 to H6. 32px on desktop, the size the homepage card titles already use.
	   To make every heading one size, set --and-sub-size to var(--and-lead-size). */
	--and-lead-size: clamp(22px, calc((100vw - 40px) / 20), 68px);
	--and-sub-size: clamp(19px, calc((100vw - 40px) / 22), 32px);
	--and-h1-size: var(--and-lead-size);
	--and-h2-size: var(--and-lead-size);
	--and-h3-size: var(--and-sub-size);
	--and-h4-size: var(--and-sub-size);
	--and-h5-size: var(--and-sub-size);
	--and-h6-size: var(--and-sub-size);
}

/* ---- Alignment: section headings follow --and-h-align -------------------- */
body #main :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *) {
	text-align: var(--and-h-align) !important;
	text-wrap: wrap;
	letter-spacing: 0 !important;
}

/* ---- Size by level (card, label and link titles excluded, see header) ---- */
body #main h1:not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .and-hx-label *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *) {
	font-size: var(--and-h1-size) !important;
	line-height: 1.1 !important;
}
body #main h2:not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .and-hx-label *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *) {
	font-size: var(--and-h2-size) !important;
	line-height: 1.1 !important;
}
body #main h3:not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .and-hx-label *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *) {
	font-size: var(--and-h3-size) !important;
	line-height: 1.1 !important;
}
body #main h4:not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .and-hx-label *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *) {
	font-size: var(--and-h4-size) !important;
	line-height: 1.1 !important;
}
body #main h5:not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .and-hx-label *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *) {
	font-size: var(--and-h5-size) !important;
	line-height: 1.1 !important;
}
body #main h6:not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .and-hx-label *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *) {
	font-size: var(--and-h6-size) !important;
	line-height: 1.1 !important;
}

/* ---- One line: accent words inside a heading must not start a new line ----
   Some templates (store pages, for one) set the <em> accent to display:block,
   which is a manual line break in disguise. Keep it inline, colour unchanged. */
body #main :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .and-hx-skip *) :is(em, i) {
	display: inline !important;
}

/* ---- Full width: no narrow measure on a heading or the intro paragraph under it ----
   Headings and ledes are often capped (for example 644px) so they wrap. Release the
   cap so they run across their container; they still wrap if the container itself
   is narrower than the text (hero columns beside a photo, cards, phones). */
body #main .elementor-widget-heading:not(.and-hx-skip):has(> .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)),
body #main .elementor-widget-heading:not(.and-hx-skip):has(> .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) > .elementor-widget-container,
body #main .elementor-widget-heading:not(.and-hx-skip):has(> .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) + .elementor-widget:is(.elementor-widget-text-editor, .elementor-widget-heading),
body #main .elementor-widget-heading:not(.and-hx-skip):has(> .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) + .elementor-widget:is(.elementor-widget-text-editor, .elementor-widget-heading) :is(.elementor-widget-container, p, .elementor-heading-title),
body #main :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *),
body #main :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *) + p {
	max-width: none !important;
}
body #main :is(.acp-head, .acp-head-centre, .acp-lede, .acp-hero-lede, .fm-head, .fm-lead, .fm-hero-lede, .fm-why-statement, .asp-why-head, .asp-testi-head) {
	max-width: none !important;
}

/* ---- Position and the paragraph under a heading --------------------------
   Elementor sections are often flex columns with align-items:center (or start),
   which shrink-wrap each widget. Stretch heading widgets and the lede widget
   that follows so --and-h-align decides where the text sits. Only text-align,
   align-self and side margins change; buttons and images are not touched. */
body #main .elementor-widget-heading:not(.and-hx-skip):has(> .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) {
	align-self: stretch !important;
}
body #main .elementor-widget-heading:not(.and-hx-skip) > .elementor-widget-container:has(> :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) {
	margin-left: 0 !important;
	margin-right: 0 !important;
}
/* the paragraph(s) directly under the heading widget */
body #main .elementor-widget-heading:not(.and-hx-skip):has(> .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) + .elementor-widget:is(.elementor-widget-text-editor, .elementor-widget-heading),
body #main .elementor-widget-heading:not(.and-hx-skip):has(> .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) + .elementor-widget:is(.elementor-widget-text-editor, .elementor-widget-heading) + .elementor-widget-text-editor {
	align-self: stretch !important;
	text-align: var(--and-h-align) !important;
}
body #main .elementor-widget-heading:not(.and-hx-skip):has(> .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) + .elementor-widget:is(.elementor-widget-text-editor, .elementor-widget-heading) :is(p, .elementor-widget-container, .elementor-heading-title),
body #main .elementor-widget-heading:not(.and-hx-skip):has(> .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) + .elementor-widget:is(.elementor-widget-text-editor, .elementor-widget-heading) + .elementor-widget-text-editor :is(p, .elementor-widget-container) {
	text-align: var(--and-h-align) !important;
}
/* an eyebrow widget directly above the heading joins the group */
body #main :is(.elementor-widget-heading, .elementor-widget-text-editor):not(.and-hx-skip):has(+ .elementor-widget-heading > .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) {
	align-self: stretch !important;
	text-align: var(--and-h-align) !important;
}
body #main :is(.elementor-widget-heading, .elementor-widget-text-editor):not(.and-hx-skip):has(+ .elementor-widget-heading > .elementor-widget-container > :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *)) :is(.elementor-widget-container, .elementor-heading-title, p) {
	text-align: var(--and-h-align) !important;
}

/* ---- Markup-rendered pages (store pages, category heroes): the <p> straight under a heading ---- */
body #main :is(h1, h2, h3, h4, h5, h6):not(.swiper-slide *, .woocommerce-loop-product__title, .ae-term-blocks-title, [class*="uael-post__title"], .e-tab-title-text, .gform_wrapper *, .and-hx-skip, .and-hx-skip *, .ae-post-item *, .ae-term-blocks *, a *, .elementor-image-box-title, .elementor-icon-box-title, .e-loop-item *, .elementor-loop-container *, [id^="uc_"] *, .and-hx-keepsize, .and-hx-keepsize *) + p {
	text-align: var(--and-h-align) !important;
}

/* ===== CR07 HEADINGS BLOCK: END ===== */
