/* CAM contrast corrections — measured, not eyeballed.
 *
 * Found 2026-09-01 by walking every text node on the rendered pages with
 * Playwright and computing WCAG 2.1 ratios against the resolved background.
 * Nine failures, three of them at ratio 1.00 — white text on white, literally
 * invisible.
 *
 * ROOT CAUSE of the invisible text: the lime theme sets --header-background
 * and --footer-background, but the .gdoc-header / .gdoc-footer elements never
 * consume them; they are transparent. Penn's dark-mode-fixes stylesheet had
 * been painting those bars, so removing it (to stop it overriding the lime
 * theme) also removed the dark ground that white header text depended on.
 * One fix broke the other. This file supplies the paint the theme assumes.
 *
 * SECOND FINDING, worth stating because it is about the palette itself:
 * white on the theme's own lime #8db600 is only 2.38:1 — the theme's intended
 * combination fails AA on its own. So the bars use the deep green #2b5a36
 * (white on it = 8.02) and lime stays as the accent it is good at being.
 *
 * Ratios below are computed, and every one clears AA (4.5 body / 3.0 large).
 */

:root {
  /* #76b947 on white was 2.39. This is the same hue, dark enough to read. */
  --link-color: #4a7c2a;            /* on white = 4.99 */
  --link-color-visited: #3f6b20;    /* on white = 6.30 */
}

/* The bars the theme forgot to paint.
 *
 * NOT done with `background:` on .gdoc-header — that loses. background-system.css
 * (the template's header-image feature) declares
 *     .gdoc-header { background: var(--header-bg-color) !important; }
 * and ships that variable as `transparent`, so an !important transparent was
 * beating every ordinary rule. The fix is to set the variable the system is
 * built around rather than to escalate specificity against it. */
/* Set in config/_default/params.yaml (headerStyle.background /
 * footerBackgroundStyle.background), not here — the inline block Hugo
 * generates from those params is scoped tighter than :root, so a stylesheet
 * declaration loses to it no matter the load order. Chased that for three
 * rounds; recording it so the next person does not. */

.gdoc-header,
.gdoc-header a,
.gdoc-header__link,
.gdoc-brand,
.gdoc-footer,
.gdoc-footer a,
.gdoc-footer__link,
.gdoc-footer__claude-models {
  color: #ffffff;
}

/* Footer links were orange #ff9500 — 2.20 on white, 3.65 on the green bar.
   Pale lime keeps the palette and clears AA comfortably. */
.gdoc-footer a,
.gdoc-footer__link {
  color: #d9f27a;                  /* on #2b5a36 = 6.47 */
}

/* Body links inside prose, including the ones the theme colours separately. */
.gdoc-markdown a,
.gdoc-markdown__link,
.gdoc-page__nav--next,
.gdoc-page__nav--prev {
  color: #4a7c2a;
}

/* The course-facts list and poll summaries were fine on ratio but sat at the
   theme's muted grey; nudged darker so the numbers read as data, not chrome. */
.poll-q__summary,
.poll-results__meta {
  color: #4a5148;                  /* on white = 7.55 */
}
