/* pa-a11y.css — v9.80: the WCAG 2.1 AA corrections axe-core found on the live site (2 Nov).
   Every number below is a contrast ratio measured against the colour the element actually sits on.
   The pass in local-server.js links this file at the end of <head> on every page, so one cached
   file fixes the whole site and no page has to be edited.

   WHAT WAS WRONG (axe-core 4.10.2, WCAG 2.1 A/AA, 15 live pages, 290 failing nodes):
     · .past td{opacity:.45} — the economic calendar dimmed finished events with opacity, which took
       the row text from 14.6:1 down to 1.9-2.7:1. 218 of the 290 nodes were these rows.
     · #0abf8f brand teal used as TEXT on white = 2.37:1 (1 node, /tools/risk-of-ruin).
     · .tk .dn red #d64545 on white = 4.38:1 (4 nodes, the /charts ticker).
     · forums greys #7d938d = 3.27:1 and #8fa8a0 = 2.54:1 on white (7 nodes).
     · the site's own p{color:#2c3d51} landing inside the dark footer = 1.67:1 (2 nodes).
     · 11 inline links in body copy distinguished from surrounding text by colour alone.
   Dimming a row with colour instead of opacity keeps the "this one is finished" look and restores
   the contrast; nothing here changes layout, size or position. */

/* --- economic calendar: finished events are greyed, not faded ------------------------------- */
.past td { opacity: 1 !important; }
.past td, .past td b, .past td span, .past td small { color: #5b6f6f !important; }   /* 5.32:1 on #fff */
.past td a, .past td.num a, .past td a b { color: #067a58 !important; }              /* 5.34:1 on #fff */

/* --- brand teal used as text (2.37:1) ------------------------------------------------------- */
p[style*="color:#0abf8f"], p[style*="color: #0abf8f"] { color: #067a58 !important; }

/* --- /charts ticker: red that could not be read (4.38:1) ------------------------------------ */
.tk .dn, .tk .c.dn { color: #b3261e !important; }                                     /* 6.54:1 on #fff */

/* --- /forums: two greys under 4.5:1 --------------------------------------------------------- */
.fx-sect, .fx-card-h, .fx-space small, .fx-search, .fx-search span { color: #5b6f6f !important; }

/* --- footer: page body colour leaking onto the dark band (1.67:1) --------------------------- */
.fin p, .fin li, .fin div, footer p, footer li { color: #adc0c6 !important; }         /* 9.82:1 on #0a1420 */

/* --- inline links in running text: colour alone is not a distinction (WCAG 1.4.1) ----------- */
#main p a, #main li a, .wrap p a, .wrap li a, article p a, .prose p a {
  text-decoration: underline !important;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
#main p a.btn, #main p a.btnx, #main p a[class*="btn"], #main li a[class*="btn"],
#main p a.card, #main li a.card, #main p a[class*="cta"], #main p a[class*="card"] {
  text-decoration: none !important;
}

/* --- keyboard users: a scrollable strip must be reachable (WCAG 2.1.1) ---------------------- */
#tickStrip:focus-visible { outline: 2px solid #067a58; outline-offset: 2px; }

/* --- footer small print: a link added into the risk warning was rendered as a block -----------
   The site's own `footer a{display:block;margin:5px 0}` is right for the footer's link columns and
   wrong for a link inside a sentence. The link-mesh pass adds /glossary/cfd inside the risk warning,
   so "Trading foreign exchange and CFDs on margin…" was split around the link and the disclaimer
   grew 47px taller on every page. Links in the small print stay in the sentence. */
.disc a, .disc a:visited {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #b9cec9 !important;                 /* 11.23:1 on the #0a1420 footer */
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* --- v9.84: screen-reader-only text used by assets/pa-a11y-fix.js ------------------------------- */
.pa-sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;}

/* --- v9.84: links inside body copy must not be told apart by colour alone ---------------------- */
/* axe rule link-in-text-block: #067a58 on white is 5.34:1 against the page, but only 3.25:1 against
   the #2c3d51 body text it sits in, and 2.73:1 in the /tools cards. An underline satisfies the rule
   without touching the palette. */
#main p a[href], #main li a[href], #main td a[href], article p a[href], .prose p a[href],
#main h1 a[href], #main h2 a[href], #main h3 a[href], #main h4 a[href]{
  text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;}

/* --- v9.84: empty header cells added by pa-a11y-fix.js stay invisible -------------------------- */
th > .pa-sr-only{position:absolute!important;}

/* --- v9.84: the contrast failures that survived v9.80 (axe-core 4.10.2, all 163 live pages) ------
   Measured on the served build, one line per failing style. Every ratio below is the one axe
   reported and the value after it is what the replacement reaches. */
/* forum "⚑ Report" buttons: inline opacity:.65 turned #5b6f6f into an effective #94a1a1 on white
   (2.66:1). Full opacity plus a darker grey reads as the same quiet affordance at 6.1:1. */
.post button[type="button"] { opacity: 1 !important; color: #4a5c5c !important; }
/* field-guide masthead: brand teal #0abf8f as text on white (2.36:1) */
.brand, .brand span { color: #067a58 !important; }                       /* 5.34:1 */
/* /api-docs: an in-code link kept the body-teal #067a58 on the #0d1b2a code background (3.25:1) */
code a, pre a, .code a, .snippet a { color: #7fd6b8 !important; }        /* 8.1:1 */
/* /tools/*: the sub-caption inside the stat tiles (#5c7a86 on #f2f7f9, 4.24:1) */
.tstat span { color: #4b6570 !important; }                               /* 5.5:1 */
/* /library/tradingview/*: an inline #8fa3b0 credit line on white (2.61:1) */
[style*="color:#8fa3b0"], [style*="color: #8fa3b0"] { color: #5b6f6f !important; }   /* 5.32:1 */
/* /tools/correlation-matrix: inline #0d9f78 on white (3.36:1) */
[style*="color:#0d9f78"], [style*="color: #0d9f78"] { color: #067a58 !important; }   /* 5.34:1 */
/* the "live candles unavailable" line (#6e808a on white, 4.1:1) */
.ld, p.ld { color: #5b6f6f !important; }                                 /* 5.32:1 */
/* /margin-calculator: a glossary link inside the dark .calc .head panel (#067a58 on #0d1b2a, 3.25:1) */
.calc .head a, .head.dark a, .calc-hd a { color: #7fd6b8 !important; }   /* 8.1:1 */
