YOu can't do <style> inside a <body>, so the stamp will need to handle parsing for a <head> and adding the style part there. It'll be more hacky, but it needs to be done.