.a11y-bar{
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;

    display: flex;
    flex-direction: column;
    gap: .5rem;

    padding: .75rem;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(6px);
    border-radius: 0rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.a11y-bar button{
    font: inherit;
    padding: .35rem .6rem;
    border: .05rem solid black;
    border-radius: .3rem;
}
html.a11y-font-1 body { font-size: 110%; }
html.a11y-font-2 body { font-size: 120%; }
html.a11y-font-3 body { font-size: 130%; }

html.a11y-contrast a {
    text-decoration: underline;
    text-decoration-thickness: 0.05rem;
    text-underline-offset: 0.2em;
}

.a11y-wrap{
    position: fixed;
    right: 16px;
    top: 42%;
    transform: translateY(-50%);
    z-index: 9999;
}

.a11y-toggle{
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.15);
    background: rgba(255,255,255,.95);
    color: #000;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.a11y-bar{
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .75rem;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(0,0,0,.15);
    border-radius: .5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.a11y-panel{
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .75rem;
    background: rgba(255,255,255,.95);
    color: #000;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: .5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.a11y-panel button{
    font: inherit;
    color: #000;
    cursor: pointer;
}
.a11y-panel button{
    font: inherit;
    padding: .35rem .6rem;
    border: .05rem solid black;
    border-radius: .3rem;
}

.a11y-wrap{ z-index: 9999999 !important; position: fixed !important; }
.a11y-toggle{ pointer-events: auto !important; }

[hidden]{ display:none !important; }

html.a11y-focus a:focus,
html.a11y-focus button:focus,
html.a11y-focus input:focus,
html.a11y-focus textarea:focus,
html.a11y-focus select:focus {
    outline: 3px solid #D7075F;
    outline-offset: 3px;
}

html.a11y-line-height-1 body,
html.a11y-line-height-1 p,
html.a11y-line-height-1 li {
    line-height: 1.6;
}

html.a11y-line-height-2 body,
html.a11y-line-height-2 p,
html.a11y-line-height-2 li {
    line-height: 1.8;
}

html.a11y-text-spacing-1 body,
html.a11y-text-spacing-1 p,
html.a11y-text-spacing-1 li,
html.a11y-text-spacing-1 a,
html.a11y-text-spacing-1 button,
html.a11y-text-spacing-1 input,
html.a11y-text-spacing-1 textarea {
    letter-spacing: 0.08em;
    word-spacing: 0.16em;
}

html.a11y-text-spacing-2 body,
html.a11y-text-spacing-2 p,
html.a11y-text-spacing-2 li,
html.a11y-text-spacing-2 a,
html.a11y-text-spacing-2 button,
html.a11y-text-spacing-2 input,
html.a11y-text-spacing-2 textarea {
    letter-spacing: 0.12em;
    word-spacing: 0.24em;
}

.a11y-reading-guide {
    position: fixed;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 2px solid rgba(0, 0, 0, 0.35);
    border-bottom: 2px solid rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 9999998;
}

html.a11y-underline-links a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

/* =========================
   A11Y KONTRAST – RUHIG & NEUTRAL
   ========================= */

.a11y-contrast {
    filter: grayscale(100%);
}

/* Text maximal lesbar */
.a11y-contrast body {
    background: #ffffff !important;
    color: #000000 !important;
}

/* Links klar, aber nicht bunt */
.a11y-contrast a {
    color: #000000 !important;
    text-decoration: underline;
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.18em;
}

/* Navigation & Buttons */
.a11y-contrast button,
.a11y-contrast .btn {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

/* Formulare */
.a11y-contrast input,
.a11y-contrast textarea,
.a11y-contrast select {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}
/* A11Y Buttons: Icon + Text nebeneinander */
.a11y-panel button[data-a11y] {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    width: 100%;
    text-align: left;

    background: none;
    border: 0;
    padding: 0.4rem 0.2rem;

    font: inherit;
    color: #000;
    cursor: pointer;
}

/* SVG sauber skalieren */
.a11y-panel .a11y-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    fill: currentColor;
}

.a11y-panel .a11y-icon.horizontal {
    transform: rotate(90deg);
    transform-origin: center;
}

/* Text ruhig halten */
.a11y-panel button span {
    line-height: 1.3;
}
.a11y-panel button[data-a11y="read"][aria-pressed="true"] .a11y-icon {
    animation: a11y-pulse 1.4s ease-in-out infinite;
}

@keyframes a11y-pulse {
    0%   { opacity: 0.6; }
    50%  { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Keep the accessibility control inside the mobile hero image. */
@media (max-width: 47.99rem) {
    .a11y-wrap {
        top: 12rem;
        transform: none;
    }
}
