/**
 * The warning-signs checklist page.
 *
 * Loaded only for `template-warning-signs.php` — the same arrangement `home.css`
 * has, and for the same reason: four bands' worth of rules that exactly one URL
 * can reach do not belong in a stylesheet every visitor downloads.
 *
 * **It loads after `lc-components.css` and that is load-bearing.** Two rules in
 * here re-lay the plugin's lookup form for a 22.5rem rail, and both tie on
 * specificity with the component sheet's own — `.lc-beforepay__lookup
 * .lc-lookup__input` is (0,2,0) against `.lc-domain-check .lc-lookup__input`,
 * which is also (0,2,0). Source order is the whole margin, so the enqueue in
 * `functions.php` declares `lieferantencheck-components` as its dependency
 * rather than `lieferantencheck-theme`. Written the other way the rules would
 * sit in plain sight doing nothing, which is the shape `docs/i18n.md` records
 * for the `lc_languages` filter and `docs/frontend-gotchas.md` for `.lc-main`.
 *
 * Four bands: the hero, the alarm, the quick-check row, and the checklist with
 * its rail.
 *
 * **Everything below the hero is paper in both colour schemes, and not one
 * declaration in this file says so.** The template carries `.lc-onpaper` on its
 * `<main>` and `.lc-onimage` on the hero inside it; both are token re-points in
 * `style.css`, and a custom property declared on a nearer ancestor wins for its
 * own subtree. So every rule here names a semantic token and the page comes out
 * navy-then-paper in either scheme, with no `@media (prefers-color-scheme)`
 * anywhere — which is the point, because a media query is a branch the light
 * side silently depends on being written correctly.
 *
 * This shipped scheme-aware and was pinned in the same version. Left to the
 * tokens the page was coherent and was not the design: a dark-mode reader got a
 * dark-maroon alarm bar, a navy quick-check row and dark cards where the
 * reference draws the page's one light field. Some surfaces are part of the
 * identity rather than part of the scheme — the call `.lc-report-card` makes
 * for its red fill and the homepage makes for two of its bands.
 *
 * Section 16 of `tools/test-theme-contrast.php` therefore measures every pair
 * on this page **through `.lc-onpaper`**, the way section 12 measures the
 * homepage's, and asserts the root still carries it.
 *
 * @package LieferantenCheck
 */

/* ==========================================================================
   1. The root
   ========================================================================== */

/*
 * The page grid, not the reading grid.
 *
 * `style.css` narrows `.lc-page`, `.lc-single`, `.lc-archive` and `.lc-404` to
 * `--lc-shell-read`, because those are pages made of reading matter and a 44rem
 * measure inside a 94rem shell leaves 28rem of nothing down one side. This page
 * is bands — a hero, a six-across row, a checklist with a rail — and it wants
 * the full shell for the same reason `.lc-home` does. There is deliberately no
 * rule here narrowing it; `.lc-shell` already defaults to `--lc-shell`.
 *
 * Section 7 of the contrast harness derives its list of template roots from the
 * theme's own PHP so that a *new* `<main>` cannot open at the old left-heavy
 * grid unremarked, and it therefore has to be told about this one by name — the
 * only alternative being an exemption derived from "the template contains a
 * band", which would exempt the next reading page that grows one.
 */
.lc-guide {
	display: block;
}

/* ==========================================================================
   2. Hero
   ========================================================================== */

/*
 * Two numbers, declared on `.lc-guide-hero` rather than on the `--image`
 * modifier, so the grid rule below can never resolve `--lc-guide-split` to
 * nothing: an unresolved `var()` is invalid at computed-value time and would
 * drop the whole `grid-template-columns` declaration rather than fall back to
 * the one-column rule above it. That is the trap `.lc-hero` documents.
 *
 * They are the homepage hero's numbers and the homepage hero's derivation,
 * restated rather than shared, because `home.css` is not loaded on this page and
 * a custom property cannot be inherited from a stylesheet that is not there.
 * Section 16 of the harness pins the two derivations to the same *shape*, which
 * is what stops this copy drifting into the bug 1.4.6 fixed.
 */
