/* RigCheck Pro: contrast corrections.
 *
 * Every rule here answers one measured failure from an axe audit run on 2026-09-03
 * against production, in both themes, with the failing colours recorded next to the
 * fix. WCAG AA needs 4.5:1 for normal text; several of these were at 4.1 to 4.49, close
 * enough that nobody noticed, and two were under 1.5, which is invisible to anyone
 * with weak eyesight in sunlight, which describes a crew member in a bay at 6am.
 *
 * Loaded last on every page so it wins without touching the palettes, and scoped to
 * the exact elements that failed so nothing else changes. Re-run the audit after any
 * palette change: node /home/claude/axe_audit.js, or the CI accessibility job.
 */

/* ---- landing (index.html) ---- */
/* section labels: #0077cc on #0d1117 was 4.06 */
body:not(.day) .section-label { color: #3a9bea; }
/* primary CTAs: #e8f4ff on #0077cc was 4.17; dark text leaked onto #signUpBtn (1.85).
   Scoped to the landing page classes; the crew app's buttons follow the accent system
   and are not touched here. */
.btn-pc.primary, .primary, #signUpBtn { background: #0070c0 !important; color: #ffffff !important; }
/* footer text and links: #5c7a94 was 4.2 dark / 4.19 light. The colour used to be
   inline on the element, which no stylesheet can override; it is a class now. */
.site-footer, .site-footer a { color: #7591ac; }
body.day .site-footer, body.day .site-footer a { color: #4d6a86; }

/* ---- directory (directory.html) ---- */
/* muted text #506080 on #0a0f1a was 3.03; on #111827 was 2.8 */
body:not(.day) .tl-sub, body:not(.day) .tl-link:not(.primary), body:not(.day) #appLink, body:not(.day) #authLink,
body:not(.day) .fl, body:not(.day) .filter-bar .btn-sm, body:not(.day) #countyOverview .section-head { color: #8ea1bd; }
/* register button: #fff on #0088dd was 3.77 */
.btn-primary[onclick="openRegisterModal()"], .tl-link.primary { background: #0070c0; color: #ffffff; }
/* day: #66748f on #f5f7fa was 4.38 */
body.day #countyOverview .section-head, body.day .fl { color: #56657f; }
/* inactive state tabs used opacity .4, which put them at 1.44 dark and 1.69 light.
   Muted colour instead of opacity: still visibly secondary, now legible. */
.state-tab { opacity: 1 !important; }
body:not(.day) .state-tab:not(.act) { color: #7f90ac; }
body.day .state-tab:not(.act) { color: #56657f; }

/* ---- store (merch.html) ---- */
/* .sub and .empty at #6b7590 on #f5f7fa were 4.27 */
body.day .sub, body.day .empty { color: #5c6884; }
body:not(.day) a[href$="directory"] { color: #7591ac; }
body.day a[href$="directory"] { color: #4d6a86; }

/* ---- crew app (app.html) ---- */
/* day theme: collapsible section headers and their numbers were the accent colour on
   #eef1f5 (4.1 for the default blue, as low as 3.3 for Amber Gold). The accent system
   now publishes a text-safe shade per accent; use it for any accent-coloured text. */
body.day .section-header, body.day .section-num { color: var(--accent-text, #0a66b3); }
/* day theme: shift start #1e8a4a on #e0f7ea was 3.89 */
body.day #shiftStart { color: #146b3a; }
/* day theme: the signed-in banner kept its night-palette green (#7ee0a4 on #e1eeea, 1.34)
   and its link kept the night blue (#33aaff, 2.11) */
body.day #mainForm > div:first-child, body.day #mainForm > div:first-child strong { color: #146b3a !important; }
body.day #mainForm > div:first-child a { color: #0b62a8 !important; }
/* weather zip button: #fff on #0088dd was 3.77 in both themes */
button[onclick="wxSaveZip()"] { background: #0070c0 !important; }

/* ---- admin console (admin.html) ---- */
/* --text3 on the panel background was 4.49 dark and 4.4 light: table headers, logo line */
body:not(.day) .logo-sub-text, body:not(.day) th { color: #7a97b3; }
body.day .logo-sub-text, body.day th { color: #56667f; }
/* section titles in brand blue: 4.41 dark, 4.1 light */
#usersTab .section-title, body:not(.day) #usersTab .section-title { color: #35a3f0; }
body.day #usersTab .section-title { color: #0a66b3; }
/* active badge #2eb06a on #e2ebe9 was 2.29 in the day theme */
body.day .badge-active { color: #1b6f41; }

/* ---- sign-in (auth.html) ---- */
/* the Sign In button: #e8f4ff on #0077cc was 4.17 in both themes */
.btn-submit { background: #0070c0 !important; color: #ffffff !important; }
/* "Forgot password?" link: #0077cc on #0f1620 was 3.9 at night */
body:not(.day) .auth-links a, body:not(.day) a[onclick="switchTab('reset')"] { color: #3a9bea; }
