Looks like it needs some small touchups; like the missing }
but one way to do it is to wrap it in a <style>
element and place it in an HTML embed on the page with the form.
If you have multiple forms, it’s likely easier to place that embed inside of a sitewide component like your nav or footer.