.lc-guide-hero {
	--lc-guide-gap: 2.5rem;
	--lc-guide-split: calc(4 / 7);

	padding-block: clamp(3rem, 7vw, 5rem);
	background: var(--lc-ink);
}

/*
 * **Nothing is ever read on top of the photograph**, at any width, and that is
 * the one decision this hero makes differently from the homepage's.
 *
 * Below 62rem the plate is not rendered at all, so the headline sits on flat
 * `--lc-ink` and the contrast argument is arithmetic that no photograph can
 * move: white 17.0:1, the soft token 12.8:1, the gold eyebrow 6.6:1. The
 * homepage does put its headline over the picture down there, which is why it
 * needs a measured 86% wash and a `brightness()` clamp and this does not.
 *
 * `overflow: hidden` because the image is `object-fit: cover` on a box whose
 * height is set by the text column beside it.
 */
.lc-guide-hero__bg {
	position: absolute;
	inset: 0;
	display: none;
	overflow: hidden;
}

/*
 * `brightness(0.86)`, not the homepage plate's 0.58, and the difference is the
 * photograph rather than a change of mind.
 *
 * That number was measured against a design reference for `Industrieanlage` —
 * bare metal, whose specular highlights survive a wash the rest of the frame
 * does not need. This plate is `Betonwand`: flat unlit concrete whose brightest
 * pixel is already dark, so 0.58 renders as a near-black rectangle and the band
 * looks like it failed to load a picture. Nothing is read on top of it at any
 * width, so this is not a contrast argument in either direction — it is that a
 * backdrop nobody can see is not a backdrop.
 *
 * Grayscale stays: it is the standing rule about imagery on this site, not a
 * property of one image.
 */
.lc-guide-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 45%;
	filter: grayscale(1) brightness(0.86) contrast(1.06);
}

/* The content sits above the absolutely positioned plate. No `z-index`
   anywhere: the plate is a positioned element earlier in tree order, so paint
   order alone puts the shell over it, and a stacking index here would be one
   more thing to keep in step for no gain. */
.lc-guide-hero--image {
	position: relative;
}

.lc-guide-hero--image > .lc-shell {
	position: relative;
}

.lc-guide-hero__grid {
	display: grid;
	gap: var(--lc-guide-gap);
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
}

.lc-guide-hero__title {
	max-width: 18ch;
	margin: 0;
	font-size: var(--lc-t-3xl);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.04;
	text-wrap: balance;
}

.lc-guide-hero__lede {
	max-width: 46ch;
	margin: 1.25rem 0 0;
	color: var(--lc-fg-soft);
	font-size: var(--lc-t-md);
	line-height: 1.6;
}

.lc-guide-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.75rem 0 0;
}

/*
 * The split, at the same 62rem the homepage hero uses.
 *
 * Above it the photograph becomes a plate down the right and **the plate's left
 * edge is derived from the grid rather than checked against it**. Written as a
 * percentage of the viewport it would be a different distance from the text at
 * every window width — 46px of flat ink at 992 and 843px at 3440 — because the
 * text column's right edge is a fraction of a shell that is capped and centred
 * and the viewport is not. That bug shipped on the homepage and survived being
 * "checked at 992, 1200, 1440, 1920 and 2560", which is every width anybody
 * checks a theme at.
 *
 * The terms are the shell's left rail, its gutter, column one and the join:
 *
 *   (100% - shell) / 2  +  gutter  +  col1  +  gap
 *
 * `100%` is this section's padding box — `.lc-guide-hero` sets no inline
 * padding, so that is the viewport — while the grid's own `100%` is its content
 * box, which is why column one is spelled out again instead of shared as a
 * length. `--lc-guide-split` is the one number both expressions read, so the
 * join is one grid gap at every width by construction.
 */
