What part of GTK3 theme determines Calc row/column header border color?

As in this question, I would like to change the appearance of the row and column headers in Calc.

I am using Ubuntu with Gnome and observed that changing the “Legacy Applications” theme in Tweaks changes the styling of the headers. Thus, my question is which part of the theme is used to style the headers. In other words, which GTK3 classes would I need to change the CSS styling of to change the appearance of the headers? I am interested mostly in the dividers/borders between header boxes.

I understand that this will change the appearance of UI elements outside Calc, so I will be careful. I also understand that the eventual use of libadwaita may obsolete any modifications I make. Any guidance on GTK4 classes and libadwaita would be welcome as well.

Purpose of question

I think the heavy borders I get in Gnome distract from the content (e.g. row numbers) and are also just not pretty:


Ubuntu 22.04
Gnome Shell 42.2
Theme: default

About LO

Version: / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.4~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded