/*
 * 07-corrections.css — accessibility corrections
 * ---------------------------------------------------------------------------
 * Loads LAST, after 06-utilities.css, so these deliberately override the
 * utility layer. 06-utilities is a faithful, mechanical reproduction of the
 * Tailwind classes the views use — including the ones that were wrong. This
 * file is where we fix them, so the generated file stays regenerable and the
 * corrections stay visible and reversible.
 *
 * Every rule here traces to a specific audit finding.
 * ---------------------------------------------------------------------------
 */

/* ── 1. Focus ring was off-brand ───────────────────────────────────────────
 * Views use `focus:ring-purple-500`, which is Tailwind's #A855F7 — a visibly
 * different purple from the brand #6027CF. 50 occurrences.
 */
.focus\:ring-purple-500:focus {
  --tw-ring-color: var(--aura-primary);
}

/* ── 2. Form borders were effectively invisible ────────────────────────────
 * `border-gray-200` (#E5E7EB) on white is 1.24:1. WCAG 1.4.11 requires 3:1 for
 * the boundary of a form control. Only inputs are retargeted — `border-gray-200`
 * on decorative dividers is left alone, since the 3:1 rule applies to controls.
 */
input.border-gray-200,
select.border-gray-200,
textarea.border-gray-200 {
  border-color: var(--aura-field-border);
}

/* ── 3. Primary buttons failed contrast at one end of the gradient ─────────
 * `.bg-gradient-brand` runs #6027CF → #8A6AC8. White text is 7.81:1 at the
 * dark end but only 4.22:1 at the light end — under the 4.5:1 AA threshold.
 *
 * Buttons and submits get the solid brand colour. The gradient itself stays
 * available for decorative surfaces (avatars, hero panels), where it carries
 * no text and the contrast rule doesn't apply.
 */
button.bg-gradient-brand,
a.bg-gradient-brand,
[type='submit'].bg-gradient-brand,
.btn.bg-gradient-brand {
  background: var(--aura-primary);
}
button.bg-gradient-brand:hover,
a.bg-gradient-brand:hover,
[type='submit'].bg-gradient-brand:hover {
  background: #5620BC;
}

/* ── 4. Body text colour drifted from the spec ─────────────────────────────
 * The spec's Texto is #212529; views use Tailwind's `text-gray-900` (#111827).
 * Both pass contrast comfortably, so this is brand fidelity rather than
 * accessibility — retargeted to the documented token.
 */
.text-gray-900 {
  color: var(--aura-text);
}
