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

/* Alias for screen-reader-only content used by some scripts */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Focus outline for keyboard users */
:focus-visible {
  outline: 2px solid #60a5fa; /* fallback color */
  outline-offset: 2px;
}

/* Global skip link (reveals on focus) */
.skip-link {
  position: absolute;
  left: 8px;
  top: 8px;
  transform: translateY(-120%);
  transition: transform .15s ease;
  background: #111827;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  z-index: 10000;
  border: 1px solid rgba(255,255,255,0.15);
}
.skip-link:focus { transform: translateY(0); }

/* Optional utility to help meet 44px touch target guidance */
.touch-target { min-height: 44px; min-width: 44px; }

/* Expand clickable area without shifting layout (apply to small icons/buttons) */
.hit-area { position: relative; }
.hit-area::after {
  content: "";
  position: absolute;
  inset: -6px; /* grow target ~12px both axes */
  pointer-events: none; /* don't block underlying control */
}

/* Respect user high-contrast preferences */
@media (prefers-contrast: more) {
  :root, body { color-scheme: light dark; }
  :focus-visible { outline-color: #1a73e8; box-shadow: none; }
  .skip-link { background: #000; color: #fff; border-color: #fff; }
}

/* Windows forced-colors mode */
@media (forced-colors: active) {
  :focus-visible { outline: 2px solid CanvasText; }
  .skip-link { background: CanvasText; color: Canvas; border: 1px solid Canvas; }
}
