:root {
  --cmp-focus: #1d4ed8;
  --cmp-focus-ring: rgba(29, 78, 216, 0.28);
  --cmp-text: #0f172a;
  --cmp-text-muted: #475569;
  --cmp-bg: #ffffff;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  color: var(--cmp-text);
  background: var(--cmp-bg);
}

/* WCAG 2.4.7 focus visibility */
:where(a, button, input, select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--cmp-focus) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px var(--cmp-focus-ring) !important;
}

/* Keyboard skip link — visible bar (WAVE: no “hidden element” alert; WCAG 2.4.1) */
.skip-link-bar {
  background: #001529;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.skip-link-bar .container {
  padding-top: 4px;
  padding-bottom: 4px;
}

.skip-link-visible {
  position: static !important;
  display: inline-block !important;
  left: auto !important;
  top: auto !important;
  z-index: auto;
  width: auto !important;
  height: auto !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: transparent !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  letter-spacing: 0.01em;
}

.skip-link-visible:hover,
.skip-link-visible:focus,
.skip-link-visible:focus-visible {
  color: #fbbf24 !important;
  -webkit-text-fill-color: #fbbf24 !important;
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
  transform: none;
}

.skip-link-focus-only {
  position: fixed !important;
  left: 14px !important;
  top: 10px !important;
  z-index: 100050 !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  background: #0f172a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.skip-link-focus-only:focus,
.skip-link-focus-only:focus-visible {
  outline: none !important;
}

/* Legacy off-screen skip link (pages not yet migrated) */
.skip-link {
  position: fixed;
  left: 14px;
  top: 10px;
  z-index: 3000;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none !important;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

/* Hidden until focused — must not compute as #fff on #fff (WCAG 1.4.3) */
a.skip-link.visually-hidden-focusable:not(:focus):not(:focus-within),
.skip-link.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  background-color: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border-width: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
}

.skip-link:focus,
.skip-link:focus-visible,
a.skip-link.visually-hidden-focusable:focus,
a.skip-link.visually-hidden-focusable:focus-visible {
  position: fixed !important;
  left: 14px !important;
  top: 10px !important;
  width: auto !important;
  height: auto !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  white-space: normal !important;
  min-height: 40px !important;
  transform: none;
  background: #0f172a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #0f172a !important;
}

/* Better readable defaults */
p,
li,
dd,
dt {
  line-height: 1.65;
}

/* Make icon-only actions easier to tap/click */
button,
.btn,
[role="button"],
a.btn {
  min-height: 40px;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Ensure hidden helpers are truly hidden but available to AT */
.visually-hidden-focusable:not(:focus):not(:focus-within),
.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;
}

/* ── WCAG 2.2 § 2.5.8 Target Size (Minimum) ──────────────────────────────
   Interactive targets must be at least 24 × 24 CSS pixels.
   Larger targets (44 × 44) are preferred per GIGW 3.0 touch guidelines.    */
a,
button,
[role="button"],
input[type="checkbox"],
input[type="radio"],
select {
  min-height: 24px;
  min-width: 24px;
}

/* ── WCAG 2.2 § 2.4.11 Focus Appearance (Minimum) ──────────────────────
   Focus indicator must enclose the component, have at least 2 CSS pixels
   thickness, and maintain a 3:1 contrast ratio against adjacent colours.   */
:where(a, button, input, select, textarea, summary,
       [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid #0b7c8f !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 1px #ffffff, 0 0 0 4px #0b7c8f !important;
}

/* ── WCAG 2.2 § 3.2.6 Consistent Help ──────────────────────────────────
   Help mechanism (contact details) appears in same relative order on all
   pages. No CSS change needed — enforced through shared footer markup.     */

/* ── GIGW 3.0 / IS 17802 — Page breadcrumb navigation ──────────────────  */
.page-breadcrumb {
  background: rgba(11, 124, 143, 0.05);
  border-bottom: 1px solid rgba(11, 124, 143, 0.12);
  padding: 8px 0;
}

.page-breadcrumb .breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 13.5px;
}

.page-breadcrumb .breadcrumb-item a {
  color: #054049;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-breadcrumb .breadcrumb-item a:hover {
  color: #03272d;
}

.page-breadcrumb .breadcrumb-item.active {
  color: #0f172a;
  font-weight: 600;
}

.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: #64748b;
}

/* ── Compliance footer badge ────────────────────────────────────────────  */
.compliance-badge-bar {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 10px;
  padding-top: 10px;
  text-align: center;
  letter-spacing: 0.02em;
}

