CSS State Machine