Problem statement
A small storefront page renders one featured product card and a newsletter signup. Instead of a single entry file where every helper is inline and stitched together with globals, the formatting, validation, and DOM helpers must live in their own modules — importable and testable on their own — with a thin entry that wires them to the page using Vanilla TypeScript and standard DOM APIs.
Demo
The page, styles, product interface, and seeded product data are already scaffolded and wired. Only the three helper modules in src/js/ — format.ts, validate.ts, and dom.ts — and the entry wiring in script.ts are missing. Implement them so every test passes. Do not edit any other file.
What to implement
- Show a featured product card that displays the seeded product's name.
- Show the current price of the product formatted as dollars with two decimal places.
- Show the savings versus the original price as a whole-number percentage badge next to the price.
- Show a newsletter signup panel with an email field and a Subscribe button.
- Keep the Subscribe button disabled until the email field holds a valid email address; enable it as soon as the value looks like an email, and disable it again if the value stops looking like one.
- Leave the seeded product data unchanged.
- Everything shown must come from the seeded product — nothing should be hardcoded.