.compliance-badge-bar a {
  color: rgba(255, 255, 255, 0.72) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.compliance-badge-bar a:hover {
  color: #fff !important;
}

/* ── Last updated notice ────────────────────────────────────────────────  */
.last-updated-notice {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}

/* Beat legacy style.min “copyright-mini *” and keep AA on opaque navy (tools must not pair with #fff). */
.container-fluid.copyright.copyright-mini .compliance-badge-bar {
  color: #d1d5db !important;
}

.container-fluid.copyright.copyright-mini .compliance-badge-bar a {
  color: #93c5fd !important;
}

.container-fluid.copyright.copyright-mini .compliance-badge-bar a:hover,
.container-fluid.copyright.copyright-mini .compliance-badge-bar a:focus-visible {
  color: #e0f2fe !important;
}

.container-fluid.copyright.copyright-mini .last-updated-notice {
  color: #cbd5e1 !important;
}

/* WCAG 1.4.3 — white navbar must not compute #fff link text on #fff surface */
.navbar.bg-white .navbar-brand,
.navbar.bg-white a.navbar-brand {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

.navbar.bg-white #navbarCollapse .nav-item.nav-link.nav-cta,
a.nav-item.nav-link.nav-cta {
  background-color: #2563eb !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #1d4ed8 !important;
}

/* WCAG 1.4.3 — service cards: keep light surface on hover (no navy flip) */
#service .service-item .service-content::after {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#service .service-item:hover .service-content,
#service .service-item:hover .service-content .service-content-inner {
  background-color: #ffffff !important;
  background-image: none !important;
}

#service .service-item:hover .service-content .service-content-inner h4,
#service .service-item:hover .service-content .service-content-inner .h4,
#service .service-item:hover .service-content .service-content-inner .service-card-title,
#service .service-item:hover .service-content .service-content-inner .service-card-title span,
#service .service-item:hover .service-content .service-content-inner p,
#service .service-item:hover .service-content .service-content-inner .service-card-desc,
#service .service-item:hover .service-content .service-content-inner i {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

#service .service-item:hover .service-content .service-content-inner .service-card-title i {
  color: #1e40af !important;
  -webkit-text-fill-color: #1e40af !important;
}

#service .service-item:hover .service-content .btn.btn-light.rounded-pill,
#service .service-item:hover .service-content .service-content-inner .btn.btn-light.rounded-pill {
  background-color: #eef3f9 !important;
  background-image: none !important;
  border-color: rgba(15, 42, 68, 0.2) !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

#service .service-item:hover .service-content .btn.btn-light.rounded-pill:hover,
#service .service-item:hover .service-content .service-content-inner .btn.btn-light.rounded-pill:hover {
  background-color: #e2eaf3 !important;
  border-color: rgba(15, 42, 68, 0.34) !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

/* WCAG 1.4.3 — Why Pragya h2 on tinted section (tools use #f4f8fc, not gradient) */
#why-pragya.why-wow-section,
#why-pragya {
  background-color: #f4f8fc !important;
}

#why-pragya .why-wow-left h2,
#why-pragya h2.why-wow-left h2,
#why-pragya .why-wow-left > h2 {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

#why-pragya .why-wow-left h2 em,
#why-pragya h2 em {
  color: #1e40af !important;
  -webkit-text-fill-color: #1e40af !important;
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
}

