Apply styles to only events from most recent action?

I’m building a game to be played specifically through Quixie (Glulx). I’m looking to have a separate color for the main text which follows the player’s most recent input. Everything behind the most recent input command would be a different color. I’m attempting to find out this is possible through extensions or if it would have to be done via Javascript somehow. How could I go about searching for the best way to accomplish this?

This is only possible with Javascript. You’d want to add a CSS class to all paragraphs in the story window before performing the turn’s update.

(This is a requested feature in Lectrote, but I haven’t gotten around to it.)