/*
 * Accessibility remediation overrides for powerhouseprep.com
 * Audit date: 2026-07-22
 * Additive only. Loaded after the frozen Bootstrap bundle so these rules win.
 * Rendered text content is unchanged; these tweaks affect distinguishability,
 * color contrast, and keyboard bypass only.
 */

/* --- WCAG 1.4.1 Use of Color: in-text links must be distinguishable
       without relying on color alone. Underline links that sit inside
       blocks of prose, alerts, tables, and the footer. Buttons and
       image-only links are excluded. --- */
p a:not(.btn):not(.navbar-brand),
li.list-group-item a:not(.btn),
.alert a:not(.btn),
.card-text a:not(.btn):not([href*="amazon."]),
td a:not(.btn),
th a:not(.btn),
footer a:not(.btn) {
  text-decoration: underline;
}

/* --- WCAG 1.4.3 Contrast (Minimum) --- */

/* Footer links: dark-blue-on-dark measured 1.71:1. Lighten to a high-contrast
   blue against the dark footer while keeping the underline above. */
/* Bundle sets `.text-white a` (0,1,1); match footer.bg-dark to outrank it. */
footer.bg-dark a {
  color: #9ec5ff;
}
footer.bg-dark a:hover,
footer.bg-dark a:focus {
  color: #cfe2ff;
}

/* Alert links: darken so link text clears 4.5:1 on the light alert fill. */
.alert-primary a {
  color: #062a63;
}

/* "Recommended" / credits card badge: white on #28a745 = 3.13:1.
   Bundle uses `.card .card-badge`, so match that specificity to win. */
.card .card-badge {
  background-color: #157347;
}

/* Secondary buttons (404 nav buttons and secondary CTAs): darken the fill
   and use white text for a strong ratio. */
.btn.btn-secondary {
  color: #ffffff;
  background-color: #595959;
  border-color: #595959;
}
.btn.btn-secondary:hover,
.btn.btn-secondary:focus {
  color: #ffffff;
  background-color: #454545;
  border-color: #454545;
}

/* Data-table header cells on light tables (e.g. privacy policy): the default
   gray header text measured ~2.68:1. Darken it. Dark-headed tables are left
   untouched so their light-on-dark text is preserved. */
.table thead:not(.thead-dark) th {
  color: #333333;
}

/* --- WCAG 2.4.1 Bypass Blocks: skip-to-content link --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 8px 16px;
  background: #062a63;
  color: #ffffff;
  text-decoration: underline;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* The skip-link target should not paint a visible outline box when focused
   programmatically, but must remain reachable. */
#main-content:focus {
  outline: none;
}