/* Hidden a11y drawer: white title on white page = 1:1 in audit tools */
.site-a11y-root:not(.site-a11y-open) .site-a11y-title,
.site-a11y-panel[aria-hidden="true"] .site-a11y-title,
.site-a11y-panel[hidden] .site-a11y-title {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

.site-a11y-root.site-a11y-open .site-a11y-header .site-a11y-title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* WCAG 1.4.3 — topbar links/icons on navy (gradient-only bg fails tools ~3.5:1) */
.container-fluid.topbar,
.topbar {
  background-color: #001529 !important;
}

.topbar a.text-muted,
.topbar a,
.container-fluid.topbar a.text-muted {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.topbar a.text-muted i,
.topbar a i.text-primary,
.topbar i.text-primary {
  color: #b8dcff !important;
  -webkit-text-fill-color: #b8dcff !important;
}

/* Footer column titles — must stay #fff on #061729 (not #2563eb ~3.5:1 after h3→h2) */
html body .footer h2.text-white,
html body .footer h3.text-white,
.footer .footer-item h2.text-white,
.footer .footer-item h3.text-white,
.footer .footer-item-post h2.text-white,
.footer .footer-item-post h3.text-white {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ============================================================
   WCAG 1.3.4 / SR-7 — Quick Links open: Contact must stay visible
   ============================================================ */
@media (max-width: 991.98px) {
  #navbarCollapse.quick-links-expanded .nav-item.nav-link.nav-cta {
    display: block !important;
    visibility: visible !important;
  }
}

/* ============================================================
   WCAG 1.4.4 / SR-8 — 200% browser zoom (scoped — no desktop layout change)
   ============================================================ */
img,
svg,
video,
iframe,
canvas {
  max-width: 100%;
  height: auto;
}

p,
li,
h1,
h2,
h3,
h4,
h5,
h6,
td,
th {
  overflow-wrap: break-word;
}

.table-wrap,
.ap-table-wrap,
.bank-table-wrap,
.kmp-table-wrap,
.digital-a11y-table-wrap,
.escalation-matrix .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 640px) {
  .hero-premium,
  .section-banner,
  .notice-bar {
    height: auto !important;
    min-height: 0 !important;
  }

  .hero-premium-content,
  .hero-premium-row,
  .hero-premium-left,
  .hero-premium-right {
    min-width: 0;
    max-width: 100%;
  }

  .row,
  [class*="col-"] {
    min-width: 0;
  }

  .pe-service-bento-grid,
  .pe-service-bento-head,
  .mo-highlights__inner {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  [style*="grid-template-columns:1.1fr"],
  [style*="grid-template-columns: 1.1fr"] {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  [style*="grid-row:1/3"],
  [style*="grid-row: 1/3"] {
    grid-row: auto !important;
  }

  [style*="min-height:480px"],
  [style*="min-height: 480px"] {
    min-height: 0 !important;
  }

  [style*="white-space:nowrap"],
  [style*="white-space: nowrap"] {
    white-space: normal !important;
  }
}

/* ============================================================
   WCAG 1.4.10 / SR-14 — 400% zoom reflow (320 CSS px viewport)
   ============================================================ */
@media (max-width: 320px), (max-height: 256px) {
  /* Fixed header + body padding = white gap at extreme zoom — use normal flow */
  body {
    padding-top: 0 !important;
  }

  .topbar {
    position: static !important;
  }

  .sticky-top {
    position: static !important;
    top: auto !important;
  }

  .navbar-brand-logo-img {
    max-width: 130px;
    height: auto;
  }

  nav.navbar,
  .sticky-top .navbar {
    flex-wrap: wrap;
    align-items: center;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .navbar-brand {
    max-width: calc(100% - 56px);
    margin-right: 0 !important;
  }

  .navbar-toggler {
    flex-shrink: 0;
    margin-left: auto;
    z-index: 2;
  }

  /* SR-7 — at 320px all header nav links must remain visible (no collapsed menu) */
  .navbar-expand-lg .navbar-collapse.collapse {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: none !important;
  }

  .navbar-expand-lg .navbar-toggler {
    display: none !important;
  }

  .navbar-collapse {
    flex-basis: 100%;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .hero-premium {
    height: auto !important;
    min-height: 0 !important;
  }

  .section-banner {
    padding: 24px 0;
  }

  .container-fluid {
    overflow-x: hidden;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  .row,
  [class*="col-"] {
    min-width: 0;
  }

  /* FAB bottom-right overlaps hamburger at extreme zoom — move to bottom-left */
  .site-a11y-fab {
    left: max(10px, env(safe-area-inset-left)) !important;
    right: auto !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: 44px !important;
    height: 44px !important;
  }

  .site-a11y-fab-icon {
    width: 22px !important;
    height: 22px !important;
  }

  .site-a11y-fab-icon .fa-solid {
    font-size: 18px !important;
  }

  .back-to-top {
    right: max(10px, env(safe-area-inset-right)) !important;
    left: auto !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }

  /* About page — stack columns, prevent overlap at 400% zoom */
  .premium-about-section .row > [class*="col-"],
  .premium-about-section .row.g-5 > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .about-profile-panel {
    overflow: visible !important;
  }

  .about-values-strip .values-grid {
    display: block !important;
  }

  .about-values-strip .value-item {
    margin-bottom: 12px;
  }

  .premium-reasons-section ul.row > li,
  .premium-reasons-section .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .premium-reason-card {
    word-break: break-word;
  }

  .about-stat-card {
    min-width: 0;
  }

  .premium-about-section p.text.ps-4 {
    padding-left: 0 !important;
  }
}
