/**
 * core/accordion rules, each scoped to the unit that owns it.
 *
 * This file is attached to core/accordion alone, and its children's classes are reached
 * through it -- the four accordion blocks never render apart. It is shared by construction:
 * every unit that places a core/accordion lands here. Nothing in it may be written unscoped
 * -- a rule with no unit hook class repaints every accordion on the site, which is a theme
 * decision and belongs to wp-theme-scaffold.
 */

/*
 * .wm-accordion: THE ITEM BOX IS 97px FOR A ONE-LINE TITLE AND 129px FOR A TWO-LINE ONE, AND
 * THE 5px RULE IS PART OF THAT ARITHMETIC RATHER THAN SOMETHING ADDED ON TOP OF IT.
 *
 * The contract measures the five item boxes at 1440x900 as 1170 wide at x=135, y=502, 641,
 * 780, 887, 994, with heights 129, 129, 97, 97, 134. Every source item computes
 * `border-top: 5px solid rgb(94, 177, 191)` and item five computes `border-width: 5px 0px`
 * with `border-style: solid none`, so:
 *
 *   one line   5 + 60 + 32      =  97
 *   two lines  5 + 60 + 32 * 2  = 129
 *   item five  129 + 5          = 134   (its second border)
 *
 * which fixes the toggle's vertical padding at 60px total and, with the title measured at
 * `32px w700`, the line box at 32px -- `line-height: 1`. Nothing here is chosen; all of it
 * falls out of the borders plus the five heights. The borders themselves are BLOCK ATTRIBUTES
 * on core/accordion-item, in patterns/accordion.php, not rules in this file.
 *
 * AN EARLIER PASS WROTE `padding-block: 33px 32px` HERE AND THAT WAS THE SAME ARITHMETIC WITH
 * THE BORDER HIDDEN INSIDE IT. It read no border off the contract, found 65px of padding
 * instead of 60, guessed at Foundation's 1px title border for the odd pixel and absorbed it,
 * reasoning that drawing a line would be inventing a mark nobody measured. The mark is
 * measured. Five top borders and one bottom border are 30px of band height that the absorbed
 * padding only accounted for 25px of, which is the 1440 shortfall, and at the narrow
 * viewports nothing was absorbed at all, which is 30px of each of those.
 *
 * THE PADDING SPLIT IS 30/30 BY ANALOGY, NOT BY MEASUREMENT. Only the 60px TOTAL is forced by
 * the item heights. The narrow padding below is measured symmetric at 20/20, so 1440 is
 * written symmetric too; a 28/32 split would render identically at every viewport the contract
 * measures and is indistinguishable from here.
 *
 * WHY THE TYPE IS SET HERE AND NOT AS A BLOCK ATTRIBUTE. core/accordion-heading's
 * `supports.typography` carries `fontSize` but NOT `lineHeight`, and its `spacing.padding` is
 * `__experimentalSkipSerialization`'d onto `.wp-block-accordion-heading__toggle` by its own
 * `__experimentalSelector`. So the line height has to be a rule whatever happens, and writing
 * the font size as an inline attribute would then put it out of reach of the narrow-viewport
 * band below without `!important`. One arithmetic, one home.
 *
 * THE PADDING ALSO HAS TO OVERRIDE CORE'S OWN. accordion-heading/style.css sets
 * `padding: var(--wp--preset--spacing--20, 1em) 0` on the toggle, and the fallback never fires
 * here because this theme DOES define spacing slug `20` -- as 10px, not 1em. So core's toggle
 * is 10px/0 on this site and every one of the four sides is overridden below.
 */
.wm-accordion .wp-block-accordion-heading {
	font-size: 32px;
	line-height: 1;
}

/*
 * THE HORIZONTAL PADDING IS WHERE THE TITLE STARTS AND WHERE THE PLUS SITS.
 *
 * Title text is measured starting 70px inside the item at 1440 and 50px narrow. The item
 * carries 20px of that at both (a block attribute, in the pattern), so the toggle carries 50px
 * at 1440 and 30px narrow -- which is the source anchor's own measured `padding-left`.
 *
 * PADDING-RIGHT AT 1440 IS THE ONE NUMBER HERE THAT IS INFERRED. The source's narrow anchor is
 * measured at `padding: 20px 65px 20px 30px`, and 65 is exactly the plus's own offset plus its
 * own width: 30 + 35. At 1440 the plus is measured at `right: 70px` and is the same 35px wide,
 * so the same construction gives 105. It is not measured, and what it buys is that the title
 * can never run under the plus at either end.
 *
 * THE TITLE COLOUR HAS NO BLOCK ATTRIBUTE TO LIVE IN. The contract measures
 * `color: rgb(219, 36, 11)` on the source's title anchor -- the `primary` palette slug,
 * #db240b -- and records that it writes no colour attribute because
 * core/accordion-heading's `supports.color` is `{ background, gradients }` with no text
 * colour at all. It is set on the toggle rather than the heading so core's own
 * `color: inherit` on the button has something to inherit.
 *
 * `position: relative` is here so the plus below has this box to measure its offsets against,
 * and for no other reason -- it changes no geometry.
 */
