/*
 * Accessibility fixes (GIGW 3.0 / WCAG 2.2 AA) - loaded last so it can override legacy rules.
 * Tracker refs: 2.4.1, 2.4.7, 2.4.11, 1.4.1, 1.4.4, 1.4.10, 1.4.12, 2.1.1, 2.1.2, 2.5.7, 1.3.4
 */

/* 2.4.1 Bypass blocks - skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100000;
  padding: 10px 16px;
  background: #000;
  color: #fff;
  font-weight: 700;
  border: 2px solid #ffd400;
  border-radius: 4px;
  text-decoration: underline;
}
.skip-link:focus, .skip-link:focus-visible { top: 8px; color: #fff; }
#main:focus { outline: none; }

/* 2.4.7 Focus visible - white ring + navy halo: visible on both dark and light backgrounds */
html body :focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px #1B223C !important;
}
/* Text fields in this design are underline-style: show a two-tone thick underline instead of a box */
html body input:focus-visible,
html body textarea:focus-visible,
html body select:focus-visible {
  outline: none !important;
  box-shadow: 0 2px 0 0 #fff, 0 4px 0 0 #1B223C !important;
}

/* 2.4.11 Focus not obscured - leave room for sticky header / cookie banner when scrolling to focus */
html { scroll-padding-top: 120px; scroll-padding-bottom: 120px; }

/* 1.4.1 Use of colour - links inside running text are underlined; required marker has text */
main p a:not(.btn):not(.common-btn):not(.see-all-link),
main .accordion-body a:not(.btn):not(.common-btn),
footer p a, footer #footer-disclaimer a,
.sebi-regi-bottom a, .sebi-regi-top a, .footer-compliance-links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.required-text { font-size: max(0.8em, 12px); font-weight: 400; opacity: 0.9; }

/* 2.1.1 / 2.1.2 Keyboard operable dropdown menus (opened by JS in accessibility.js) */
.header-menu .navbar-nav .dropdown.a11y-open > .dropdown-menu { display: block; }

/* 2.5.7 Dragging alternative - prev/next buttons for the leadership strip */
.leader-scroll-controls { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }
.leader-scroll-controls button {
  display: flex; align-items: center; justify-content: center; padding: 0;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid #fff; background: #1B223C; color: #fff; cursor: pointer;
}
.leader-scroll-controls button svg { width: 20px; height: 20px; display: block; }
.leader-scroll-controls button:hover { background: #2D57A6; }

/* 1.4.4 / 1.4.10 / 1.4.12 / 1.3.4 Resize, reflow, spacing, orientation:
   remove fixed heights and tiny viewport-relative type that clips or becomes unreadable
   when zoomed, rotated or when text spacing is increased. */
.product-faq-single.grain-bg-card { height: auto !important; min-height: 19.06vw; }
.product-faq-single.grain-bg-card h6 { font-size: max(0.77vw, 15px) !important; line-height: 1.4 !important; }
.product-faq-single.grain-bg-card p { font-size: max(0.61vw, 14px) !important; line-height: 1.5 !important; }
.product-faq .form-control, .product-faq button.btn.btn-primary { font-size: max(0.73vw, 14px) !important; }

main img, main video, main iframe { max-width: 100%; }
main p, main li, main h1, main h2, main h3, main h4, main h5, main h6,
footer p, footer li { overflow-wrap: break-word; }

/* 1.3.4 / 1.4.10 Product updates block: offset pushed content past the viewport on tablets / landscape phones */
@media (max-width: 991.98px) {
  .recent-content { left: 0; max-width: 100%; box-sizing: border-box; }
}

/* 1.4.12 Knowledge Hub cards: fixed heights clipped text when spacing is increased.
   Min-height keeps the aligned look by default but lets the box grow. */
html body .custom-card-title { height: auto; min-height: 50px; }
html body .custom-card-excerpt { height: auto; min-height: 64px; }

/* 1.4.3 / 1.4.11 Contrast - brand-aligned fixes.
   Brand Jade #29A672 gives only 3.09:1 with white text; #21865C gives 4.54:1.
   Selectors are prefixed with "html body" so they win over page-level stylesheets that load later. */
html body .common-btn.green-btn,
html body .common-btn.green-common-btn,
html body .faq-top-column a,
html body #home-redirect,
html body .main-header-nav .nav-link.common-btn.white-btn:hover {
  background-color: #21865C;
}
/* Red button: #F55F6A with white text is 3.12:1; #C64D56 is 4.57:1 */
html body .common-btn.red-btn { background-color: #C64D56; }
/* Emerald (#10B981) buttons used on join-us / raise-ticket: white / near-white text was ~2.5:1; #0A7D57 is above 4.5:1 */
html body .join-us-hero__cta-button,
html body .raise-ticket__submit,
html body .join-verify__cta,
html body .join-thank-you__cta,
html body .refer-earn__button {
  background-color: #0A7D57;
}
/* Muted text: raise to brand Powder Blue (#DFE9F2) so it reads on Royal / dark footer backgrounds */
html body .footer-detail p { color: #DFE9F2; opacity: 0.9; }
html body .join-us-hero__subtitle,
html body .why-partner__subtitle,
html body .why-partner__card-text,
html body .support-details__subtitle { color: #DFE9F2; }
html body .custom-card-date,
html body .custom-card-readtime { color: #6C757D; }
/* Text node (comma) between the two head-office phone links in the footer */
html body .sebi-detail { color: #F5F5F5; }
