/* =====================================================================
   Gender Justice - shared accessibility styles (WCAG 2.1 AA)
   =====================================================================

   Loaded last in <head> on every page, so the few overrides below win on
   document order without needing !important.

   Everything here is either invisible to sighted users (screen-reader
   text, keyboard-only focus rings) or a contrast/target-size correction
   measured against the WCAG thresholds. No layout or visual redesign is
   intended.

   Pairs with /assets/a11y/a11y.js.
   ===================================================================== */


/* ---------------------------------------------------------------------
   Screen-reader-only text.
   Used for names the visual design conveys with colour, position or an
   icon alone. Clipped and taken out of flow, so it never affects layout.
   --------------------------------------------------------------------- */
.gj-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* ---------------------------------------------------------------------
   2.4.1 Bypass Blocks - the skip link is the first tab stop and sits
   off-screen until it takes focus. a11y.js injects it and picks the
   target. Mirrored for RTL pages.
   --------------------------------------------------------------------- */
.gj-skip-link {
    position: absolute;
    top: -200px;
    left: 0;
    z-index: 10001;
    padding: 10px 18px;
    background: #ffffff;
    color: #1f3c88;
    font-weight: 700;
    font-size: 15px;
    text-decoration: underline;
}

[dir="rtl"] .gj-skip-link {
    left: auto;
    right: 0;
}

.gj-skip-link:focus,
.gj-skip-link:focus-visible {
    top: 0;
}

/* The skip target is given tabindex="-1" so it can receive focus; it
   must not then show a ring, because the user did not tab to it. */
#main-content:focus,
[data-gj-skip-target]:focus {
    outline: none;
}


/* ---------------------------------------------------------------------
   2.4.7 Focus Visible.
   :focus-visible only, so pointer users see no change. The white halo
   inside the dark ring keeps the indicator above 3:1 both on the white
   page background and on the blue menu bar.
   --------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #0a1f44;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #ffffff;
}


/* ---------------------------------------------------------------------
   1.4.3 Contrast - language switcher.
   Every page carries its own copy of this block in an inline <style>.
   Rather than edit each one, the corrected values are set here with a
   doubled class, which outranks the page's own single-class rule no
   matter where the inline block sits.

   Measured on white:        #318dde = 3.50:1  ->  #1f78c6 = 4.60:1
   White label on the pill:  veil    = 2.97:1  ->  dark tint = 6.00:1
   --------------------------------------------------------------------- */
.language-toggle-container.language-toggle-container {
    background: rgba(0, 0, 0, 0.12);
}

.language-toggle-label.active.active {
    color: #1f78c6;
}

/* 2.5.8 Target Size (Minimum): the pill was 19.5px tall, leaving the two
   language links under the 24px minimum and too close together. 24px of
   line height makes each one a 24px target without moving anything. */
.language-toggle-label.language-toggle-label {
    line-height: 24px;
}


/* ---------------------------------------------------------------------
   1.3.1 Info and Relationships - the law matrix.
   Its two frozen columns are <th> so each rating cell can point at them.
   <th> defaults to bold, so the body weight the cells had as <td> is
   restored here.
   --------------------------------------------------------------------- */
#dynamicTable .group-header,
#dynamicTable .law-title-cell {
    font-weight: 400;
}
