Make text appear in front of fill when using tikzmarknode

tikz-stylestikzmark

I've produced the following output:
enter image description here
Here's the MWE:

\documentclass[12pt]{article}

\usepackage{tikz}
\usetikzlibrary{arrows.meta, bending, tikzmark, positioning, fit}

\tikzset{arrow/.style={red, -{stealth[length=10mm, blue]}, line width=0.5mm, line cap=round}}

\tikzset{lrarrow/.style={red, {stealth[length=10mm, blue]}-{stealth[length=10mm, blue]}, line width=0.5mm}}

\tikzset{block1/.style={rectangle, rounded corners, draw=red, fill=red!5}}

\begin{document}

\begin{equation}
    \tikzmarknode{a1}{a}^2 + b^2 = \tikzmarknode{c1}{c}^2 \hspace{2cm} \tikzmarknode{a2}{a} = \ \tikzmarknode{cb}{\sqrt{c^2-b^2}}
\end{equation}

\begin{tikzpicture}[overlay, remember picture]
    \node[block1, fit=(cb)] (bla) {};
    \draw[arrow, shorten >=3pt, shorten <=1pt] (a1.north) to[out=70, in=120] (a2.north);
    \draw[lrarrow, shorten >=5pt, shorten <=8pt] (c1) to (a2);
\end{tikzpicture}


\end{document}

My problem is that the text inside the node is covered up when using the fill=color command. Removing that from block1, I get my output displayed:

enter image description here

Can anyone figure out a solution such that my output is still displayed when using fill?

Best Answer

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, tikzmark}
\tikzset{
arrow/.style={red, -{stealth[length=10mm, blue]}, line width=0.5mm, line cap=round},
lrarrow/.style={red, {stealth[length=10mm, blue]}-{stealth[length=10mm, blue]}, line width=0.5mm},
block1/.style={rectangle, rounded corners, draw=red, fill=red!5, inner sep=.3333em},
}

\begin{document}
\begin{equation}
    \tikzmarknode{a1}{a}^2 + b^2 = \tikzmarknode{c1}{c}^2 \hspace{2cm} \tikzmarknode{a2}{a} = \ \tikzmarknode[block1]{cb}{\sqrt{c^2-b^2}}
\end{equation}
\begin{tikzpicture}[overlay, remember picture]
  \draw[arrow, shorten >=3pt, shorten <=2pt] (a1.north) to[out=70, in=120] (a2.north);
  \draw[lrarrow, shorten >=5pt, shorten <=8pt] (c1) to (a2);
\end{tikzpicture}
\end{document}

Equation with arrows an a pink shaded part