@media (min-width: 62rem) {
	.lc-guide-hero__bg {
		display: block;
		inset: 0 0 0 calc(
			(100% - min(100%, var(--lc-shell))) / 2
			+ var(--lc-gutter)
			+ (min(100%, var(--lc-shell)) - var(--lc-gutter) * 2 - var(--lc-guide-gap))
				* var(--lc-guide-split)
			+ var(--lc-guide-gap)
		);
	}

	/*
	 * The left edge, dissolved into the ink the text sits on.
	 *
	 * The stops are **lengths and not percentages**, which is the other half of
	 * the 1.4.6 fix: a fade sized at 20% of the plate grows with the monitor, so
	 * the photograph starts further from the text the more room there is for it
	 * and the extra reads as dead space. The job here is an edge, and an edge is
	 * a fixed distance.
	 *
	 * Nothing is read on top of this, so it touches no contrast argument.
	 */
	.lc-guide-hero__bg::after {
		position: absolute;
		inset: 0;
		background: linear-gradient(
			90deg,
			var(--lc-ink) 0%,
			rgba(17, 29, 42, 0.62) 3rem,
			rgba(17, 29, 42, 0.34) 18rem
		);
		content: "";
	}

	/*
	 * Column two is deliberately empty. It reserves the plate's width inside the
	 * grid, so the headline can never run under the photograph however long a
	 * translation turns out to be — and the plate places itself from the same
	 * `--lc-guide-split`, so the reservation cannot fall out of step with the
	 * thing it reserves.
	 */
	.lc-guide-hero__grid {
		grid-template-columns:
			calc((100% - var(--lc-guide-gap)) * var(--lc-guide-split))
			minmax(0, 1fr);
	}

	.lc-guide-hero__main {
		grid-column: 1;
	}
}

/* ==========================================================================
   3. The alarm
   ========================================================================== */

/*
 * The one line on the page that is a finding rather than a description, in the
 * same tint and ink the homepage band's alarm uses — `--lc-st-evidenced-bg`
 * borrowed from the evidenced *badge* because it is the one red on paper this
 * site has already measured, and `--lc-danger` for both the ink and the edge.
 *
 * **The border is the band boundary and it is not decoration.** This bar sits
 * between the navy hero and the light-gray quick-check row, and the step *below*
 * it is #fbeaea against #f5f6f8 — about 1.03:1, a fill saying nothing at all,
 * and the exact case section 2b's floor exists to admit only because a rule is
 * carrying the join. One 1px rule in the ink colour is that rule. It is
 * `border-block` rather than `border` because the bar is full-bleed and a left
 * and right edge would be drawn off the screen.
 *
 * The step *above* it needs nothing: deep navy meeting a pale red tint is a
 * 12:1 surface change, in either colour scheme, because the bar is pinned.
 */
.lc-alarmbar {
	margin: 0;
	padding-block: 0.9rem;
	border-block: 1px solid var(--lc-danger);
	background: var(--lc-st-evidenced-bg);
	color: var(--lc-danger);
	font-size: var(--lc-t-ui);
	font-weight: 600;
	line-height: 1.5;
}

/* A `<span>` carrying `.lc-shell` inside a `<p>`: the bar is full-bleed and its
   wording is not, so the gutter has to come from a box inside it. `flex` on an
   inline element is legal and computes the element to a block box. */
.lc-alarmbar__inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.lc-alarmbar__glyph {
	flex: 0 0 auto;
}

/* ==========================================================================
   4. Quick risk check
   ========================================================================== */

/*
 * Six glyphs and six short names, on the band fill.
 *
 * No top rule: the alarm bar above it already declares its own bottom edge in
 * `--lc-danger`, and a second hairline 1px under it would be two boundaries at
 * one join.
 */
.lc-quickcheck {
	padding-block: clamp(1.25rem, 3vw, 2rem);
	background: var(--lc-band);
}

.lc-quickcheck__inner {
	display: grid;
	gap: 1rem clamp(1rem, 3vw, 2.5rem);
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
}

.lc-quickcheck__heading {
	margin: 0;
	font-size: var(--lc-t-lg);
	letter-spacing: -0.012em;
}

