/* Accessibility (WCAG 2.2 AA; AODA requires 2.0 AA). Loaded last on every page. */

/* 1.4.1 links inside running text are underlined, not told apart by colour alone */
main p a:not([class]), main li a:not([class]), main dd a:not([class]), main td a:not([class]), main figcaption a:not([class]) {
  text-decoration: underline !important; text-underline-offset: .16em; text-decoration-thickness: 1px;
}
/* …except navigation lists, where position already says "link" */
main nav li a:not([class]) { text-decoration: none !important; }

/* 2.5.8 target size: list-style links (tables of contents, sidebars) are at least 24px tall */
main nav li a, .docs-toc a, .cp-toc a, [data-docs-toc] a { display: inline-block; min-height: 24px; line-height: 1.4; padding-block: 3px; }

/* 2.4.7 / 2.4.11 a clearly visible keyboard focus everywhere */
:focus-visible { outline: 3px solid #00aeef; outline-offset: 2px; }
.cp-table-wrap:focus-visible, .table-scroll:focus-visible { outline-offset: -3px; }

/* 1.4.10 reflow: on phones the header keeps the logo, search and menu; Log in and Register are in the menu */
@media (max-width: 600px) {
  .navr .btn[data-auth] { display: none; }
}
@media (max-width: 400px) {
  /* the wordmark is hidden visually but kept as the logo link's accessible name */
  .nav .logo .wm { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* 2.2.2 the pause control for the animated globe */
.motion-toggle {
  position: absolute; right: 16px; bottom: 16px; z-index: 3; min-height: 32px; padding: 0 12px;
  border-radius: 8px; border: 1px solid rgba(160,190,230,.45); background: rgba(6,16,29,.78); color: #eaf1fb;
  font: 600 13px Figtree, system-ui, sans-serif; cursor: pointer;
}
.motion-toggle:hover { border-color: #00aeef; }

/* 2.3.3 / user preference: no animation for people who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.sr-only, .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 2.5.8 footnote / citation links ([1], [2] …) get a 24px target */
main a[href^="#src-"], main a[href^="#fn"], main a[href^="#ref"] { display: inline-block; min-width: 24px; min-height: 24px; line-height: 24px; text-align: center; }

/* 1.4.3 the chat panel's footnote (a theme rule dimmed it to 3.1:1) */
.cw-note { color: #a9b6c8 !important; font-size: 12px !important; }

/* 2.5.3 the header search button is named by its own text ("Search the site"); on narrower screens the text is
   hidden visually but kept, so the icon-only button still has that name */
@media (max-width:1280px){ .nav .ss-trigger .ss-label{ display:inline !important; position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; } }
