To change the color, you need to change the style of the button.
CSS uses something called specificity, which determines how browsers decide which css rules to ignore. The order of importance with CSS selectors is: element, class, id, and style.
Your use of the style attribute means that you cannot override it. Your only solution from here is to remove the green color from your style selector, moving it to an element selector.
Pro Tip: Use the least important CSS selector (element first, then class, etc…) to give you the greatest level of control.
Then when you want to override that green color with a different one (such as yellow), you can add a class name to the element.
No you don’t - JavaScript does not work when jumbled with HTML when proper security is implemented - that’s how it used to be done in the prehistoric 20th century but it certainly should NEVER be done that way unless the most modern browser you intend to support is Netscape 4.
You might like to write all your code as if it is 3000BC but don’t go advising others to be 5000 years out of date with the way they write it.
JavaScript MUST go in a separate file or your CSP headers will prevent ift from running at all.