/*
 * The column count is **declared at each step and never `auto-fit`**, and the
 * separators are why.
 *
 * `repeat(auto-fit, minmax(7.5rem, 1fr))` reflows on its own and is the obvious
 * rule here; it was the first one written and it is wrong, because the divider
 * between cells is a `border-left` and the item that must not have one is the
 * first *of each row* — which `auto-fit` never tells the stylesheet. Only
 * `:first-child` can be exempted, so at two across the third and fifth cells
 * draw a hairline hanging in the left margin with nothing to its left. Found in
 * a 390px screenshot, invisible in every probe: it is one pixel wide and no
 * measurement asks about it.
 *
 * Three declared counts and three `:nth-child()` exemptions cost six lines and
 * are exact at every width. 7.5rem — the narrowest cell "Newly registered
 * domain" reads in at two lines — survives as the two-column floor: at 320px
 * each cell is 8.4rem.
 */
.lc-quickcheck__list {
	display: grid;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/*
 * `--lc-rule` composited on the band is the site's ordinary hairline; the cells
 * are 34px glyphs over a word, so the separator is doing spacing rather than
 * carrying a boundary anything depends on.
 */
.lc-quickcheck__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem;
	border-left: 1px solid var(--lc-rule);
	text-align: center;
}

.lc-quickcheck__item:nth-child(2n + 1) {
	border-left: 0;
}

@media (min-width: 38rem) {
	.lc-quickcheck__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.lc-quickcheck__item:nth-child(2n + 1) {
		border-left: 1px solid var(--lc-rule);
	}

	.lc-quickcheck__item:nth-child(3n + 1) {
		border-left: 0;
	}
}

.lc-quickcheck__glyph {
	flex: 0 0 auto;
	color: var(--lc-accent);
}

.lc-quickcheck__name {
	color: var(--lc-fg-soft);
	font-size: var(--lc-t-sm);
	font-weight: 600;
	line-height: 1.35;
}