.wm-accordion .wp-block-accordion-heading__toggle {
	position: relative;
	/* Top/bottom snapped to spacing|50 (40px) and left to spacing|60 (50px), 2026-09-25
	   (spacing-standard.md §1 item 3). 105px right stays a literal: it is the plus icon's own
	   measured offset-plus-width clearance (item 4, "a component's own size"), not a gap. */
	padding: var(--wp--preset--spacing--50) 105px var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
	color: var(--wp--preset--color--primary);
}

/*
 * THE TITLE WRAPS AT 970px, WHICH IS MEASURED AND NOT A ROUND NUMBER.
 *
 * The contract records the five title spans' widths at 1440x900 -- 969, 849, 429, 451 and 850
 * -- and the items' heights say which of them are one line and which are two: items 3 and 4
 * are 97px (one line, 429 and 451 wide) and items 1, 2 and 5 are two. So the wrap width is at
 * least the widest two-line span, 969, and strictly less than the full single-line width of
 * item 2, the narrowest string that still wrapped. Item 1's widest line is 969 against a
 * string that does not fit, which is a line filled to the boundary: the available width is
 * 970.
 *
 * Core gives the title `flex: 1`, so without this it takes the whole toggle content box --
 * 1170 - 20 - 105 - 50 = 995 here -- and at 995 item 2's title still wraps, but the margin is
 * 25px rather than a measured boundary. `max-width` pins it to the measured one.
 *
 * IT IS INERT AT THE THREE NARROW VIEWPORTS by construction and needs no breakpoint: the
 * available width there is 879, 623 and 255, all below 970.
 */
.wm-accordion .wp-block-accordion-heading__toggle-title {
	max-width: 970px;
}

/*
 * THE ICON IS A DRAWN PLUS, AND THE SOURCE'S OWN RULE IS REPRODUCED RATHER THAN APPROXIMATED.
 *
 * The source's `::before` and `::after` on the title anchor are both `content: ""`,
 * `position: absolute`, `35px x 4px`, `rgb(219, 36, 11)`, with `::after` carrying
 * `matrix(0, 1, -1, 0, 0, 0)` -- a 90 degree rotation about its own centre. They sit at
 * `right: 70px; top: 43px` at 1440 and `right: 30px; top: 30px` narrow. The reference
 * screenshot shows a red plus at every viewport.
 *
 * AN EARLIER PASS RECORDED "the source draws a chevron we cannot reproduce" AND ACCEPTED A
 * DEVIATION AGAINST A SOURCE FACT THAT IS NOT TRUE. There is no chevron. The contract's own
 * note that a pseudo-element "has no computed style in the capture" is about the capture's
 * payload, not about the source, and it was read as though the mark itself were unknowable.
 *
 * A PSEUDO-ELEMENT PAIR, NOT CORE'S GLYPH RESTYLED, AND THE REASON IS THAT THE MEASUREMENT IS
 * GEOMETRIC. core/accordion-heading's `save()` puts a literal `+` text node in this span, so
 * the right instinct is that core already draws a plus -- but a text `+` is a font glyph: its
 * stroke weight, arm length and baseline offset come from the font's own metrics, and there is
 * no font-size at which it becomes two 35x4 bars. Every number the source gives is a box. So
 * core's glyph is turned off (`font-size: 0`, which empties the text node without touching
 * this span's own box, since nothing here is sized in `em`) and the two bars are drawn where
 * the source draws them.
 *
 * THE SPAN IS THE MARK'S OWN BOX -- 35x4 AT THE SOURCE'S OFFSETS -- AND THAT IS WHAT CHANGED
 * ABOUT IT. It was `width: 1em; height: 1em`, to stop core's 1.2em box (38.4px at 32px type)
 * exceeding the 32px line box and taking a one-line item from 97px to 103px. That concern is
 * discharged rather than overruled: `position: absolute` takes the span out of the toggle's
 * flex flow, so it contributes no height at all and the item height is the title's line box
 * plus the padding, which is the arithmetic at the top of this file. It also makes the title's
 * available width the toggle's own content box rather than that box less an icon, which is
 * what the source's measured anchor padding describes.
 *
 * SIZING THE SPAN TO THE MARK IS ALSO WHAT KEEPS CORE'S OPEN-STATE AFFORDANCE WORKING.
 * accordion-item/style.css rotates THIS SPAN 45 degrees when the item opens, turning a plus
 * into a cross. `transform-origin` defaults to the span's centre, so a span whose box is the
 * plus's box pivots on the plus's own centre; a 1em box offset from the mark would swing it
 * several pixels across the toggle instead. The open state is not measured -- no capture
 * drives this accordion open -- so the 45 degree turn is core's affordance kept, not a
 * reproduction of anything.
 */
.wm-accordion .wp-block-accordion-heading__toggle-icon {
	position: absolute;
	top: 43px;
	right: 70px;
	width: 35px;
	height: 4px;
	font-size: 0;
}

.wm-accordion .wp-block-accordion-heading__toggle-icon::before,
.wm-accordion .wp-block-accordion-heading__toggle-icon::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--wp--preset--color--primary);
}

.wm-accordion .wp-block-accordion-heading__toggle-icon::after {
	transform: rotate(90deg);
}

