/* Accessibility helpers shared across pages (WCAG 2.2 AA fixes, 5 Nov 2026).
   They only make existing controls reachable by keyboard and screen reader:
   no new colours or components, every value comes from markus-tokens.css. */

/* A sortable table heading: the words become a real button so Tab and
   Enter reach it. Looks exactly like the plain heading it replaces. */
.mk-th-sort {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: inherit;
    cursor: pointer;
    white-space: nowrap;
}

/* A row that opens on click gets a button on its name, so the keyboard
   can open it too. Looks like the plain name text. */
.mk-row-link {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.mk-row-link:hover {
    text-decoration: underline;
}

/* "Skip to main content" (WCAG 2.4.1). Hidden until a keyboard user tabs to
   it, then it shows as the main button at the top left of the page.
   Markup: Views/Shared/_SkipLink.cshtml; the jump: wwwroot/js/a11y.js. */
.mk-skip {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 10000;
    padding: 10px 16px;
    border-radius: var(--mk-r-btn);
    background: var(--mk-blue);
    color: var(--mk-on-blue);
    font-family: var(--mk-font-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(calc(-100% - 24px));
}

.mk-skip:focus,
.mk-skip:focus-visible {
    transform: none;
    color: var(--mk-on-blue);
    outline: var(--mk-focus);
    outline-offset: 2px;
}

/* The main area takes focus from the skip link; it is not a control, so it
   shows no ring of its own. */
.mk-skip-target:focus {
    outline: none;
}

/* A box that scrolls on its own (code samples, a long source text, a wide
   table) takes Tab so a keyboard can scroll it (WCAG 2.1.1); this ring shows
   where focus is. */
.mk-scroll-region:focus-visible {
    outline: var(--mk-focus);
    outline-offset: 2px;
}
