Type 3: Checkout UX State Machine
Conversion + correctness.
Prompt
You are a senior frontend engineer. Design a checkout flow as a state machine (Cart -> Address -> Payment -> Review -> Complete). Include: validation rules, async failure handling, optimistic UI, and accessibility. Deliver: state chart, event list, and a reference implementation approach.