/*
 * THE NARROW-VIEWPORT STEP IS 24px TYPE ON A 24px LINE AND `20px 65px 20px 30px` OF TOGGLE
 * PADDING, AND ALL OF IT IS MEASURED AT ALL THREE NARROW VIEWPORTS.
 *
 * An earlier pass had 26px type and 20px of padding-block and said so plainly: it was a
 * reconstruction, solved against the three narrow ROOT heights because the contract stated
 * nothing else about those viewports, and it left "roughly 16px" of each band unexplained with
 * a note that the residual was flat rather than type-shaped. The 16px was the borders. With
 * the real type, the real padding and the borders, nothing is reconstructed here.
 *
 * 24px is also this theme's `large` preset, which corroborates it as a design value -- but the
 * literal is written rather than `var(--wp--preset--font-size--large)`, because that preset is
 * FLUID, `{min: 1.3125rem, max: 1.5rem}`, and resolves below 24px at exactly these widths.
 * The measurement is a flat 24px at 1024, 768 and 390.
 *
 * `line-height: 1` above carries over and gives the measured 24px line box, so the media query
 * sets only the font size. The plus does not change size, only position.
 *
 * The breakpoint is the theme's own 1123.98px (`settings.viewport.tablet`) rather than
 * Foundation's 1024px; what that costs is the 1024-1124 band, where this build keeps the
 * narrow value while the source has already switched -- a band nobody captured.
 */
@media (width <= 1123.98px) {
	.wm-accordion .wp-block-accordion-heading {
		font-size: 24px;
	}

	.wm-accordion .wp-block-accordion-heading__toggle {
		/* Same rule as above: top/bottom and left tokenized, 65px right left as the icon's own
		   clearance (item 4, "a component's own size"). */
		padding: var(--wp--preset--spacing--30) 65px var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	}

	.wm-accordion .wp-block-accordion-heading__toggle-icon {
		top: 30px;
		right: 30px;
	}
}

/*
 * .wm-applications-menu-region: THE ANCESTOR FACT `structure`'s root node why names but places
 * OUTSIDE the unit's own root -- `div.hero_bottom-wrapper` on the source measures
 * `margin-top: -75px; position: relative; z-index: 3` at every viewport, pulling the menu up
 * over the bottom of the hero band above it. It is not part of the unit itself (core/accordion
 * does not know what sits above it in a template), so it is written on the group that WRAPS this
 * template part where it is placed, never on the part's own root. Applied only where a hero band
 * actually precedes the part today (`templates/page-applications.html`, via the `page-hero`
 * pattern); the two term-archive templates place the part with no such wrapper because they
 * carry no hero band yet to overlap -- see the placement hand-back for that gap.
 */
.wm-applications-menu-region {
	position: relative;
	z-index: 3;
	margin-top: -75px;
}

/*
 * .wm-applications-menu-wrap / .wm-applications-menu-region / .wm-applications-menu-col: THE
 * NAV'S OUTER EDGES, ALIGNED TO THE PAGE CONTENT COLUMN -- A KNOWING DEVIATION FROM THE SOURCE,
 * DECIDED BY THE OPERATOR 2026-09-24 (`structure`'s root node `why`, `by: operator`). Second
 * checkpoint, same date: "just the width since it's too wide and inconsistent."
 *
 * THE CONTENT COLUMN'S OWN MECHANISM, REUSED RATHER THAN REDISCOVERED: `.wm-page-hero__col`
 * (group.css, the page h1's own column) is a FLOW child sitting inside a `constrained` ancestor
 * that already caps it to `--wp--style--global--content-size` (1200 at this theme's cutoff), and
 * it then carries its OWN literal gutter -- `padding: 0 10px` below 639.98px, `0 15px` above --
 * which is Foundation's `columns` gutter, not `--wp--style--root--padding-*`; the two happen to
 * read the same numbers at these three viewports but are two different rules; nothing here reads
 * the root-padding custom property.
 *
 * `.wm-applications-menu-wrap` (align full, `constrained` layout, THIS unit's own root) plays the
 * ancestor's part -- its own `is-layout-constrained` rule caps its direct child to 1200 wide,
 * centred, the same job the hero's cover plays for `.wm-page-hero__col`. `.wm-applications-menu-col`
 * (a new plain group, between the wrap and the accordion) carries the real literal gutter, one
 * level in, exactly where `.wm-page-hero__col` carries it relative to its own capping ancestor.
 * Applying the gutter and the 1200 cap at the SAME element does not compose the way you would
 * expect -- at >=1200px total available width the cap simply re-centres within whatever the
 * padding left, and the padding is invisible (`min(1200, available - 2*pad)` equals 1200, not
 * `1200 - 2*pad`) -- which is why the cap (wrap) and the gutter (col) are two separate boxes and
 * neither carries both jobs.
 *
 * BOTH THE WRAP AND THE REGION MUST HAVE THEIR OWN REAL PADDING CANCELLED, NOT ONLY THE WRAP --
 * FOUND RE-MEASURING AGAINST `/applications/` ITSELF, NOT ONLY THE SANDBOX PAGE, AT THE
 * 2026-09-24 "tabs join" CHECKPOINT. `templates/page-applications.html` wraps this part in its
 * own `.wm-applications-menu-region` (a plain, non-full, `constrained` group -- this unit's own
 * wrapper, per the ancestor-fact note below, not a site-wide one), and a plain non-full
 * `constrained` block gets REAL `has-global-padding` padding directly on itself in this theme
 * (measured on `.wm-applications-menu-region` and on `main` alike: `padding: 15px` at >=640px,
 * `10px` below it) -- unlike an alignfull block, which does not. Below the 1200px cutoff (1024,
 * 768, 390) that real padding on the region is what actually produces the wrap's own
 * already-correct box (994/738/370, matching `.wm-page-hero__col` exactly) BEFORE `.wm-
 * applications-menu-col`'s own gutter ever runs -- so leaving the region's padding in place and
 * also giving `.wm-applications-menu-col` its own gutter double-counts it: measured 964/708/350
 * (30px/20px total inset, not 15/10) until the region was added back to this zeroing rule. Above
 * the cutoff (1440) the region's own padding is inert regardless (its padded box, 1410, is wider
 * than the 1200 cap, so the cap alone decides), which is why the double-count only ever showed
 * below 1200px and reads as the SAME defect as the wrap's own case, one line below it, not a
 * second one. The two templates that place this part with no such wrapper (the `industry` and
 * `material-at-work` archives) have no ancestor padding to cancel, and `.wm-applications-menu-col`
 * is the sole source of the gutter there, unchanged.
 *
 * `useRootPaddingAwareAlignments: true` (this theme's `settings`) makes core add
 * `.has-global-padding` to a full-bleed root, and its rule -- `.has-global-padding { padding-right:
 * var(...); padding-left: var(...); }` -- is a single-class selector printed in
 * `global-styles-inline-css`, which loads AFTER this file's own `<link>` in `<head>` (enqueued via
 * `wp_enqueue_block_style`, this theme's own conditional per-block loader). A same-specificity
 * rule tie goes to whichever is later in the cascade, which is core's, not this one.
 * `.wp-block-group` is already on every one of these elements (core's own generated classname), so
 * pairing it here costs nothing and wins the tie outright rather than depending on load order.
 */
