/* Shared accessibility foundation for every page (see ACCESSIBILITY.md). */

/* Visible keyboard focus everywhere (WCAG 2.4.7). Mouse clicks don't show it. */
:focus-visible {
  outline: 3px solid oklch(0.5 0.25 293);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid CanvasText; }
}

/* Sticky menus must never cover the focused element (WCAG 2.4.11). */
html { scroll-padding-top: 84px; scroll-padding-bottom: 84px; }

/* Text for screen readers only. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* "Skip to main content": hidden until it receives keyboard focus (WCAG 2.4.1). */
.skip-link {
  position: fixed;
  left: 12px; top: -120px;
  z-index: 100001;
  padding: 12px 18px;
  border-radius: 10px;
  background: oklch(0.45 0.24 293);
  color: #fff;
  font: 700 15px/1.2 Inter, system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 0 10px 30px oklch(0.3 0.12 293 / 0.35);
}
.skip-link:focus { top: 12px; outline: 3px solid #fff; outline-offset: -6px; }
main:focus { outline: none; }

/* Small site footer on every page. */
/* Page links first (centred), copyright on the line below (centred). */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px; /* space between the links and the copyright */
  padding: 10px 16px;
  font: 500 12.5px/1.4 Inter, system-ui, sans-serif;
  color: oklch(0.42 0.02 296);
}
.site-footer a {
  color: oklch(0.45 0.24 293);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 2px;
}
.site-footer a:hover { color: oklch(0.38 0.22 293); }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; }
.site-footer-copy { margin: 0; }
/* Phones: leave room under the footer for the floating "Need help?" button so
   it never sits on top of the footer links. */
@media (max-width: 640px) {
  .site-footer { padding-bottom: 84px; }
}

/* "Pause animations" control for content that moves on its own (WCAG 2.2.2). */
.a11y-pause {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid oklch(0.82 0.04 293);
  background: #fff;
  color: oklch(0.35 0.03 296);
  font: 600 12px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.a11y-pause:hover { border-color: oklch(0.55 0.25 293); color: oklch(0.3 0.12 293); }
.a11y-pause svg { width: 12px; height: 12px; flex: none; }

/* Respect the device's "reduce motion" setting (WCAG 2.3.3 / 2.2.2). */
@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;
  }
}
/* Same when the visitor pressed "Pause animations". */
html.a11y-motion-paused *, html.a11y-motion-paused *::before, html.a11y-motion-paused *::after {
  animation-play-state: paused !important;
}
