You should add custom css file and apply style there.
for add custom css.
app / design / frontend / [vendor] / [theme] / Magento_Theme / layout
app / design / frontend / [vendor] / [theme] / web / css
create or update
app / design / frontend / [vendor] / [theme] / Magento_Theme / layout
/ default_head_blocks.xml
default_head_blocks.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/framework/Module/etc/module.xsd">
<head>
<css src="css/custom.css" />
</head>
</page>
Create your custom css file.
app / design / frontend / [vendor] / [theme] / web / css / custom.css
Ref: How to add a custom CSS file in Magento 2