/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright (c) 2026 Helpmefindthejob contributors */

/* Helpmefindthejob — accessibility overrides for mkdocs-material.
 *
 * The §3.6 first-pass accessibility audit (axe-core CLI 4.11.4, 2026-05-19)
 * found that inline body links in the default mkdocs-material theme rely
 * on color alone to distinguish themselves from surrounding text, which
 * fails WCAG 1.4.1 (Use of Color) as the `link-in-text-block` axe rule.
 *
 * This stylesheet adds an underline to inline body-content links so the
 * distinction is non-color-dependent. The mkdocs-material theme has its
 * own underline conventions for navigation and header links; we scope
 * this to `.md-content` body links only so the theme chrome stays clean.
 *
 * Audit evidence: docs/grant/accessibility-audit-2026-05-19/ (raw axe JSON).
 * Remediation reference: ACCESSIBILITY.md.
 */

.md-content a:not(.md-button):not([class^="md-"]) {
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.2em;
}

/* Preserve the no-underline aesthetic for theme-managed link
 * classes (md-button, md-search-result__link, etc.) — the
 * underline rule above explicitly excludes any link whose class
 * starts with `md-` (the theme's namespacing convention). */

/* Pygments syntax-highlighting color overrides for code-block
 * comments, docstrings, and variables. The default mkdocs-material
 * pygments theme paints these classes at #717171 on the #f5f5f5
 * code-block background, yielding a contrast ratio of 4.47:1 —
 * just below the WCAG 2.2 AA 4.5:1 floor (axe `color-contrast`
 * SERIOUS, re-surfaced 2026-05-19 post-rename audit).
 *
 * Scoped to `.md-typeset .highlight` so the override only applies
 * inside mkdocs-material content code blocks and never bleeds into
 * the app's own static-page chrome. The #595959 foreground yields
 * ~6.1:1 against the same background — comfortably above the floor
 * with margin for future palette tweaks. Dark-mode (`scheme="slate"`)
 * already passes contrast; the override is light-mode only. */
[data-md-color-scheme="default"] .md-typeset .highlight .c,
[data-md-color-scheme="default"] .md-typeset .highlight .c1,
[data-md-color-scheme="default"] .md-typeset .highlight .cm,
[data-md-color-scheme="default"] .md-typeset .highlight .cp,
[data-md-color-scheme="default"] .md-typeset .highlight .cs,
[data-md-color-scheme="default"] .md-typeset .highlight .sd,
[data-md-color-scheme="default"] .md-typeset .highlight .nv {
  color: #595959;
}
