"""IMP-45 (#74) u3 — slide-level CSS override injector for Phase Z final.html. Mirror of :func:`src.image_id_stamper.inject_image_overrides_style` contract (image_id_stamper.py:226-264) for the new ``slide_css`` override axis registered by u1 in :data:`src.user_overrides_io.KNOWN_AXES` and surfaced by u2 in :func:`src.mdx_normalizer.normalize_mdx_content` under the ``slide_overrides.css`` frontmatter key. Single entry point : :func:`inject_slide_css` (html, css) -> str Semantics (identical contract to image_overrides injector) : - Empty / falsy ``css`` -> ``html`` returned unchanged (no DOM mutation). - Marker-wrapped ``\n" f"{_IMP45_STYLE_MARKER_CLOSE}" ) if _IMP45_STYLE_MARKER_OPEN in html: return _IMP45_STYLE_BLOCK_RE.sub(lambda _m: block, html, count=1) head_close = _HEAD_CLOSE_RE.search(html) if head_close is not None: idx = head_close.start() return html[:idx] + block + "\n" + html[idx:] body_open = _BODY_OPEN_RE.search(html) if body_open is not None: idx = body_open.end() return html[:idx] + "\n" + block + html[idx:] return block + "\n" + html