/* =========================================================
   Barrierefreiheits-Modus (site-wide)
========================================================= */

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10000;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
    outline: 3px solid #0dbcff;
    outline-offset: 2px;
}

.a11y-widget {
    position: fixed;
    left: clamp(0.75rem, 2vw, 1.25rem);
    bottom: clamp(0.75rem, 2vw, 1.25rem);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    max-width: min(calc(100vw - 1.5rem), 22rem);
}

.a11y-widget__toggle[aria-expanded="true"] {
    display: none;
}

.a11y-widget__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(21, 23, 28, 0.96);
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.a11y-widget__toggle:hover {
    border-color: #0dbcff;
    background: rgba(13, 188, 249, 0.18);
}

.a11y-widget__toggle:focus-visible {
    outline: 3px solid #0dbcff;
    outline-offset: 3px;
}

.a11y-widget__icon {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
}

.a11y-panel {
    width: min(22rem, calc(100vw - 1.5rem));
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(21, 23, 28, 0.98);
    color: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.a11y-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.a11y-panel__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.a11y-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.a11y-panel__close:focus-visible,
.a11y-option:focus-visible,
.a11y-panel__reset:focus-visible,
.a11y-footer-trigger:focus-visible {
    outline: 3px solid #0dbcff;
    outline-offset: 2px;
}

.a11y-panel__lead {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
}

.a11y-panel__options {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.a11y-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.a11y-option:hover {
    border-color: rgba(13, 188, 249, 0.55);
}

.a11y-option.is-active {
    border-color: #0dbcff;
    background: rgba(13, 188, 249, 0.16);
}

.a11y-panel__reset {
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.a11y-footer-trigger {
    text-decoration: none;
    color: var(--secondary-text-color);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--light-secondary-color);
    background-color: var(--secondary-color);
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.a11y-footer-trigger:hover {
    color: var(--main-brand-color);
    border-color: var(--main-brand-color);
    background-color: rgba(13, 188, 249, 0.1);
}

html.a11y-large-text {
    font-size: 112.5%;
}

html.a11y-high-contrast {
    --text-color: #ffffff;
    --secondary-text-color: #f3f4f6;
    --main-brand-color: #00e5ff;
    --primary-color: #000000;
    --secondary-color: #111111;
    --border-subtle: rgba(255, 255, 255, 0.45);
    --border-accent: rgba(0, 229, 255, 0.85);
}

html.a11y-high-contrast body {
    background: #000;
    color: #fff;
}

html.a11y-high-contrast :focus-visible {
    outline: 3px solid #ffea00 !important;
    outline-offset: 3px;
}

html.a11y-underline-links a {
    text-decoration: underline !important;
    text-underline-offset: 0.15em;
}

html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

@media (max-width: 767px) {
    .a11y-widget__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .a11y-widget__toggle {
        width: 3.1rem;
        height: 3.1rem;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }
}
