/* TinySandy – accessibility helpers (WCAG 2.2 AA target) */

/* Visible keyboard focus everywhere (2.4.7 / 2.4.11 / 2.4.13) */
:focus {
  outline: none;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible,
.chip:focus-visible,
.icon-btn:focus-visible,
.theme-switch:focus-visible,
.nav-link:focus-visible,
.cat-card:focus-visible,
.tool-card:focus-visible,
.dropzone:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: none;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}
.search-box:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.search-box input:focus-visible {
  outline: none;
}
.dropzone input[type="file"]:focus-visible {
  outline: none;
}

/* Skip link (2.4.1) */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 18px;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 0;
}

/* Links must be distinguishable in running text (1.4.1) */
.prose a,
.article-section a:not(.btn):not(.tool-card),
.faq a,
.notice a {
  text-decoration: underline;
}

/* Minimum target size (2.5.8): 24px min – we use 36–44px */
.chip,
.clear-btn,
.dz-list button {
  min-width: 36px;
  min-height: 36px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .tool-card:hover,
  .cat-card:hover {
    transform: none;
  }
}
/* Forced colors / Windows high contrast */
@media (forced-colors: active) {
  .btn,
  .chip,
  .tool-card,
  .cat-card,
  .tool,
  .out,
  .dropzone {
    border: 1px solid CanvasText;
  }
  .btn-primary {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
  .progress > span {
    background: Highlight;
  }
  .ibox {
    border: 1px solid CanvasText;
    forced-color-adjust: none;
    background: Canvas;
    color: CanvasText;
  }
}
/* Text spacing & zoom: avoid fixed heights that clip text (1.4.12) */
.tool-card,
.cat-card,
.btn {
  height: auto;
}
/* Error text never relies on colour alone: icon + "Error:" prefix are added by tool-kit */
.tool-error strong {
  font-weight: 750;
}
