/*!
 * RH AIF Accessibility - design-intent restorations
 * WCAG 2.1 SC 1.4.3 Contrast (Minimum), Level AA
 *
 * The failures below are not colour-choice failures. In each case the page
 * already specified an accessible colour and something else overrode it, or
 * the colour was fine and a transparency setting destroyed the ratio. The fix
 * is therefore to restore what the design already asked for, which means the
 * rendered result is *closer* to the original comp than it is today.
 *
 * Loaded after rh-a11y-contrast.css so these hand-checked rules win.
 */

/* ---------------------------------------------------------------------------
   Primary call-to-action buttons
   ---------------------------------------------------------------------------
   Reported: #444444 on #1A3A2A -> 1.28:1 (needs 4.5:1)

   `.btn-primary` is declared as `background: var(--green-dark); color: var(--white)`,
   but it is an <a>, and `.elementor-kit-8 a { color:#444444 }` has the higher
   specificity, so the label renders dark grey on dark green. Restoring the
   designed white gives 12.48:1.

   Affected pages: hedging-risk-management, indias-next-growth-sectors,
   family-offices-rethink-india-allocation, nri-guide-investing-in-indian-
   category-iii-aifs, rh-multibagger-framework-high-growth-investment-strategy,
   small-cap-cycles-market-timing, why-earnings-growth-not-price-drives-stock-
   returns, why-institutions-underweight-small-caps-in-india.
   -------------------------------------------------------------------------- */
body.rh-a11y-on a.btn-primary,
body.rh-a11y-on .btn-primary {
	color: #ffffff !important;
}

/* Hover keeps the designed --green-mid background; white on #1A803D is 5.0:1. */

/* ---------------------------------------------------------------------------
   Footer contact links
   ---------------------------------------------------------------------------
   Reported: #444444 on #1E3A2F -> 1.26:1 (needs 4.5:1)

   Same cause as above. `.aif-footer-contact-item` is declared
   `color: var(--aif-bg-cream)` (#F5EEDE) on the home and media-links
   templates, without !important, so the Elementor link colour wins. The FAQ
   template already carries !important here and passes, which confirms the
   intended colour. Restored value gives 10.68:1.
   -------------------------------------------------------------------------- */
body.rh-a11y-on .aif-footer-contact-item {
	color: #f5eede !important;
}

/* Designed hover colour #D4A017 on #1E3A2F is 5.2:1, so it is left alone. */
body.rh-a11y-on .aif-footer-contact-item:hover,
body.rh-a11y-on .aif-footer-contact-item:focus {
	color: #d4a017 !important;
}

/* ---------------------------------------------------------------------------
   Multibagger framework: formula labels
   ---------------------------------------------------------------------------
   Reported: #5D5C25 on #F8AC19 -> 3.60:1 and #967A20 on #1A3A2A -> 3.03:1

   Neither of those colours is authored anywhere. `.formula-label` carries
   `opacity: 0.7`, and both reported values are the designed colour blended
   with its backdrop at 70%. Removing the transparency restores the authored
   colours exactly:

       #1A3A2A on #F8AC19  ->  6.48:1
       #F8AC19 on #1A3A2A  ->  6.48:1

   No colour value changes; only the opacity.
   -------------------------------------------------------------------------- */
body.rh-a11y-on .formula-label {
	opacity: 1 !important;
}

/* ---------------------------------------------------------------------------
   Multibagger framework: watermark step numerals
   ---------------------------------------------------------------------------
   Reported: #FDEAC6 on #FFFFFF -> 1.18:1

   `.step-number` is a 64px numeral at `opacity: .25` with
   `pointer-events: none`, positioned behind the card content. The same
   information is carried in full contrast by the adjacent `.step-tag`
   ("Step One", "Step Two", ...), so the numeral is pure decoration under the
   WCAG definition and is exempt from 1.4.3.

   It is therefore removed from the accessibility tree instead of being
   recoloured, which leaves the visual design completely untouched. The
   aria-hidden attribute is applied by rh-a11y.js; this rule documents the
   decision and keeps the numeral out of the selection/announcement path.
   -------------------------------------------------------------------------- */
body.rh-a11y-on .step-number {
	user-select: none;
}

/* ---------------------------------------------------------------------------
   Crude oil page: transmission-chain header
   ---------------------------------------------------------------------------
   Reported: #FFFFFF on #D35400 -> 4.16:1 (needs 4.5:1 at 18px regular)

   The white label is correct; the amber panel is 0.34 short. Darkening the
   panel by ~4% lightness, hue and saturation held, reaches 4.82:1.
   -------------------------------------------------------------------------- */
body.rh-a11y-crude-oil-price-impact-on-indian-economy .mv-header {
	background: #c24d00 !important;
}

/* ---------------------------------------------------------------------------
   Hedging page: risk-budget bar labels
   ---------------------------------------------------------------------------
   Reported: #FFFFFF on #F8AC19 -> 1.92:1

   `.rb-fill-label` is white, which is right on the dark green, red and
   charcoal bars. Only the gold bar fails. Scoping to that one fill keeps the
   other three bars exactly as designed; the page's own ink colour is used so
   the label still reads as part of the same palette (6.48:1).
   -------------------------------------------------------------------------- */
body.rh-a11y-hedging-risk-management .rb-fill[style*="--gold-light"] .rb-fill-label,
body.rh-a11y-hedging-risk-management .rb-fill[style*="#F8AC19"] .rb-fill-label,
body.rh-a11y-hedging-risk-management .rb-fill[style*="#f8ac19"] .rb-fill-label {
	color: #1a3a2a !important;
}
