/**
 * core/cover rules, each scoped to the unit that owns it.
 *
 * Shared by every unit that places a core/cover: nothing in it may be written unscoped.
 */

/*
 * .wm-page-hero: THREE THINGS core/cover HAS NO ATTRIBUTE FOR.
 *
 * MOVED HERE FROM post-title.css, 2026-09-21. They sat in post-title.css only because `core/cover` was
 * not in functions.php's block-stylesheet map when the unit was built; it is now
 * (`'core/cover' => 'cover'`). They also had to move for a second reason: the hero's H1 is a
 * `core/heading` bound to `washington-mills/page-hero`, so `core/post-title` is no longer in the band
 * and post-title.css no longer loads where the hero is. The last rule's selector changed from
 * `.wp-block-post-title` to `.wp-block-heading` for the same reason and matches nothing else in a
 * `.wm-page-hero`. The notes below still say post-title.css; they were written before the move.
 *
 * 1. THE TWO MEASURED ROOT HEIGHTS, WHICH THE `minHeight` ATTRIBUTE CANNOT BOTH CARRY.
 *    The contract asserts `minHeight: 207` px and then records that "the other three viewports
 *    measure 188px (1024, 768 and 390 all identical), so 207 is the widest case and a rebuild
 *    will need the per-viewport difference handled outside this attribute." core/cover serialises
 *    that attribute to `style="min-height:207px"` INLINE (`cover/save.mjs`), and no media query
 *    beats an inline declaration without `!important`, so the attribute was dropped and both
 *    measured values are written here. 0,2,0 clears core's own
 *    `.wp-block-cover { min-height: 430px }` at 0,1,0 with no `!important` and nothing inline
 *    left to fight. `core/cover` declares only `dimensions.aspectRatio`, not
 *    `dimensions.minHeight`, so `style.dimensions.minHeight` and a `@tablet` band over it would
 *    render nothing (reference/sources/block-attributes.md, the `style` path table) -- the
 *    attribute route is closed in both spellings.
 *
 *    1123.98px IS THIS THEME'S OWN EDGE, not one chosen for this unit: theme.json's
 *    `settings.viewport.tablet` and the `styles.css` band that steps
 *    `--wp--preset--font-size--xxx-large` from 3.5625rem to 2rem are both at it, and it is the
 *    one edge that puts 1440 on one side and the contract's 1024/768/390 on the other.
 *
 *    WHAT IS REPRODUCED HERE IS THE OUTER BOX, NOT ITS DECOMPOSITION, and that is a gap rather
 *    than a choice. The contract gives the root heights and the content WRAPPER height at 1440
 *    (87px) but never the h1's own box, its line-height, or the hero's padding at the narrow
 *    viewports -- so 188 cannot be derived. At 1440 theme.json's h1 (57px x 1.4 = 79.8) plus
 *    80 + 40 of padding gives 199.8 against a measured 207, and at 390 (32px x 1.4 = 44.8)
 *    gives 164.8 against a measured 188. The residual is 7.2px and 23.2px -- NOT flat across
 *    viewports, so it is not a border this rule is absorbing; it is a measurement the projection
 *    does not carry. `contentPosition` bottom-aligns the content, so the whole residual lands
 *    above the h1 and the measured 40px bottom inset is exact at every viewport. Named in the
 *    hand-back.
 *
 * 2. `mix-blend-mode: multiply` ON THE OVERLAY -- the contract's own words: "the source's overlay
 *    also carries `mix-blend-mode: multiply`, and core/cover emits no blend mode at all ... This
 *    is the single largest known fidelity gap in this unit and there is no attribute for it; it
 *    is a scoped-stylesheet matter for wp-unit-build." `.view-mode__hero.landing_page:before` in
 *    `themes/washington_mills/scss/layout/_hero.scss` is `background: rgba($dark-gray, 0.5)` plus
 *    that blend mode.
 *
 *    THE `opacity: .5` CORE ALREADY APPLIES IS THE SAME 0.5, not a second one. The span carries
 *    `has-background-dim` with no ratio suffix (`dimRatioToClass()` returns null for exactly 50),
 *    which core paints as `opacity: .5` over an opaque `#464646`. Per the compositing spec a
 *    blend is performed and then composited with the group's alpha, so
 *    `Co = 0.5 x multiply(Cb, Cs) + 0.5 x Cb` either way -- the source's rgba(...,0.5) and core's
 *    opacity(.5) over an opaque colour are the same image. Only the blend mode was missing.
 *
 * 3. `isolation: isolate` ON THE ROOT, which is what makes rule 2 deterministic rather than
 *    lucky. `.wp-block-cover` is `position: relative` with `z-index: auto`, so it forms no
 *    stacking context and the overlay's blend group would be whatever ancestor does -- the
 *    overlay would multiply against anything painted below it, page background included, wherever
 *    the photograph does not cover. The image does cover the box here, so nothing would look
 *    wrong today; `isolation` confines the group to the cover so it still does not when the unit
 *    is placed somewhere with a painted ancestor. It changes no computed colour on this instance.
 *
 *    The stacking order the blend reads is core's, and it only works because the featured-image
 *    path puts the `<img>` BETWEEN the overlay span and the inner container (`blocks/cover.php`
 *    inserts it there). That is exactly the case core's
 *    `:not(:has(.wp-block-cover__background + .wp-block-cover__inner-container))` guard is written
 *    for: the image gets `z-index: 0`, the overlay `z-index: 1`, the content `z-index: 1`. With a
 *    statically saved `url` the order is reversed and no z-index is applied at all.
 */
.wm-page-hero.wp-block-cover {
	min-height: 188px;
	isolation: isolate;
}

.wm-page-hero > .wp-block-cover__background {
	mix-blend-mode: multiply;
}

/*
 * 4. THE 40px core PUTS ON THE INNER CONTAINER, WHICH THE ROOT'S OWN ZEROES DO NOT REACH.
 *    `settings.useRootPaddingAwareAlignments` is true and core/cover's layout support lands
 *    `has-global-padding` on `.wp-block-cover__inner-container` -- NOT on the block wrapper, which
 *    is where every other unit on this build has met it. So the cover's own
 *    `style.spacing.padding.left/right` of "0" zeroes the wrapper and leaves 40px each side
 *    inside it, and no block attribute addresses the inner container at all.
 *
 *    MEASURED, because it was invisible at 1440 and visible only at 390. Above the band the
 *    constrained layout caps children at 1200 inside a 1360 content box, so the 40px is absorbed
 *    and the column still lands at x=120. At 390 it took the column's content from 360 to 280,
 *    which wrapped "About Washington Mills" onto a second line and rendered the root 210 tall
 *    against the contract's measured 188 -- a 22px error with no bad number anywhere in the
 *    markup. `:root :where(.has-global-padding)` is 0,1,0; this is 0,2,0.
 */
.wm-page-hero > .wp-block-cover__inner-container {
	padding-right: 0;
	padding-left: 0;
}

/*
 * 5. THE h1's OWN LEADING ABOVE THIS THEME'S OWN EDGE, WHICH IS THE ONE READING IN SIXTEEN THAT
 *    DOES NOT TAKE theme.json's RATIO.
 *
 *    WHAT theme.json NOW SAYS, AND WHY THAT IS RIGHT EVERYWHERE ELSE. A theme pass took
 *    `styles.elements.h1.typography.lineHeight` from 1.4 to 1.2, grounded in the source's own
 *    `scss/base/_elements.scss:14-16` (`h1 { line-height: 1.2 }`) and in 15 of 16 DOM readings
 *    across the build. That is a theme fact and it stays wp-theme-scaffold's; nothing here
 *    restates it.
 *
 *    THIS UNIT IS THE SIXTEENTH READING. The source's hero h1 measures a 57px font at a 57px
 *    line box at 1440 -- a ratio of 1.0, not 1.2 -- while the same h1 at 1024, 768 and 390
 *    measures a 32px font at 38.4px, which IS 1.2 exactly. So the deviation is confined to this
 *    unit and to the wide band, and 1.2 reproduces three of the four measured points with no
 *    rule at all. A scoped rule on the fourth is the whole correction.
 *
 *    THE GEOMETRY CLOSES ON IT, FROM TWO NUMBERS THE CONTRACT ALREADY CARRIES, and this is the
 *    corroboration rather than the measurement. The contract measures the root at 117..324 (207
 *    tall) with 40px of bottom padding, and `contentPosition` bottom-aligns the content, so the
 *    h1's bottom edge sits at offset 207 - 40 = 167 from the root's top. At a 57px line box its
 *    top edge is at 110; at the 68.4px this theme's 1.2 produces it is at 98.6. The measured
 *    source h1 spans 227..284 in a root at 117, i.e. offset 110..167. The rule lands it on the
 *    measured position exactly, and the 11.4px the verification reports as a residual is the
 *    same 11.4px.
 *
 *    WHY A RATIO AND NOT `57px`. Inside this band the preset is a flat 57px, so `line-height: 1`
 *    and `line-height: 57px` give the identical 57px at every width in it and no measurement can
 *    tell them apart. The ratio is the spelling to guess with: `xxx-large` is built flat at
 *    3.5625rem against a `design_tokens` entry that DECIDED a fluid {2rem, 3.5625rem}, which is a
 *    known theme defect recorded on that entry and wp-theme-scaffold's to fix -- when it is fixed,
 *    a ratio keeps the 1.0 the source measures at both ends of the clamp and a fixed 57px would
 *    freeze the leading while the font shrank underneath it.
 *
 *    THE EDGE IS INHERITED, NOT CHOSEN. 1123.98px is already this file's band above (note 1) and
 *    is where theme.json's own `styles.css` steps `--wp--preset--font-size--xxx-large` from
 *    3.5625rem to 2rem -- so the leading steps with the size it belongs to rather than at an edge
 *    of its own. Only two ratio points exist (1.0 at 1440, 1.2 at 1024 and below), so the true
 *    edge is somewhere in 1024..1440 and is NOT measured; the contract already records the same
 *    gap for the size -- "between roughly 1024 and 1200 the rebuild will be a few pixels off the
 *    source by construction", because the source ramps at Foundation's `xlarge` and this theme
 *    steps at 1123.98. Pairing the two steps adds no assumption that the size did not already
 *    carry. Named in the hand-back.
 *
 *    SPECIFICITY. `styles.elements.h1` compiles to a bare `h1` tag selector, 0,0,1 -- the trap
 *    reference/sources/block-attributes.md calls "a block's rendered TAG is a style surface".
 *    This is 0,2,0 and there is nothing inline: core/post-title has no `lineHeight` attribute
 *    written in patterns/page-hero.php, and writing one would serialise inline and take the
 *    narrow viewports with it, which is the same bind as note 1's `minHeight`.
 */
