/* Section dividers: a hairline between two sections, only where it has been asked for.

   HISTORY. 20 Oct web catch-up: "add lines everywhere, then take away". Built that way the same
   afternoon (a line over every top-level section that follows another), reviewed, and Wayne kept
   four places — everything else went:

     1. above the hire form band, wherever it sits (`.pwr-hire-form` on the synced band, and
        `.pwr-form-dark` for the older inline copy the products template still carries) — but
        not straight under a hero cover: on Hire Now and Get in Touch the form IS the page,
        and a line under the hero is the look that was taken out everywhere else;
     2. above AND below the Service Model section (the one holding the Service Pillars block —
        on the home page, and the "end-to-end service" band on its own page);
     3. every section on the Service Model page itself, except the first one under the hero
        (Wayne, 28 Oct: "remove top line" — the same no-line-under-a-hero rule as item 1);
     4. the Stat Counters' own top and bottom hairlines (stats.css — the block's, not these).

   WHAT A SECTION IS HERE. A top-level child of <main> (templated views, and the hire band the
   templates add after the content) or of post-content (editor-built pages). The line sits on
   the section's top edge; "below" a section is the line above the one that follows it, so one
   pseudo-element covers both and two rules can never stack into a double line.

   WHERE IT RUNS. The wide rail: inset by the gutter (or the centring margin past 1440) on a
   full-width section, edge to edge on a wide-aligned one, which already sits on the rail.

   ::after, NOT ::before: the marker rail's steps on the Service Model page draw their vertical
   segment with ::before (blocks.css).

   ADDING ONE. An editor can ask for a line with Advanced → Additional CSS class(es):
   `pwr-rule-above` on a section, or `pwr-rule-below` for the line under it. */

:is(main, main > .wp-block-post-content) > * + :is(
	.pwr-rule-above,
	.pwr-rule-below + *,
	:has(.wp-block-acf-service-pillars),
	:has(.wp-block-acf-service-pillars) + *
),
:is(main, main > .wp-block-post-content) > :not(.wp-block-cover) + :has(.pwr-hire-form, .pwr-form-dark),
body.pwr-page-service-model :is(main, main > .wp-block-post-content) > :not(.wp-block-cover) + :not(script, style, link) {
	position: relative;
}
:is(main, main > .wp-block-post-content) > * + :is(
	.pwr-rule-above,
	.pwr-rule-below + *,
	:has(.wp-block-acf-service-pillars),
	:has(.wp-block-acf-service-pillars) + *
)::after,
:is(main, main > .wp-block-post-content) > :not(.wp-block-cover) + :has(.pwr-hire-form, .pwr-form-dark)::after,
body.pwr-page-service-model :is(main, main > .wp-block-post-content) > :not(.wp-block-cover) + :not(script, style, link)::after {
	content: "";
	position: absolute;
	top: 0;
	/* the wide rail inside the gutters: the gutter on a narrow screen, the centred 1440 on a wide one */
	inset-inline: max(var(--wp--preset--spacing--gutter), (100% - var(--wp--style--global--wide-size, 1440px)) / 2);
	height: 1px;
	background: color-mix(in srgb, var(--wp--custom--ink--light) 25%, transparent);
	pointer-events: none;
	z-index: 2; /* over a cover's image and scrim */
}
/* A wide-aligned section already IS the wide rail — the page's root padding put it there — so
   its line runs edge to edge; insetting it again drew it a gutter short of the content. */
:is(main, main > .wp-block-post-content) > * + .alignwide::after {
	inset-inline: 0;
}
