/*
 * Links on dark surfaces. Tabler draws them in --tblr-primary (#066fd1): 3.6:1 on the
 * app's dark canvas and 3.2:1 on its cards and popovers, under WCAG AA's 4.5:1. These
 * are Bootstrap's own dark-mode link colours (primary-text-emphasis), 5.3:1 or more on every
 * dark surface the app shell and Tabler paint, the word-help popover included. Dark only
 * (owner decision 2026-10-01): light mode keeps the brand blue. One fixed blue, so a
 * data-bs-theme-primary variant (no app screen sets one) does not tint dark links.
 * The doubled attribute outranks Tabler's [data-bs-theme=dark] wherever the attribute is
 * set: the page, or a dark island such as the admin sidebar.
 * Linked by the layouts whose pages paint Tabler's dark surfaces (DarkModeLinkStylesheetTest);
 * the public and sign-in pages do not run Tabler's theme script, never turn dark and do not.
 */
[data-bs-theme="dark"][data-bs-theme="dark"] {
    --tblr-link-color: rgb(106, 169, 227);
    --tblr-link-color-rgb: 106, 169, 227;
    --tblr-link-hover-color: rgb(135, 186, 233);
    --tblr-link-hover-color-rgb: 135, 186, 233;
}

/*
 * Tabler paints link-styled buttons in a fixed blue after its own variable rule, so they
 * take the link colours here too. :where() keeps these as light as Tabler's rules, so a
 * button's own colour (disabled, the report button, a text utility) still wins.
 */
:where([data-bs-theme="dark"]) .btn-link {
    color: var(--tblr-link-color);
}

:where([data-bs-theme="dark"]) .btn-link:hover {
    color: var(--tblr-link-hover-color);
}

/* Links the app colours with the brand blue on purpose: the study menu's current page, the admin's active section, the pressed Expand box. */
[data-bs-theme="dark"] .app-study-menu-link[aria-current],
[data-bs-theme="dark"] .app-admin-primary-link.active,
[data-bs-theme="dark"] .tutor-writing-jump[aria-pressed="true"] {
    color: var(--tblr-link-color);
}