@media (width > 1123.98px) {
	.wm-page-hero.wp-block-cover {
		min-height: 207px;
	}

	.wm-page-hero .wp-block-heading {
		line-height: 1;
	}
}

/*
 * THE IMAGE BAND'S h1 CARRIES THE SOURCE'S 30px MARGIN-BOTTOM (2026-09-21). Measured on the live source
 * (about-washington-mills, computed style of `h1.node-title`): margin 0 0 30px at 1440 and at 390, in a column whose
 * own height is the h1 plus that margin (87px at 1440, 68px at 390), so the h1 sits at the top of the padded
 * box (y=197 at 1440, 147 at 390). Without it the bottom-aligned cover put the h1 30px lower at both viewports.
 * The selector is 0,3,1 because core's `:root :where(.is-layout-flow) > :last-child { margin-block-end: 0 }`
 * is 0,2,0 and the h1 is the last child whenever the blurb block renders nothing.
 */
.wm-page-hero.wp-block-cover .wm-page-hero__col h1 {
	margin-bottom: var(--wp--preset--spacing--40);
}

/*
 * .wm-navigation-card WHOLE-CARD LINK (2026-09-21). Measured on the live source (Playwright, 1440x900): the card's
 * one `a` covers the whole 360x520 card (`elementFromPoint` at every corner is the anchor), so the build's
 * title-only link was a regression. The title's `::after` is stretched over the card. The card is a `core/cover`,
 * whose own `__inner-container` is `position: relative` and would become the containing block, sized to the
 * title's box -- so the inner container is stretched to the card's full height instead (the cover is a flex row,
 * hence `align-self`), keeps centring its content, and the overlay reaches out over the cover's own padding -- 30px
 * inline (the pattern's attribute) and core's 1em (16px) block default, which is why the inner container measures 488 in a 520 card. One anchor, one tab stop; the ring follows the card.
 */
