/* Equation Station SA: accessibility fixes (design-system migration step 8). Loaded last in <head> on every page.
   Uses tokens.css roles with literal fallbacks. Each rule starts with "html" so it wins over the rule it fixes even
   when analytics-events.js injects site-shell-v2.css after this file. See quality/design/DESIGN_SYSTEM.md. */

/* 1. Practise-section buttons ("Open Mastery Bank", "Take the Quick Test", ...): navy on blue was 2.84:1.
      White on --es-blue-600 is 5.70:1; hover --es-blue-800 is 7.32:1; dark mode navy on --es-blue-400 is 7.0:1.
      The disabled state (.is-disabled, higher specificity) keeps its grey. */
html .rcp-download-btn{background:var(--es-color-accent-fill,#1768b5);color:var(--es-color-text-on-accent,#fff);border-color:var(--es-color-accent-fill,#1768b5)}
html .rcp-download-btn:hover,html .rcp-download-btn:focus-visible{background:var(--es-color-accent-fill-hover,#0f579d);border-color:var(--es-color-accent-fill-hover,#0f579d);color:var(--es-color-text-on-accent,#fff)}

/* 2. Focus ring: site-shell-v2.css draws rgba(23,104,181,.28), 1.51:1 on white, with !important, so this must too.
      Solid --es-blue-600 is 5.70:1 on white; on navy surfaces the ring switches to --es-blue-300 (9.3:1 on #0d1b2b, 6.2:1 on the lightest hero blue). */
html :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--es-color-focus,#1768b5)!important;outline-offset:2px!important}
html :is(nav:not(.es-study-dock),footer,.topic-hero,.home-hero,.hero,.articles-hero,.es-guide-cta,.pbody,.community-bar) :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline-color:var(--es-blue-300,#8fc3f2)!important}

/* 3. Search palette: help line #788796 (3.68:1) and group labels / close button #718191 (4.00:1).
      --es-color-text-subtle is 5.17:1 on white; in dark mode the token turns light (#97a7b6, 6.4:1 on the dark panel). */
html .es-search-help,html .es-search-group-label,html .es-search-close{color:var(--es-color-text-subtle,#5e6f80)}