.wp-block-group.wm-applications-menu-wrap,
.wp-block-group.wm-applications-menu-region {
	padding-left: 0;
	padding-right: 0;
}

/*
 * THE SAME DOUBLE-COUNT ALSO SHOWS ON THE UNIT'S OWN SANDBOX INSTANCE (`wp-unit-build` step 5),
 * BELOW 1200px, AND IS LEFT OPEN -- named in this build's hand-back, not fixed here.
 * `/sandbox/applications-menu-block/` places this part through `templates/page.html`'s generic
 * `<!-- wp:post-content --!>`, and `main` and `.wp-block-post-content` are both plain
 * `is-layout-constrained` boxes that get real `has-global-padding` on this theme (measured
 * 15px/15px at 1024 on the sandbox page), the same fact that made `.wm-applications-menu-region`
 * need zeroing above. A `:has(.wm-applications-menu-wrap)` zeroing rule was tried and reverted:
 * it interacts with the `has-global-padding > .alignfull` negative-margin bleed rule (keyed off
 * the CSS custom property, not the element's own computed padding, so zeroing the property's
 * *effect* on one box does not remove what a sibling rule does with the same property) and left
 * the sandbox page WORSE -- no inset at all, at every narrow viewport, rather than the bounded
 * 15-20px-too-much this paragraph names. All three PRODUCTION templates that place this part
 * (`page-applications.html`, `taxonomy-industry.html`, `taxonomy-material-at-work.html`) are
 * unaffected and measure correctly at every viewport; only the sandbox convenience page is short.
 */

.wm-applications-menu-col {
	padding-left: var(--wp--style--root--padding-left, 10px);
	padding-right: var(--wp--style--root--padding-right, 10px);
}

@media (width > 639.98px) {
	.wm-applications-menu-col {
		padding-left: var(--wp--style--root--padding-left, 15px);
		padding-right: var(--wp--style--root--padding-right, 15px);
	}
}

/*
 * .wm-applications-menu: THE /applications LIVE NAV -- TWO `washington-mills/applications-
 * section-list` BLOCKS INSIDE ONE core/accordion, live `industries` and `material-at-work`
 * (since 2026-09-25, applications-post-type-plan.md; blocks/applications-section-list/render.php),
 * ordered by each section page's own `menu_order`, editable by drag in Simple Page Ordering.
 * Everything below is geometry no block attribute can carry; the order itself is never this
 * file's concern.
 *
 * THE HEADING'S OWN PADDING CANNOT BE A BLOCK ATTRIBUTE AT ALL, THE SAME FACT .wm-accordion
 * ABOVE ALREADY DOCUMENTS: `core/accordion-heading`'s `spacing.padding` support is
 * `__experimentalSkipSerialization`'d onto `.wp-block-accordion-heading__toggle` by its own
 * `__experimentalSelector`, so it is a rule here whatever happens. `structure`'s heading node
 * why measures 50px 60px at 1440 and 20px flat at 1024/768/390 -- the one step in this unit that
 * lands on the theme's `body-text` font-size cutoff (1123.98px) rather than this unit's own
 * 1124px everywhere else, because it is riding the SAME cutoff the `fontSize: body-text`
 * attribute already steps on (theme.json `styles.css`), not a second measurement of the same
 * breakpoint.
 */