.wm-navigation-card .wp-block-cover__inner-container {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.wm-navigation-card .wp-block-post-title a::after {
	content: "";
	inset: -16px -30px;
	position: absolute;
}

.wm-navigation-card .wp-block-post-title a:focus-visible {
	outline: none;
}

.wm-navigation-card .wp-block-post-title a:focus-visible::after {
	outline: 2px solid currentcolor;
	outline-offset: -6px;
}

/*
 * .wp-block-washington-mills-image-nav-grid (patterns/image-nav-grid.php), TWO THINGS core/cover
 * HAS NO ATTRIBUTE FOR, per ai/units/image-nav-grid.yml's own `why` on the tile nodes and the
 * `hovered` state.
 *
 * 1. `mix-blend-mode: multiply` ON THE OVERLAY, PLUS `isolation: isolate` ON THE ROOT SO THE
 *    BLEND GROUP IS CONFINED TO THE TILE -- same reasoning as `.wm-page-hero` above (note 2-3):
 *    the source's overlay is `rgba($dark-gray, 0.5)` with that blend mode
 *    (scss/modules/_paragraph.scss:402-413); core's `has-background-dim` (no numbered suffix --
 *    `dimRatioToClass(50)` returns null, same as `.wm-navigation-card`'s cover) already paints
 *    the same 0.5 opacity, so only the blend mode is missing.
 *
 * 2. THE HOVER ZOOM, NOT CAPTURED ON EITHER SIDE and stated as such in the unit's `hovered`
 *    state (no reference to measure against): CODE scss/modules/_paragraph.scss:393-397 scales
 *    the whole tile -- photo, overlay and text together -- to 1.1 under a 0.3s ease-in-out
 *    transition, inside `@include breakpoint(large)` (1124px and wider,
 *    scss/_settings.scss:92). That is this theme's own `tablet` edge (1123.98px), so the media
 *    query below is not a new number chosen for this unit. No block attribute expresses a
 *    hover transform, so this is the whole of it: reproduce the rule, not a sample.
 */
.wp-block-washington-mills-image-nav-grid .wp-block-cover {
	isolation: isolate;
}

.wp-block-washington-mills-image-nav-grid .wp-block-cover > .wp-block-cover__background {
	mix-blend-mode: multiply;
}

@media (width > 1123.98px) {
	.wp-block-washington-mills-image-nav-grid .wp-block-cover {
		transition: transform 0.3s ease-in-out;
	}

	.wp-block-washington-mills-image-nav-grid .wp-block-cover:hover {
		transform: scale(1.1);
	}
}

/*
 * `.wm-tall-image-nav-row` -- REWRITTEN 2026-09-26, ai/card-grids-plan.md Option B. Each card is
 * a `core/cover` this block's own render.php builds directly (blocks/tall-image-nav-row/render.php),
 * not a placed `navigation-card` pattern any more, so the two things core/cover has no attribute
 * for are this unit's own to carry, same reasoning as image-nav-grid's block above.
 *
 * 1. `mix-blend-mode: multiply` ON THE OVERLAY. CODE
 *    scss/modules/_paragraph.scss:333-342: `.paragraph__tall_image_nav_row
 *    .view-mode__navigation_card:before { background: rgba($dark-gray, 0.7); mix-blend-mode:
 *    multiply }`; `dimRatio: 70` (render.php) already paints the 0.7 opacity via
 *    `has-background-dim`, so only the blend mode is missing -- read off CODE, in no capture
 *    payload (a pseudo-element).
 *
 * 2. THE STRETCHED LINK -- "the whole card is clickable, as on the source" (operator, approved
 *    plan, verbatim), MEASURED as the card's FULL 360x520 box, padding included ("`div.
 *    title-wrapper > a` measures 360x520, the card's own box"). render.php inserts the anchor
 *    as `.wp-block-cover`'s OWN FIRST CHILD, not nested inside `__inner-container` (which has
 *    its own 30px padding, and MEASURED on this build via probe.js, 2026-09-26, is not even
 *    full height on its own -- `.wp-block-cover`'s base rule centres content with
 *    `align-items: center` and never stretches it, so an anchor placed there would size to the
 *    heading's own content box, not the card). `.wp-block-cover` is already `position: relative`
 *    (wp-includes/blocks/cover/style-common.scss), so `inset: 0` fills the whole card exactly;
 *    `z-index: 1` keeps the anchor above the photo and the overlay so it is reachable by click
 *    and by keyboard. The heading is plain text, not a second link -- see render.php's own note.
 *
 * 3. THE HOVER ZOOM, BUILT 2026-09-26. Not captured on either side (the contract's own `hovered`
 *    state says so), but the source's rule settles it and CODE is what a build reads when a
 *    state has no capture: `.paragraph__type--tall-image-nav-row article.view-mode__navigation_card`
 *    carries `transition: transform 0.3s ease-in-out` and, inside `breakpoint(large)` (1124px
 *    and wider, scss/_settings.scss:92), `:hover { transform: scale(1.2); z-index: 1 }`
 *    (scss/modules/_paragraph.scss:328, :366-371, spec pass `fb91e86`). THAT IS 1.2, NOT
 *    image-nav-grid's 1.1 -- a different rule on a different tile (that block's own note above),
 *    read off CODE directly rather than carried over from it. Scoped the same way, at this
 *    theme's own `tablet` edge (1123.98px), not a new number chosen for this unit.
 */
.wm-tall-image-nav-row .wp-block-cover > .wp-block-cover__background {
	mix-blend-mode: multiply;
}

@media (width > 1123.98px) {
	.wm-tall-image-nav-row .wp-block-cover {
		transition: transform 0.3s ease-in-out;
	}

	.wm-tall-image-nav-row .wp-block-cover:hover {
		transform: scale(1.2);
		z-index: 1;
	}
}

.wm-tall-image-nav-row__card-link {
	inset: 0;
	position: absolute;
	z-index: 1;
}

.wm-tall-image-nav-row__card-link:focus-visible {
	outline: 2px solid var( --wp--preset--color--white );
	outline-offset: -6px;
}
