/* Shared accessibility layer for every nstol-scores page.
   Deliberately colour-neutral: it reuses each page's own --accent token and only adds
   behaviour (focus rings, skip link, reduced motion, screen-reader helpers). */

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

.skip-link {
    position: absolute;
    left: 12px; top: -64px;
    z-index: 10000;
    padding: 10px 16px;
    border-radius: 10px;
    background: #10203f;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--accent, #38bdf8);
    transition: top 0.12s ease;
}
.skip-link:focus { top: 12px; }

/* A visible ring for keyboard users only; mouse and touch are unaffected. */
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"]):focus-visible {
    outline: 3px solid var(--accent, #38bdf8);
    outline-offset: 2px;
}

/* Comfortable touch targets on phones and tablets. */
@media (pointer: coarse) {
    :where(button, select, input[type="submit"], input[type="button"], .pill-link, .button) {
        min-height: 44px;
    }
    :where(input[type="checkbox"], input[type="radio"]) {
        min-width: 22px;
        min-height: 22px;
    }
}

@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;
    }
}

/* The skip link moves focus to <main>; that landing spot needs no ring of its own. */
#main-content:focus, #main-content:focus-visible { outline: none; }

/* Let the hidden attribute win over the toolbar's own display rule. */
.toolbar[hidden] { display: none !important; }