.wm-applications-menu .wp-block-accordion-heading__toggle {
	position: relative;
	padding: var(--wp--preset--spacing--30);
}

@media (min-width: 1124px) {
	.wm-applications-menu .wp-block-accordion-heading__toggle {
		padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
	}
}

/*
 * CORE'S OWN HOVER UNDERLINE IS NOT THE SOURCE'S, ADDED AT THE 2026-09-24 CHECKPOINT. `chrome`'s
 * why already names this: accordion-heading/style.css underlines
 * `.wp-block-accordion-heading__toggle-title` on `:hover`, and "the source title does not change
 * on hover (cursor: pointer only)." It reads as "the open title is underlined" rather than "the
 * hovered title is underlined" because a click leaves the pointer sitting on the button it just
 * opened -- true of a real visitor's mouse and of a driven click alike -- so the panel that is
 * open is, in the same instant, the one still hovered. Cancelled here rather than in
 * accordion-heading's own stylesheet (shared by every accordion on the site; CLAUDE.md "a rule
 * with no unit hook class repaints every instance of the block").
 */
.wm-applications-menu .wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
	text-decoration: none;
}

/*
 * THE ICON IS THE SAME TWO-BAR CONSTRUCTION AS .wm-accordion ABOVE, ROTATED TO A MINUS RATHER
 * THAN CORE'S CROSS, BECAUSE THIS UNIT'S OPEN STATE IS MEASURED. The contract's `chrome` node
 * gives the box (25x3 at top 65px right 30px from 1124px, 20x3 at top 35px right 30px below) and
 * its `states.application-open`/`material-at-work-open` why gives the open rule: the source's
 * `:before` bar starts rotated 90deg (the vertical arm of the plus) and turns to 180deg when
 * open -- a horizontal bar rotated 180deg reads identically to 0deg, so the two bars collapse
 * onto one and the plus becomes a minus. core's own accordion-item/style.css instead rotates the
 * WHOLE icon 45deg on `.is-open`, turning a plus into a cross; that rule is cancelled here (by a
 * more specific selector, not by load order) and replaced with the source's own two-bar rotation.
 * Font-size 0 empties core's literal "+" text node the same way .wm-accordion does, for the same
 * reason: a text glyph has no box the source's pixel geometry can land on.
 */
.wm-applications-menu .wp-block-accordion-heading__toggle-icon {
	position: absolute;
	top: 35px;
	right: 30px;
	width: 20px;
	height: 3px;
	font-size: 0;
}

@media (min-width: 1124px) {
	.wm-applications-menu .wp-block-accordion-heading__toggle-icon {
		top: 65px;
		width: 25px;
	}
}

.wm-applications-menu .wp-block-accordion-heading__toggle-icon::before,
.wm-applications-menu .wp-block-accordion-heading__toggle-icon::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--wp--preset--color--primary);
}

.wm-applications-menu .wp-block-accordion-heading__toggle-icon::before {
	transform: rotate(90deg);
}

.wm-applications-menu .wp-block-accordion-item.is-open > .wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon {
	transform: none;
}

.wm-applications-menu .wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle-icon::before {
	transform: rotate(180deg);
}

/*
 * `states.application-open`'s own why: the active title's `border-bottom` computes to width 0 --
 * no visible bottom line while its panel is open. Core adds `.is-open` to the ITEM, not the
 * heading, so the selector reaches down from there.
 *
 * `!important` IS NEEDED, FOUND AT THE 2026-09-24 "tabs join" CHECKPOINT. `structure`'s heading
 * node serialises its whole `border-width: 1px` as an INLINE `style` attribute on the `<h3>` (the
 * block attribute's own serialization, not a class), and an inline style beats any non-`!important`
 * external rule regardless of selector count -- the same trap the panel's own `[hidden]` rule below
 * already names for its border. Without it the open title kept its bottom line, measured (main
 * session, Playwright, 2026-09-24 ~16:02Z): a 1px border-bottom still painted on the "Application"
 * heading while `.is-open` was present on its item.
 */
.wm-applications-menu .wp-block-accordion-item.is-open .wp-block-accordion-heading {
	border-bottom-width: 0 !important;
}

/*
 * THE SHARED MIDDLE LINE. `structure`'s first heading node measures `border-right: 0` from
 * 1124px so the two side-by-side titles show one line between them rather than two; the second
 * heading keeps all four sides at every width. Below 1124px the titles stack and each keeps its
 * own full border (no override needed there).
 */
@media (min-width: 1124px) {
	.wm-applications-menu .wp-block-accordion-item:first-child .wp-block-accordion-heading {
		border-right-width: 0;
	}
}