@media (min-width: 62rem) {
	.lc-quickcheck__inner {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.lc-quickcheck__list {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	/* One row of six, so only the first cell is a row start. Both narrower
	   exemptions have to be put back or the fourth cell keeps the one the
	   three-column step gave it. */
	.lc-quickcheck__item:nth-child(2n + 1),
	.lc-quickcheck__item:nth-child(3n + 1) {
		border-left: 1px solid var(--lc-rule);
	}

	.lc-quickcheck__item:first-child {
		border-left: 0;
	}
}

/* ==========================================================================
   5. The checklist
   ========================================================================== */

/*
 * The band boundary this one *does* need, and it is load-bearing in both
 * schemes because the surfaces either side of it are pinned.
 *
 * Below the quick-check row the fill goes #f5f6f8 to #ffffff — 1.08:1, the
 * brand's own light gray against white, and the exact value section 2b's floor
 * of 1.03 exists to admit *because* a rule is carrying the join. There is no
 * second reading of this one: `.lc-onpaper` means the step is 1.08:1 for every
 * visitor, so the hairline is the whole boundary and never decoration.
 */
.lc-checklist {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
	border-top: 1px solid var(--lc-rule);
	background: var(--lc-bg);
}

/*
 * 76rem is the same split the homepage's warning-signs band takes, and for the
 * same kind of reason: below it the rail would leave the checklist rows about
 * 300px of description column, which is three and four lines per row over six
 * rows. Above it the rail is 22.5rem — 360px, the width the report card on the
 * homepage was measured to and the width the design reference draws this card at
 * (365px).
 *
 * `align-items: start` is what lets the rail sit level with the heading while
 * being *after* the list in the DOM, which is the order a phone wants: six signs
 * first, then the two things to do about them.
 */
.lc-checklist__grid {
	display: grid;
	gap: clamp(2rem, 4vw, 3rem);
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
}

@media (min-width: 76rem) {
	.lc-checklist__grid {
		grid-template-columns: minmax(0, 1fr) 22.5rem;
	}
}

/*
 * The counter is reset **here**, on the wrapper, and not on either `<ol>`.
 *
 * The disclosure splits the six rows across two lists, and a counter reset on
 * each of them restarts the second at 01 unless somebody writes the offset in by
 * hand — a magic number that has to agree with the `start` attribute and with
 * the `array_slice()` in the template, in three places and two languages. Reset
 * once above both lists and it runs 01 to 06 straight through them in document
 * order, and the split can move by editing one variable.
 */
.lc-checklist__main {
	min-width: 0;
	counter-reset: lc-check;
}

.lc-checklist__heading {
	margin: 0 0 1.25rem;
	font-size: var(--lc-t-xl);
	letter-spacing: -0.016em;
}

.lc-checks {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * A row card: the glyph, the ordinal, a rule, the statement, and the one thing
 * to do about it.
 *
 * `--lc-bg` with a `--lc-rule` edge, which is the pairing `.lc-sign` already
 * uses. Under `.lc-onpaper` that is a white card on a white page distinguished
 * by its hairline alone — section 2b's floor exists to say a hairline may *be*
 * the boundary — with the verify panel inside it stepping to `--lc-band` at
 * 1.081:1, which is the reference's own light-gray-on-white relationship.
 *
 * The tokens rather than the literals, still, and that is not a formality: read
 * `#ffffff` and `#f5f6f8` off this file and the card stops following
 * `.lc-onpaper` the day anything is dropped in here that is *not* pinned.
 */
.lc-check {
	display: grid;
	align-items: center;
	gap: 0.9rem 1rem;
	margin: 0;
	padding: 1rem 1.25rem;
	border: 1px solid var(--lc-rule);
	border-radius: var(--lc-radius);
	background: var(--lc-bg);
	grid-template-columns: auto auto minmax(0, 1fr);
	counter-increment: lc-check;
}

/*
 * Placed explicitly, all four, rather than left to auto-flow.
 *
 * The mark is skipped entirely where its glyph resolves to nothing, and with
 * auto-placement that shifts every later item one column left — the verify panel
 * would land in the description's track and take its width. Explicit placement
 * costs one collapsed column and a stray gap in a case that cannot happen today
 * (all six glyphs are in `lc_theme_own_glyphs()`, which never answers empty for
 * them) and cannot mislay the layout in the case that can.
 */
.lc-check__mark {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	color: var(--lc-accent);
	grid-area: 1 / 1;
}

/*
 * The size is declared here and the `34` in the template is the no-CSS
 * fallback, not a second source of truth — the arrangement `.lc-step__icon` and
 * `.lc-sign__glyph` both document. Left to the attribute alone the glyph stops
 * following the type scale, which is what the harness's orphan sweep caught:
 * a class emitted into the markup with no rule anywhere renders at very nearly
 * the right size and looks almost deliberate.
 */
.lc-check__glyph,
.lc-quickcheck__glyph {
	width: 2.125rem;
	height: 2.125rem;
}

.lc-check__num {
	grid-area: 1 / 2;
}

/*
 * `--lc-fg-quiet`, which clears 4.5:1 on both page surfaces. The ordinal is
 * `aria-hidden` and carries nothing the row does not also say, but it is read
 * with the eye at 22px and a decorative element is not an excuse for a value
 * nobody can make out.
 *
 * `counter()` and never a number in the markup: a hand-written "05" is one that
 * can disagree with the row it is printed on, and the disclosure means the rows
 * are already in two lists.
 */
.lc-check__num::before {
	color: var(--lc-fg-quiet);
	font-size: var(--lc-t-xl);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
	content: counter(lc-check, decimal-leading-zero);
}

/*
 * `min-width: 0` is load-bearing rather than tidy: a grid item's default
 * `min-width: auto` refuses to shrink below its longest word, which is how a
 * domain or a part code in this column would push the card past its track
 * instead of wrapping inside it.
 */
.lc-check__body {
	min-width: 0;
	grid-area: 2 / 1 / 3 / -1;
}

.lc-check__title {
	margin: 0;
	font-size: var(--lc-t-md);
	letter-spacing: -0.008em;
	line-height: 1.35;
	text-wrap: balance;
}

.lc-check__detail {
	margin: 0.35rem 0 0;
	color: var(--lc-fg-soft);
	font-size: var(--lc-t-ui);
	line-height: 1.55;
}

.lc-check__verify {
	padding: 0.75rem 0.9rem;
	border-radius: var(--lc-radius);
	background: var(--lc-band);
	grid-area: 3 / 1 / 4 / -1;
}

/*
 * The label is `--lc-accent-text`, not `--lc-accent`.
 *
 * It is a *word* — 5.72:1 on paper and 5.29:1 on the band it is printed on —
 * where the mark token is 3.29:1 and clears a border and a glyph and nothing
 * else. The three golds exist for exactly this distinction and the harness
 * asserts both directions of it.
 */
.lc-check__verify-label {
	margin: 0 0 0.2rem;
	color: var(--lc-accent-text);
	font-size: var(--lc-t-xs);
	font-weight: 700;
	letter-spacing: 0.11em;
	line-height: 1.3;
	text-transform: uppercase;
}

.lc-check__verify-text {
	margin: 0;
	color: var(--lc-fg-soft);
	font-size: var(--lc-t-sm);
	line-height: 1.5;
}

/*
 * Four across, and 40rem is derived rather than picked.
 *
 * A row spends 187px before any description: 1.25rem of padding either side, its
 * 1px edge, the 3.25rem glyph, two 1rem gaps, the ordinal's own ~34px and the
 * 1rem padding and 1px rule the body starts with. The verify panel then takes
 * 27% of the card. At a 640px viewport the card is 576px, which leaves 233px of
 * description and 155px of instruction — two and three lines each. A step
 * narrower and the description is under 150px, which is where a four-word line
 * starts breaking mid-phrase.
 *
 * 27% with a 15rem ceiling is read off the design reference, which draws the
 * panel at 241px inside an 851px card — 28.3%. The ceiling is what stops it
 * growing past the reference's own figure on a wide monitor.
 */
@media (min-width: 40rem) {
	.lc-check {
		grid-template-columns: auto auto minmax(0, 1fr) clamp(9rem, 27%, 15rem);
	}

	.lc-check__body {
		padding-left: 1rem;
		border-left: 1px solid var(--lc-rule);
		grid-area: 1 / 3;
	}

	.lc-check__verify {
		grid-area: 1 / 4;
	}
}

/* ---- The disclosure ---------------------------------------------------- */

/*
 * A `<details>` and not a scripted collapse, which is the whole reason there is
 * no first-paint problem here: it is open-able with no JavaScript, it is in the
 * DOM and crawlable while closed, there is no `aria-expanded` to keep in step,
 * and nothing is ever hidden waiting for a script that might not arrive. That is
 * what the design brief's rule against a JavaScript reveal is really about.
 */
.lc-checkmore {
	margin-top: 0.75rem;
}

/*
 * `display: flex` already suppresses the disclosure triangle in every engine
 * that supports it on `summary`; `list-style` and the WebKit pseudo-element are
 * there for the two that do not, and neither is redundant with the other.
 */
.lc-checkmore__summary {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.85rem 0.25rem;
	color: var(--lc-fg);
	font-size: var(--lc-t-ui);
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}

.lc-checkmore__summary::-webkit-details-marker {
	display: none;
}

.lc-checkmore__summary:hover,
.lc-checkmore__summary:focus-visible {
	color: var(--lc-link);
}

/*
 * The chevron is the theme's `chevron-right` rotated, not a second glyph.
 *
 * `transform` rather than swapping the path, so the two states are one drawing
 * and the turn is something the reduced-motion block already reaches through
 * `transition-duration`.
 */
.lc-checkmore__chevron {
	flex: 0 0 auto;
	color: var(--lc-accent);
	transform: rotate(90deg);
	transition: transform var(--lc-speed) var(--lc-ease);
}

.lc-checkmore[open] .lc-checkmore__chevron {
	transform: rotate(-90deg);
}

/* ---- The rail ---------------------------------------------------------- */

/*
 * `--lc-invert-bg` / `--lc-invert-fg` for the header bar — the pair that means
 * "stand away from the page", which under `.lc-onpaper` is deep navy carrying
 * white at 17:1. That is the reference's bar exactly.
 *
 * **The semantic pair and not `--lc-ink` / `#ffffff`, even though the page is
 * pinned and the two now resolve to the same thing.** A literal here would be a
 * second decision about what "inverted" means, sitting one class away from the
 * block that already decides it — and it would be silently wrong the first time
 * this card is reused anywhere that is not pinned, where `--lc-ink` on the dark
 * scheme's #091525 page is **1.08:1** and the card appears to have lost its
 * title bar. That is the 1.4.0 disaster in miniature, and reading the token is
 * what keeps it impossible rather than avoided.
 *
 * `overflow: hidden` so the bar's corners are clipped by the card's radius
 * rather than each having to declare a matching one.
 */
.lc-beforepay {
	overflow: hidden;
	border: 1px solid var(--lc-rule-firm);
	border-radius: var(--lc-radius);
	background: var(--lc-bg);
}

.lc-beforepay__head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
	padding: 0.9rem 1.25rem;
	background: var(--lc-invert-bg);
	color: var(--lc-invert-fg);
	font-size: var(--lc-t-md);
	letter-spacing: -0.008em;
}

.lc-beforepay__glyph {
	flex: 0 0 auto;
}

.lc-beforepay__body {
	padding: 1.25rem;
}

.lc-beforepay__steps {
	display: grid;
	gap: 0.7rem;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: lc-beforepay;
}

.lc-beforepay__steps > li {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	font-size: var(--lc-t-ui);
	line-height: 1.45;
	counter-increment: lc-beforepay;
}

/*
 * A plain `counter()`, not `decimal-leading-zero`: these are four steps to take
 * in order and the checklist beside them is a numbered register of six signs.
 * Drawing both as "01" would say they are the same kind of list.
 */
.lc-beforepay__steps > li::before {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border: 1px solid var(--lc-rule-firm);
	border-radius: 50%;
	color: var(--lc-fg);
	font-size: var(--lc-t-xs);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	content: counter(lc-beforepay);
}

/*
 * The plugin's lookup, re-laid for a 360px rail and **nothing else changed**.
 *
 * Its label, its placeholder and its button wording are plugin msgids, and
 * `docs/theme-design.md` defers rewording them from the theme to a second pass —
 * a `gettext` filter is the kind of thing that bites later. So the design
 * reference's "Search part number or domain" and "Check now" are not what this
 * says, and its navy button is not what this draws either: the primary action is
 * gold everywhere on this site, which is a rule `lc-components.css` states and
 * gives a reason for.
 *
 * The label stays visible, which is the other departure. The reference shows a
 * bare field with a placeholder; a placeholder is not a label — it disappears on
 * the first keystroke, and this box is one somebody types a part code into
 * character by character.
 */
.lc-beforepay__lookup {
	margin-top: 1.1rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--lc-rule);
}

.lc-beforepay__lookup .lc-lookup {
	margin: 0;
}

.lc-beforepay__lookup .lc-lookup__label {
	color: var(--lc-fg-soft);
}

/*
 * Column, not row. The plugin's `.lc-lookup__row` is a wrapping flex row whose
 * input is `flex: 1 1 16rem`, so inside a rail this narrow it wraps on its own —
 * and the component sheet's fix for a wrapped row is behind a **viewport** media
 * query at 560px, which a 360px column inside a 1500px page never triggers. The
 * button would land on its own line at its content width: a 90px target under a
 * full-width field.
 */
.lc-beforepay__lookup .lc-lookup__row {
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 0.6rem;
}

.lc-beforepay__lookup .lc-lookup__input,
.lc-beforepay__lookup .lc-lookup__submit {
	flex: 0 0 auto;
	width: 100%;
}

.lc-beforepay__report {
	margin: 1.1rem 0 0;
	font-size: var(--lc-t-ui);
}

/*
 * Sticky only where there is a column for it to be sticky in, and it clears the
 * masthead by the token three other things already clear it by.
 *
 * The reduced-motion block in `style.css` reaches `animation-*` and
 * `transition-*` and nothing else, so `position` has to be stood down by name —
 * the same override `.lc-toc` and the homepage's method figure each carry, and
 * the one the harness fails on when it goes missing.
 */
@media (min-width: 76rem) {
	.lc-beforepay {
		position: sticky;
		top: calc(var(--lc-head-h) + 1rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lc-beforepay {
		position: static;
	}
}

/* ==========================================================================
   6. Print
   ========================================================================== */

/*
 * These rules live here rather than in `style.css` section 18, and that is not
 * filing — it is specificity.
 *
 * This sheet loads **after** `style.css`, so a `background` declared here for a
 * band ties with the print reset there on one class and wins on source order.
 * `.lc-signs` is listed by name in that block for exactly this reason, and the
 * note beside it says so. Four bands' worth of the same problem belongs beside
 * the rules causing it, where it cannot be forgotten by whoever adds the fifth.
 */
@media print {
	/*
	 * The band fills go, along with the hero's photograph. A print dialog omits
	 * backgrounds unless the reader ticks "Background graphics" — this is for the
	 * reader who ticks it, and for whom a full-bleed navy hero is a page of ink.
	 */
	.lc-guide-hero,
	.lc-quickcheck,
	.lc-checklist,
	.lc-check,
	.lc-check__verify,
	.lc-beforepay,
	.lc-beforepay__head,
	.lc-alarmbar {
		padding-block: 0.5rem;
		background: none !important;
	}

	.lc-guide-hero__bg {
		display: none;
	}

	/*
	 * The hero is `.lc-onimage`, which section 18 already un-inverts — white ink
	 * on a navy that print has dropped is an invisible headline. The header bar
	 * of the rail card is the same fault with the tokens the other way up: it
	 * paints `--lc-invert-fg` on `--lc-invert-bg`, and with the fill gone that is
	 * white text on white paper.
	 */
	.lc-beforepay__head {
		color: #000000;
	}

	.lc-alarmbar {
		color: #000000;
		border-block-color: rgba(0, 0, 0, 0.55);
	}

	/*
	 * Forced open, because a checklist that prints three of its six signs is a
	 * worse document than one that prints none — and the reader pressing "Print
	 * checklist" is asking for the checklist.
	 *
	 * Both properties, because engines close a `<details>` two different ways:
	 * the older UA rule is `display: none` on the non-summary children and the
	 * newer one is `content-visibility: hidden`. An author rule beats a UA rule
	 * whatever its specificity, so one selector answers both.
	 */
	.lc-checkmore:not([open]) > :not(summary) {
		display: block;
		content-visibility: visible;
	}

	.lc-checkmore__summary,
	.lc-guide-hero__actions,
	.lc-beforepay__lookup,
	.lc-beforepay__report {
		display: none;
	}

	/* The two columns collapse: the rail's four steps are worth printing, the
	   search box and the report link are not. */
	.lc-checklist__grid,
	.lc-check {
		display: block;
	}

	.lc-check {
		margin-bottom: 0.5rem;
		border: 1px solid rgba(0, 0, 0, 0.3);
		break-inside: avoid;
	}

	/*
	 * The ordinal is a grid item on screen and this block turns the row into a
	 * block box, so the number and the glyph would each take a line of their own
	 * above the statement. Inline is what puts them back on one.
	 */
	.lc-check__mark,
	.lc-check__num {
		display: inline-block;
		vertical-align: middle;
	}

	.lc-check__body {
		padding-left: 0;
		border-left: 0;
	}

	.lc-check__verify {
		margin-top: 0.4rem;
		border: 1px solid rgba(0, 0, 0, 0.3);
	}

	.lc-beforepay {
		border: 1px solid rgba(0, 0, 0, 0.3);
	}

	.lc-quickcheck__item {
		border-left: 1px solid rgba(0, 0, 0, 0.3);
	}
}
