/**
 * core/post-date rules, each scoped to the unit that owns it.
 *
 * This file is shared by construction: every unit that places a core/post-date lands here. Nothing in it
 * may be written unscoped -- a rule with no unit hook class repaints every instance of the
 * block on the site, which is a theme decision and belongs to wp-theme-scaffold.
 */

/*
 * .wm-news-teaser-card: the teaser's date is 18px, and a block attribute cannot say so on
 * this theme.
 *
 * The contract's core/post-date node measures the block at 310x27 with an 18px `<time>` of
 * weight 700 inside it, and 27 is exactly 18 x the theme's root `lineHeight` of 1.5 -- so the
 * size and the leading corroborate each other and neither is rounded. theme.json's own
 * `styles.blocks.core/post-date.typography.fontSize` is `small` (1rem, `fluid: false`), which
 * renders the same block 16px over a 24px box, and that 3px of height moves the title and the
 * excerpt under it by the same amount.
 *
 * WHY NOT THE BLOCK'S OWN `fontSize` ATTRIBUTE: `settings.typography.fluid` is true, so core's
 * wp_render_typography_support() rewrites a custom px size into a clamp at render -- measured
 * on this install for 28px in heading.css's .wm-image-link-cards note, where the pattern file
 * said 28px and the served page said clamp(17.905px, ..., 28px). Every size on this theme's
 * ladder is `fluid: false` and none of them is 18: `small` is 16 and `medium` is fluid
 * {17, 20}. A scoped rule is the one spelling that is not fluid.
 *
 * WHY THIS BEATS theme.json: the block-level rule core compiles from
 * `styles.blocks.core/post-date` is `.wp-block-post-date { ... }`, specificity 0,1,0. This is
 * 0,2,0, so no `!important` is needed and no inline style is being fought.
 *
 * NOT A BREAKPOINT RULE, and that is an assumption stated rather than a measurement: the
 * contract carries the root's box at all four viewports but no per-viewport font size, and a
 * fixed px size is what the source (Zurb Foundation 6, fixed px type) does. If a comparison
 * at 1024, 768 or 390 shows the date's box off by a line, this is the first rule to doubt.
 *
 * THE WEIGHT IS NOT HERE. `fontWeight: "700"` is the contract's own attribute on the block and
 * is written in patterns/news-teaser-card.php -- an attribute is the higher rung and weight is
 * not rewritten by the fluid machinery.
 */
.wm-news-teaser-card .wp-block-post-date {
	font-size: 18px;
}

/*
 * .wm-news-article: the article's date is 18px, for the same reason and by the same route as
 * .wm-news-teaser-card's above.
 *
 * The contract's core/post-date node measures the block 970x67 at y=203 with the `<time>` inside it
 * "142x21 at y=226, 18px w700, and `color: rgb(219, 36, 11)`". 21px of content area over an 18px
 * font is that font's own ratio, and 18 x the theme's root `lineHeight: 1.5` is the 27px line box
 * the node's 67px height is built from (20 + 27 + 20; the 20s are the block's padding, written as
 * an attribute in patterns/news-article.php).
 *
 * WHY NOT THE BLOCK'S OWN `fontSize` ATTRIBUTE, and why not a preset: both are the note above,
 * unchanged. `settings.typography.fluid` is true, so core rewrites a custom px size into a clamp()
 * at render, and no slug on this theme's ladder is 18 -- `small` is 16 and `medium` is fluid
 * {17, 20}. theme.json's own `styles.blocks.core/post-date.typography.fontSize` is `small`, which
 * renders this block 16px over a 24px line box and would cost 3px of height on a unit whose every
 * child box is contiguous.
 *
 * THE COLOUR IS NOT HERE AND THE WEIGHT IS NOT HERE. `textColor: primary` and
 * `fontWeight: "700"` are both attributes the contract states, and both are written in
 * patterns/news-article.php -- an attribute is the higher rung, and neither a palette slug nor a
 * weight is rewritten by the fluid machinery.
 *
 * NOT A BREAKPOINT RULE. `small` is `fluid: false` and this 18px is flat, which is what the source
 * (Zurb Foundation 6, fixed px type) does; the contract carries no per-viewport font size for the
 * date. Same assumption, stated the same way, as the rule above.
 */
.wm-news-article .wp-block-post-date {
	font-size: 18px;
}