/*
 * THE WIDE LAYOUT: TWO TITLES SIDE BY SIDE, ONE PANEL SPANNING BOTH BENEATH THEM. This is the
 * exact rule set `rung`'s own why records as probed against core's four accordion stylesheets
 * (tooling/extract/probe.js --html, 2026-09-24) rather than assumed: accordion flex/wrap so its
 * two items sit on one row, each item `display: contents` so ITS OWN box drops out and its
 * heading and panel compete as the accordion's direct flex children instead, the heading pinned
 * to half the row, and the panel taken out of flow entirely so it can span the full row under
 * both headings rather than sitting under only its own. The panel's own border/padding make the
 * box the two open-state captures measure (1200x342 and 1200x491 at (120,538)).
 *
 * `top` IS `100%`, NOT THE SOURCE'S OWN `133px`, CORRECTED AT THE 2026-09-24 CHECKPOINT. `rung`
 * probed `top: 133px` as the source's own two-134px-tall-titles row height, but this build's
 * OWN row (theme.json's `body-text` type, this unit's own padding, core's own borders) measures
 * 131.39px, not 134 -- a different box for the same reason every other value in this file is a
 * measurement of THIS build rather than an import of the source's. `top: 100%` reads the row's
 * own rendered height off its positioning container (`.wm-applications-menu`, `position:
 * relative` above, whose own height IS that row, non-absolute children only) instead of
 * restating it as a px literal that can drift from it.
 *
 * THAT PASS'S OWN "flush by construction" WAS WRONG, AND THE RESIDUE WAS NOT `row-gap`. `top:
 * 100%` places the panel's OWN margin edge at the row's bottom, and the panel had a
 * `margin-block-start` it was never given credit for having. See the standalone rule below this
 * one -- the same margin also opened a gap between the two stacked items below 1124px, which is
 * why it is written unconditionally rather than inside this media query.
 *
 * Below 1124px core's own defaults already give the source's stacked shape (item block-level,
 * panel in flow under its own heading) -- probed the same session, nothing to add there.
 */
@media (min-width: 1124px) {
	.wm-applications-menu {
		display: flex;
		flex-wrap: wrap;
		position: relative;
	}

	.wm-applications-menu .wp-block-accordion-item {
		display: contents;
	}

	.wm-applications-menu .wp-block-accordion-heading {
		flex: 0 0 50%;
	}

	.wm-applications-menu .wp-block-accordion-panel {
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		z-index: 5;
		background-color: var(--wp--preset--color--white);
	}
}

/*
 * THE 16px GAP, DIAGNOSED AT THE 2026-09-24 "tabs join" CHECKPOINT BY MEASURING, NOT GUESSING.
 * `computed rowGap` on `.wm-applications-menu` really is `normal` (0), as the earlier pass found
 * -- but it was looking at the wrong box. `core/accordion-item` renders with BOTH a `is-layout-flow`
 * class of its own (for spacing ITS OWN two children, the heading and the panel) and
 * `display: contents` (this file's own wide-layout rule, above). `display: contents` removes the
 * ITEM's box, so the browser no longer generates a box for it -- but it does not stop CSS
 * selectors matching the item as their DOM parent, and this theme's global block-gap rule
 * (`global-styles-inline-css`, unscoped, every theme site emits it) is exactly that kind of
 * selector: `:root :where(.is-layout-flow) > *:not(:first-child) { margin-block-start:
 * var(--wp--style--block-gap, 1rem) }`, in this theme's default state `1rem` = 16px. The panel is
 * the item's SECOND child (the heading is first and is exempted), so it keeps a 16px
 * `margin-block-start` regardless of `display: contents` on its own parent -- confirmed by
 * reading `getComputedStyle` on the open panel directly (main session, Playwright, 2026-09-24
 * ~16:02Z): `marginTop: "16px"`, `top: "131.391px"`, and the panel's rendered `y` was 521.39 against
 * the row's own bottom at 505.39 -- the 16px this checkpoint reports, to the pixel. Core's own
 * `.wp-block-accordion-panel[hidden] { margin-block-start: 0; }` (accordion-panel/style.css)
 * cancels the same margin while CLOSED, which is why only the OPEN panel showed the strip.
 *
 * THE SAME RULE ALSO OPENS A GAP BETWEEN THE TWO ITEMS BELOW 1124px. `.wm-applications-menu`
 * itself is ALSO `is-layout-flow`, so its own second DOM child -- the second
 * `.wp-block-accordion-item` -- gets the same 16px `margin-block-start` whenever it is a normal
 * block (below 1124px, where the wide-layout `display: contents` rule above does not apply): the
 * checkpoint's "the same 16px appears ... between the two items." Cancelled here rather than
 * only under the panel's own selector because it is one rule, one cause, at both call sites.
 *
 * Both are cancelled unconditionally (not gated to either media query): the item's own margin
 * only ever shows below 1124px (above that its box does not exist, being `display: contents`) and
 * the panel's only ever shows on the open one, so there is no viewport or state where zeroing
 * either does anything other than close this gap.
 */
.wm-applications-menu .wp-block-accordion-item,
.wm-applications-menu .wp-block-accordion-panel {
	margin-block-start: 0;
}

/*
 * `z-index: 5` ABOVE IS NOT ONE OF THE FOUR CHECKPOINT DEFECTS -- found placing this unit's own
 * sandbox instance (`wp-unit-build` step 5) and fixed here because leaving it would have
 * corrupted the very screenshot the next checkpoint reads. `sites/<slug>/web/.../parts/footer`'s
 * own wrapper, `.wp-block-group.wm-footer`, is `position: relative; z-index: auto` (a site-wide
 * fact, not this unit's). Neither it nor this panel's `.wm-applications-menu` ancestor chain
 * establishes a new stacking context (no `z-index` value, no transform/filter/isolation
 * anywhere in either chain -- checked, not assumed), so both sit at the SAME implicit paint
 * level inside the page's one shared (root) stacking context, and elements tied at that level
 * paint in DOM order: the footer, always later in the document than this part, painted OVER the
 * open panel wherever the two boxes occupy the same screen position. On `/applications/` itself
 * this never shows, because enough page content sits between the accordion and the footer that
 * their boxes never overlap on screen -- but this unit's own sandbox page
 * (`/sandbox/applications-menu-block/`, `wp-unit-build`'s own convention) has nothing below the
 * accordion, so the footer sits immediately under it and fully hid the open panel, term list and
 * all, behind the footer's own background. `z-index: 5` breaks the tie without touching the
 * footer -- a rule scoped to this unit's own hook class, not a site-wide fix, and not this
 * unit's to own if a THIRD unit hits the same tie against the same footer (CLAUDE.md, "a defect
 * present in more than one unit is fixed once, at its root").
 */

/*
 * THE PANEL'S OWN WHITE, MADE EXPLICIT AT THE 2026-09-24 CHECKPOINT. `structure`'s panel node
 * why calls the frame "white (the accordion's backgroundColor)" -- `core/accordion`'s own
 * `backgroundColor: white` attribute, already on `.wm-applications-menu` as
 * `has-white-background-color has-background`. That is true only while the panel is a normal-
 * flow descendant of the accordion's own painted box; the wide-layout rule above takes it out
 * of flow (`position: absolute`) specifically so it can span the full row under both headings,
 * and an absolutely positioned box paints only what it is given, not what its ancestor happens
 * to have. Unstyled, the open panel at 1440 was fully transparent -- the checkpoint's "the
 * terms print over the page content beneath it" -- because there was never a box behind it,
 * only the accordion's own 131px-tall row above it. Written on the wide-layout rule above
 * rather than unconditionally, because below 1124px the panel stays in normal flow and the
 * accordion's own background already reaches it there; the second coat would be harmless but
 * would misstate why the colour is there.
 */

/*
 * THE PANEL'S OWN PADDING STEPS AT THE SAME 1124px BREAKPOINT AS EVERYTHING ELSE IN THIS UNIT.
 * No border attribute carries padding; both values are measured (`structure`'s panel node why).
 */
.wm-applications-menu .wp-block-accordion-panel {
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}

@media (min-width: 1124px) {
	.wm-applications-menu .wp-block-accordion-panel {
		/* Was 35px 50px: 35 snapped to spacing|40 (30px, the approved 2026-09-25 "ties round down"
		   precedent, spacing-standard.md §1 item 3), 50 already on scale. */
		padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	}
}

/*
 * CLOSED IS TRULY ZERO, MEASURED AGAINST THE RUNNING PAGE, NOT ASSUMED FROM THE MARKUP.
 * `[hidden="until-found"]` (core/accordion's own closed state, `core/accordion-item`'s
 * render_callback) hides this panel via `content-visibility: hidden`, which zeroes its
 * CONTENT's contribution to layout but not the box's own padding or border -- probed on the
 * running page, 2026-09-24: with this unit's own padding above and no override here, a closed
 * panel measured 1200x71 (35+35 padding plus its 1px border) instead of the sibling
 * `.wm-accordion` FAQ unit's 0, which carries no padding of its own to expose the same gap.
 * Padding and border both collapse only while actually closed; either reappears the moment
 * `hidden` is removed on open, because the attribute selector stops matching.
 *
 * `border-width` NEEDED `!important`, ADDED AT THE 2026-09-24 CHECKPOINT. `padding` above is
 * pure external CSS competing with pure external CSS (the panel's own unconditional padding
 * rule, above) and wins on selector count alone. `border-width` is not: `structure`'s panel
 * node writes its 1px right/bottom/left border as an INLINE `style` attribute (a block
 * attribute, serialized onto the element), and an inline style beats any non-`!important`
 * external rule regardless of how many classes that rule names. Without it the closed panel
 * kept its own border-bottom, and because BOTH panels (open and closed) share one `top` offset
 * below, that residual line painted a few pixels under the open row's own heading border --
 * caught at the checkpoint as "a doubled line," not a styling choice.
 */
.wm-applications-menu .wp-block-accordion-panel[hidden] {
	padding: 0;
	border-width: 0 !important;
}

