Pilot for the index.css break-up. Establishes the pattern for compound,
portaled components:
- the `import './x.css'` goes in the ROOT `.svelte` (dialog.svelte); the
barrel imports the root, so the CSS loads when ANY part mounts.
- portaled content stays styled: recipe ships in dialog's chunk, tokens
(--dialog-content-bg, …) come from base.css global → verified in
browser that the portaled [data-dialog-content] keeps bg/radius/
shadow/padding.
`@layer` evaluated and DISCARDED (evidence-based): 0 current usage, 16
!important that @layer would silently invert, and per-component
[data-*] scoping already prevents cross-component collisions. Kept as a
documented escape hatch.
index.css 94→93 @imports; monolith 814,420→805,692 raw (−8.7 KB) /
−1.1 KB gz. Reworded the policy comment to be list-free (no churn across
the remaining 93). check 0 errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verified every figure in the audit against the real build (all exact).
Two corrections: (1) the 10 "code-splittable" components were actually
double-loaded — still @import-ed in index.css on top of self-importing;
(2) base.css (41% of the monolith, 52 KB gz) is the real floor and
carries per-component token contracts ([data-badge]×8 stays in base.css
after removing badge.css), so splitting recipes alone can't go below it.
Added the phased execution plan (0–5) with the cascade-order risk and
the cross-coupling audit (only words→textarea, safe). Recorded Phase 0:
index.css 104→94 @imports, monolith −36 KB raw / −4.5 KB gz, double-load
eliminated, no broken coupling.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>