/*
 * Hides SplitPro's GitHub and sponsor buttons. Injected by nginx.
 *
 * Served from /var/www/splitpro-addons/_hide_promos.css and pulled in by a
 * sub_filter in scripts/nginx-splitpro.conf, which rewrites </head> on page
 * responses. Same reasoning as _a2hs.js: SplitPro is the pinned upstream image,
 * so nginx is the one place in the request path we own.
 *
 * WHY A STYLESHEET, AND WHY IN <head>
 * -----------------------------------
 * These buttons are React-rendered, so removing them from the DOM would fight
 * hydration and come back on every client-side navigation. A rule that hides
 * them applies to whatever React renders, whenever it renders it. Linked from
 * <head> it is render-blocking, so the buttons never flash in before it loads.
 *
 * WHY THE SELECTORS ARE HREFS
 * ---------------------------
 * The buttons have no ids or classes of their own -- only Tailwind utilities
 * shared with every other row on the page. Their link targets are the one
 * thing that identifies them, and read out of the v2.1.5 bundles they are:
 *
 *   /account   "Star us on GitHub"  https://github.com/oss-apps/split-pro
 *   /account   "Sponsor us"         https://github.com/sponsors/krokosik
 *   /add       "Sponsor us" pill    https://github.com/sponsors/krokosik
 *   /account   "Write a review"     https://www.producthunt.com/products/splitpro/reviews/new
 *
 * The repo link is matched EXACTLY. The sign-in page links a deeper path in the
 * same repo (docker/README.md) mid-sentence when no auth provider is
 * configured, and a prefix match would leave that sentence with a hole in it.
 *
 * If a tag bump changes a target, the button simply reappears -- nothing breaks.
 * tests/test_homescreen_prompt.py pins these hrefs; re-read the bundles when
 * bumping the tag.
 */

/*
 * EVERY RULE HIDES A LINK AND NOTHING ELSE. An earlier version also hid
 * `div:has(> a[href^=".../sponsors/"])` to tidy the empty wrapper the add-expense
 * pill leaves behind. On /account the Sponsor row is a DIRECT child of the
 * container holding every row, so that rule hid the whole list -- language,
 * bank, notifications, download, everything but Log out (13 Sep 2026). An empty
 * wrapper with no height is the price of never doing that again.
 */
a[href="https://github.com/oss-apps/split-pro"],
a[href^="https://github.com/sponsors/"],
a[href^="https://www.producthunt.com/products/splitpro/reviews"] {
    display: none !important;
}