/*
 * THE TERM LIST ITSELF: MULTI-COLUMN, NO MARKER, TWO LEVELS DEEP.
 *
 * Column count steps 1 / 2 / 5 at 0 / 640 / 1124px (`structure`'s panel why, (a)); the browser's
 * own `column-gap: normal` is 1em, which at this list's 16px type is the measured 16px gap, so
 * nothing sets it explicitly. Each top-level `<li>` is `inline-block; width: 100%` so a parent
 * never splits from its own children across a column break (why, (b)); its own padding is 5px
 * flat below 1300px and 10px/5px from it, the one breakpoint in this unit that is NOT 1124 --
 * measured that way in the source and kept literal rather than folded into the other breakpoint.
 *
 * NOT MEASURED, A BUILD DECISION: `list-style: none` on both list levels. The source list is a
 * Drupal Views grouping, not an authored bulleted list, and nothing in the contract states a
 * marker either way; every other measured mark on this unit (borders, icon, hover) is explicit
 * and this one is not, so it is recorded here as a judgment call rather than a measurement.
 *
 * The child list has no padding of its own (why, (c): the source's children are bare `div`s
 * inside the parent's `<li>`, not padded `<li>`s) and its links are `dark-gray` rather than
 * `primary`. Hover opacity steps 1 -> 0.7 on both levels (sidecar, why (e)); `style.elements.link`
 * compiles a colour only, so hover has to live here. The 14px step below 1300px (why, (f)) needs
 * no separate line-height rule: the block's own `lineHeight: "1.2"` attribute is unitless and
 * recomputes from whatever font-size is in effect.
 *
 * SINCE 2026-09-25 (applications-post-type-plan.md, `rung`) THIS SCOPES
 * `washington-mills/applications-section-list`'s OWN WRAPPER, not `.wp-block-categories`: the
 * Industry and Material at Work terms this list used to render are gone, replaced by
 * wp_list_pages() over the `application` post type at `depth: 2`. That argument is why the rule
 * that used to hide `ul.children ul.children` (the one depth the old term list's live data
 * reached that the source never showed) is GONE, not moved -- `depth: 2` never queries a third
 * level, so there is nothing left for it to hide.
 *
 * THE ROOT SELECTOR IS TAG-QUALIFIED (`ul.wp-block-washington-mills-applications-section-list`),
 * NOT A BARE CLASS -- found by measuring computed styles in the Site Editor iframe, 2026-09-26
 * (re-opened unit, operator screenshot: the list rendered as ~20 one-letter-wide columns with
 * the Application panel open). `render.php` prints this class on the real `<ul>` via
 * `get_block_wrapper_attributes()`, exactly as `core/archives` and `core/categories` do for
 * their own dynamic output -- an accepted core convention, not a bug in itself. But this
 * block's `edit()` (editor.js) ALSO calls `useBlockProps()` on its OWN wrapping `<div>` and
 * renders `ServerSideRender` inside it, so in the editor canvas ONLY, TWO elements carry the
 * class: editor.js's `<div>` (an ancestor) and render.php's real `<ul>` (its descendant).
 * Confirmed by dumping every `.wp-block-washington-mills-applications-section-list` match in
 * the canvas iframe: index 0 was a `<div>` with one child; index 1 was the `<ul>` with the
 * real `<li>`s, both at the same `getBoundingClientRect()`. A bare class selector matches
 * BOTH, so `column-count` opened TWO NESTED multi-column contexts -- the outer `<div>` (no
 * sibling content, so the browser fragments its one child's box across its own column
 * tracks) and, inside each of those already-narrow tracks, the inner `<ul>`'s own
 * column-count split the remainder again. At the >=1124px step that is 5 outer columns times
 * 5 inner ones, measured at 1920x1000 as `outerColumnCount` and `innerColumnCount` both `"5"`
 * on the SAME rendered rect -- the ~20-25-column, one-letter-wide collapse the screenshot
 * showed, present in every selection state (heading, list, none) because it depends on the
 * canvas's width crossing the 1124px step, not on which block is selected. The frontend never
 * had this: `render_block()` there emits render.php's `<ul>` alone, with no `useBlockProps()`
 * wrapper around it, so the bare class already matched exactly one element -- confirmed by
 * grep of the rendered frontend markup, one `wp-block-washington-mills-applications-section-
 * list` per panel. Qualifying the selector with `ul.` changes nothing there and stops the
 * editor's incidental second match: `>li`, `.children`, `.children li/a` and `a:hover` below
 * need no change, since they already only resolve inside the real `<ul>` (the outer `<div>`'s
 * only child is `ServerSideRender`'s own wrapper `<div>`, never an `<li>`).
 */
.wm-applications-menu ul.wp-block-washington-mills-applications-section-list {
	column-count: 1;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 640px) {
	.wm-applications-menu ul.wp-block-washington-mills-applications-section-list {
		column-count: 2;
	}
}

@media (min-width: 1124px) {
	.wm-applications-menu ul.wp-block-washington-mills-applications-section-list {
		column-count: 5;
	}
}

@media (width <= 1299.98px) {
	.wm-applications-menu ul.wp-block-washington-mills-applications-section-list {
		font-size: 14px;
	}
}

.wm-applications-menu .wp-block-washington-mills-applications-section-list > li {
	display: inline-block;
	width: 100%;
	/* Was 5px, snapped to spacing|20 (10px), 2026-09-25 (spacing-standard.md §1 item 3,
	   "standard wins") -- a visible change to this dense term list's row spacing. */
	padding: var(--wp--preset--spacing--20);
}

@media (min-width: 1300px) {
	.wm-applications-menu .wp-block-washington-mills-applications-section-list > li {
		padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--20);
	}
}

.wm-applications-menu .wp-block-washington-mills-applications-section-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wm-applications-menu .wp-block-washington-mills-applications-section-list .children li {
	padding: 0;
}

.wm-applications-menu .wp-block-washington-mills-applications-section-list .children a {
	color: var(--wp--preset--color--dark-gray);
}

.wm-applications-menu .wp-block-washington-mills-applications-section-list a:hover {
	opacity: 0.7;
}
