/* ecki/accessibility – Widget-Runtime-CSS
   Nur --a11y-*-Variablen (markenneutral, siehe Blueprint §9a).
   Zwei Zonen:
   1) #a11y-root – Optik des Widgets selbst (Trigger, Panel, Mini-Player)
   2) html[data-a11y-*] – Wirkung auf die Zielseite (Text/Grafik/Navigation) */

:root {
    --a11y-z: 2147483000;
}

/* ─── Zone 1: Widget-Optik ──────────────────────────────────────────── */

#a11y-root, #a11y-root * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

#a11y-root {
    all: initial;
}

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

/* ─── Trigger (Kanten-Position/Größe kommen per #a11y-trigger-style aus JS) */
@keyframes a11y-trigger-pop {
    0%   { opacity: 0; transform: scale(0.3) rotate(-25deg); }
    60%  { opacity: 1; transform: scale(1.18) rotate(8deg); }
    80%  { transform: scale(0.93) rotate(-3deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes a11y-trigger-shrink {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.4) rotate(15deg); }
}

.a11y-trigger {
    position: fixed;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--a11y-primary, #5a2572);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .2);
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .3);
    line-height: 1;
    opacity: 0;
    transform: scale(0.4);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, box-shadow .15s, background-color .15s;
}
.a11y-trigger--visible {
    pointer-events: auto;
    animation: a11y-trigger-pop .55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.a11y-trigger:hover,
.a11y-trigger:focus-visible {
    background: color-mix(in srgb, var(--a11y-primary, #5a2572), black 15%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .45);
    transform: scale(1.1);
}
.a11y-trigger:focus-visible {
    outline: 3px solid var(--a11y-primary, #5a2572);
    outline-offset: 3px;
}
.a11y-trigger svg { width: 52%; height: 52%; flex-shrink: 0; display: block; }
.a11y-trigger img { width: 62%; height: 62%; object-fit: contain; display: block; border-radius: 50%; }
.a11y-trigger__dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffb100;
    border: 2px solid #fff;
}

/* ─── Panel: Backdrop + Sheet ───────────────────────────────────────── */
.a11y-panel {
    position: fixed;
    inset: 0;
    z-index: var(--a11y-z);
}
.a11y-panel[hidden] { display: none; }

.a11y-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
}

.a11y-panel__sheet {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 100vw);
    background: var(--a11y-panel-bg, #fff);
    color: var(--a11y-panel-text, #1a1a1a);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, .25);
    border-top-left-radius: var(--a11y-radius, 12px);
    border-bottom-left-radius: var(--a11y-radius, 12px);
    overflow: hidden;
}

.a11y-panel__header {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: 1rem 1rem;
    border-bottom: 1px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 90%);
    flex: 0 0 auto;
}
.a11y-panel__logo {
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}
.a11y-panel__title { font-size: 1.125rem; font-weight: 700; margin: 0; flex: 1; }
.a11y-panel__close {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.a11y-panel__close:hover { background: color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 92%); }
.a11y-panel__close svg { width: 20px; height: 20px; }

.a11y-panel__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
}

.a11y-panel__statement {
    flex: 0 0 auto;
    padding: .75rem 1rem 1rem;
    text-align: center;
}
.a11y-panel__statement a {
    color: var(--a11y-panel-text, #1a1a1a);
    font-size: .8125rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.a11y-panel__statement a:hover,
.a11y-panel__statement a:focus-visible { color: var(--a11y-primary, #5a2572); }

.a11y-panel__footer {
    flex: 0 0 auto;
    padding: .875rem 1rem;
    border-top: 1px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 90%);
    display: flex;
    flex-direction: column;
    gap: .625rem;
}
.a11y-reset {
    width: 100%;
    padding: .75rem 1rem;
    border-radius: var(--a11y-radius, 12px);
    border: 1px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 75%);
    background: transparent;
    color: inherit;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}
.a11y-reset:hover { background: color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 94%); }
.a11y-footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8125rem; }
.a11y-footer-links a { color: var(--a11y-primary, #5a2572); text-decoration: underline; }

/* ─── Profile-Chips ─────────────────────────────────────────────────── */
.a11y-profiles {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .25rem;
    margin-bottom: 1rem;
}
.a11y-profile-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .625rem .75rem;
    min-width: 84px;
    border-radius: var(--a11y-radius, 12px);
    border: 1.5px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 80%);
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: .6875rem;
    text-align: center;
    min-height: 44px;
}
.a11y-profile-chip svg { width: 22px; height: 22px; }
.a11y-profile-chip[aria-pressed="true"] {
    border-color: var(--a11y-primary, #5a2572);
    background: color-mix(in srgb, var(--a11y-primary, #5a2572), transparent 90%);
    font-weight: 700;
}
.a11y-profile-chip:focus-visible { outline: 3px solid var(--a11y-primary, #5a2572); outline-offset: 2px; }

/* ─── Accordion ─────────────────────────────────────────────────────── */
.a11y-section {
    border-bottom: 1px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 90%);
}
.a11y-section__head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .875rem .25rem;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: .9375rem;
    font-weight: 600;
    text-align: left;
    min-height: 44px;
}
.a11y-section__head svg.a11y-section__icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--a11y-primary, #5a2572); }
.a11y-section__badge {
    font-size: .6875rem;
    font-weight: 700;
    padding: .0625rem .5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--a11y-primary, #5a2572), transparent 85%);
    color: var(--a11y-primary, #5a2572);
}
.a11y-section__chev { margin-left: auto; width: 18px; height: 18px; transition: transform .2s; flex-shrink: 0; }
.a11y-section__head[aria-expanded="true"] .a11y-section__chev { transform: rotate(180deg); }
.a11y-section__panel { padding: 0 .25rem .875rem; display: flex; flex-direction: column; gap: .875rem; }
.a11y-section__panel[hidden] { display: none; }

.a11y-item { display: flex; flex-direction: column; gap: .375rem; }
.a11y-item__row { display: flex; align-items: center; gap: .75rem; }
.a11y-item__text { flex: 1; }
.a11y-item__label { font-size: .875rem; font-weight: 600; display: block; }
.a11y-item__desc { font-size: .75rem; opacity: .75; display: block; margin-top: .0625rem; }

/* Toggle-Switch */
.a11y-switch {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: inherit;
    padding: 0;
    min-height: 44px;
}
.a11y-switch__track {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 78%);
    position: relative;
    transition: background-color .15s;
    flex-shrink: 0;
}
.a11y-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.a11y-switch[aria-checked="true"] .a11y-switch__track { background: var(--a11y-primary, #5a2572); }
.a11y-switch[aria-checked="true"] .a11y-switch__thumb { transform: translateX(18px); }
.a11y-switch__state { font-size: .75rem; font-weight: 700; min-width: 2.5em; text-align: left; }
.a11y-switch:focus-visible { outline: 3px solid var(--a11y-primary, #5a2572); outline-offset: 2px; border-radius: 6px; }

/* Stepper */
.a11y-stepper { display: inline-flex; align-items: center; gap: .5rem; }
.a11y-stepper__btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 8px;
    border: 1.5px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 75%);
    background: transparent;
    color: inherit;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.a11y-stepper__btn:hover { background: color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 92%); }
.a11y-stepper__btn:focus-visible { outline: 3px solid var(--a11y-primary, #5a2572); outline-offset: 2px; }
.a11y-stepper__value { min-width: 3.5em; text-align: center; font-size: .8125rem; font-weight: 700; }

/* Segmented control */
.a11y-segmented { display: flex; flex-wrap: wrap; gap: .375rem; }
.a11y-segmented__btn {
    padding: .5rem .75rem;
    min-height: 44px;
    border-radius: 8px;
    border: 1.5px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 75%);
    background: transparent;
    color: inherit;
    font-size: .8125rem;
    cursor: pointer;
}
.a11y-segmented__btn[aria-pressed="true"] {
    background: var(--a11y-primary, #5a2572);
    border-color: var(--a11y-primary, #5a2572);
    color: #fff;
    font-weight: 700;
}
.a11y-segmented__btn:focus-visible { outline: 3px solid var(--a11y-primary, #5a2572); outline-offset: 2px; }

/* Action-Button (Headings-Nav, Skiplinks, Keyboard-Hints, Reader-Mode) */
.a11y-action-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .625rem .875rem;
    min-height: 44px;
    border-radius: var(--a11y-radius, 12px);
    border: 1.5px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 75%);
    background: transparent;
    color: inherit;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.a11y-action-btn:hover { background: color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 92%); }
.a11y-action-btn:focus-visible { outline: 3px solid var(--a11y-primary, #5a2572); outline-offset: 2px; }
.a11y-action-btn[aria-pressed="true"] { border-color: var(--a11y-primary, #5a2572); color: var(--a11y-primary, #5a2572); }
.a11y-action-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--a11y-primary, #5a2572);
}

/* Headings-Nav-Liste */
.a11y-headings-list { list-style: none; margin: .5rem 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.a11y-headings-list li { margin: 0; }
.a11y-headings-list button {
    display: block;
    width: 100%;
    text-align: left;
    padding: .5rem .5rem;
    min-height: 44px;
    background: transparent;
    border: none;
    color: inherit;
    font-size: .8125rem;
    cursor: pointer;
    border-radius: 6px;
}
.a11y-headings-list button:hover { background: color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 92%); }
.a11y-hlvl-1 { font-weight: 700; }
.a11y-hlvl-2 { padding-left: 1rem; }
.a11y-hlvl-3 { padding-left: 2rem; }
.a11y-hlvl-4 { padding-left: 3rem; }
.a11y-hlvl-5 { padding-left: 4rem; }
.a11y-hlvl-6 { padding-left: 5rem; }

/* ─── Mini-Player (TTS) ─────────────────────────────────────────────── */
.a11y-miniplayer {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: calc(var(--a11y-z) - 1);
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--a11y-panel-bg, #fff);
    color: var(--a11y-panel-text, #1a1a1a);
    border-radius: 999px;
    padding: .5rem .75rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
    max-width: calc(100vw - 24px);
}
.a11y-miniplayer[hidden] { display: none; }
.a11y-miniplayer__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.a11y-miniplayer__btn:hover { background: color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 90%); }
.a11y-miniplayer__btn:focus-visible { outline: 3px solid var(--a11y-primary, #5a2572); outline-offset: 2px; }
.a11y-miniplayer__btn--play { background: var(--a11y-primary, #5a2572); color: #fff; }
.a11y-miniplayer__btn--play:hover { background: color-mix(in srgb, var(--a11y-primary, #5a2572), black 15%); }
.a11y-miniplayer__btn svg { width: 20px; height: 20px; }
.a11y-miniplayer__status { font-size: .75rem; padding: 0 .375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }

.a11y-tts-word {
    background: var(--a11y-primary, #5a2572);
    color: #fff;
    border-radius: 3px;
    box-shadow: 0 0 0 2px var(--a11y-primary, #5a2572);
}
.a11y-tts-sentence {
    background: color-mix(in srgb, var(--a11y-primary, #5a2572), transparent 75%);
    border-radius: 3px;
}
.a11y-tts-pick-mode :is(p, li, h1, h2, h3, h4, h5, h6, td, th, blockquote, figcaption, dt, dd):not(#a11y-root *) {
    cursor: pointer;
}
.a11y-tts-pick-mode :is(p, li, h1, h2, h3, h4, h5, h6, td, th, blockquote, figcaption, dt, dd):not(#a11y-root *):hover {
    outline: 2px dashed var(--a11y-primary, #5a2572);
    outline-offset: 2px;
}
.a11y-tts-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: calc(var(--a11y-z) - 2);
    background: var(--a11y-primary, #5a2572);
    color: #fff;
    text-align: center;
    padding: .625rem 1rem;
    font-size: .875rem;
}
.a11y-tts-banner[hidden] { display: none; }

/* ─── Reading Ruler / Mask ──────────────────────────────────────────── */
.a11y-ruler {
    position: fixed;
    left: 0;
    right: 0;
    height: 44px;
    background: color-mix(in srgb, var(--a11y-primary, #5a2572), transparent 65%);
    pointer-events: none;
    z-index: calc(var(--a11y-z) - 20);
    display: none;
}
html[data-a11y-reading-ruler="1"] .a11y-ruler { display: block; }

.a11y-mask-top, .a11y-mask-bottom {
    position: fixed;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, .65);
    pointer-events: none;
    z-index: calc(var(--a11y-z) - 20);
    display: none;
}
html[data-a11y-reading-mask="1"] .a11y-mask-top,
html[data-a11y-reading-mask="1"] .a11y-mask-bottom { display: block; }

/* ─── Reader-Mode Overlay ───────────────────────────────────────────── */
.a11y-reader {
    position: fixed;
    inset: 0;
    z-index: calc(var(--a11y-z) + 1);
    background: var(--a11y-panel-bg, #fff);
    color: var(--a11y-panel-text, #1a1a1a);
    overflow-y: auto;
}
.a11y-reader[hidden] { display: none; }
.a11y-reader__bar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    background: inherit;
    border-bottom: 1px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 88%);
}
.a11y-reader__close {
    min-height: 44px;
    min-width: 44px;
    border-radius: 8px;
    border: 1.5px solid color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 75%);
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: .5rem 1rem;
}
.a11y-reader__content {
    max-width: 70ch;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    font-size: 1.25rem;
    line-height: 1.7;
}
.a11y-reader__content img { max-width: 100%; height: auto; }

/* ─── Skip-Link ─────────────────────────────────────────────────────── */
.a11y-skiplink {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: calc(var(--a11y-z) + 2);
    background: var(--a11y-primary, #5a2572);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: top .15s;
}
.a11y-skiplink:focus { top: 8px; }

/* ─── Keyboard-Hints-Overlay ────────────────────────────────────────── */
.a11y-kbd-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--a11y-z) + 1);
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.a11y-kbd-overlay[hidden] { display: none; }
.a11y-kbd-overlay__box {
    background: var(--a11y-panel-bg, #fff);
    color: var(--a11y-panel-text, #1a1a1a);
    border-radius: var(--a11y-radius, 12px);
    padding: 1.5rem;
    max-width: 420px;
    width: 100%;
}
.a11y-kbd-overlay dl { margin: .75rem 0 0; }
.a11y-kbd-overlay dt { font-weight: 700; float: left; clear: left; margin-right: .5rem; }
.a11y-kbd-overlay dd { margin: 0 0 .5rem 0; }
.a11y-kbd-overlay kbd {
    background: color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 88%);
    border-radius: 4px;
    padding: .0625rem .375rem;
    font-family: monospace;
}

/* ─── Kontrast-/Sättigungs-Layer (auf der Zielseite, nicht im Widget) ── */
.a11y-fx-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: calc(var(--a11y-z) - 10);
}
html[data-a11y-contrast="high"] .a11y-fx-layer { backdrop-filter: contrast(1.3); -webkit-backdrop-filter: contrast(1.3); }
html[data-a11y-contrast="dark"] .a11y-fx-layer { backdrop-filter: invert(1) hue-rotate(180deg); -webkit-backdrop-filter: invert(1) hue-rotate(180deg); }
html[data-a11y-contrast="invert"] .a11y-fx-layer { backdrop-filter: invert(1); -webkit-backdrop-filter: invert(1); }
html[data-a11y-saturation="gray"] .a11y-fx-layer { backdrop-filter: grayscale(1); -webkit-backdrop-filter: grayscale(1); }
html[data-a11y-saturation="low"] .a11y-fx-layer { backdrop-filter: saturate(.4); -webkit-backdrop-filter: saturate(.4); }
html[data-a11y-contrast="high"][data-a11y-saturation="gray"] .a11y-fx-layer { backdrop-filter: contrast(1.3) grayscale(1); -webkit-backdrop-filter: contrast(1.3) grayscale(1); }
html[data-a11y-contrast="high"][data-a11y-saturation="low"] .a11y-fx-layer { backdrop-filter: contrast(1.3) saturate(.4); -webkit-backdrop-filter: contrast(1.3) saturate(.4); }
html[data-a11y-contrast="dark"][data-a11y-saturation="gray"] .a11y-fx-layer { backdrop-filter: invert(1) hue-rotate(180deg) grayscale(1); -webkit-backdrop-filter: invert(1) hue-rotate(180deg) grayscale(1); }
html[data-a11y-contrast="dark"][data-a11y-saturation="low"] .a11y-fx-layer { backdrop-filter: invert(1) hue-rotate(180deg) saturate(.4); -webkit-backdrop-filter: invert(1) hue-rotate(180deg) saturate(.4); }
html[data-a11y-contrast="invert"][data-a11y-saturation="gray"] .a11y-fx-layer { backdrop-filter: invert(1) grayscale(1); -webkit-backdrop-filter: invert(1) grayscale(1); }
html[data-a11y-contrast="invert"][data-a11y-saturation="low"] .a11y-fx-layer { backdrop-filter: invert(1) saturate(.4); -webkit-backdrop-filter: invert(1) saturate(.4); }

/* Medien bei Dunkel-Kontrast zurückdrehen, damit Fotos/Videos normal aussehen */
html[data-a11y-contrast="dark"] :is(img, video, picture, iframe):not(#a11y-root *) {
    filter: invert(1) hue-rotate(180deg);
}

/* Fallback ohne backdrop-filter-Unterstützung: Filter direkt auf <html>,
   Widget selbst wird gegen-gefiltert, damit es unverfälscht bleibt. */
@supports not (backdrop-filter: invert(1)) {
    html[data-a11y-contrast="high"] { filter: contrast(1.3); }
    html[data-a11y-contrast="dark"] { filter: invert(1) hue-rotate(180deg); }
    html[data-a11y-contrast="invert"] { filter: invert(1); }
    html[data-a11y-saturation="gray"] { filter: grayscale(1); }
    html[data-a11y-saturation="low"] { filter: saturate(.4); }
    html[data-a11y-contrast] #a11y-root,
    html[data-a11y-saturation] #a11y-root {
        filter: invert(1) hue-rotate(180deg);
        position: fixed;
        z-index: var(--a11y-z);
    }
}

/* ─── Zone 2: Wirkung auf die Zielseite ─────────────────────────────── */

/* Text */
html[data-a11y-font-scale] { font-size: calc(100% * var(--a11y-font-scale, 1)); }
html[data-a11y-line-spacing] body :is(p, li, dd, blockquote, h1, h2, h3, h4, h5, h6):not(#a11y-root *) {
    line-height: var(--a11y-line-spacing) !important;
}
html[data-a11y-letter-spacing] body :is(p, li, dd, blockquote, h1, h2, h3, h4, h5, h6, a, span):not(#a11y-root *) {
    letter-spacing: var(--a11y-letter-spacing) !important;
}
html[data-a11y-word-spacing] body :is(p, li, dd, blockquote, h1, h2, h3, h4, h5, h6, a, span):not(#a11y-root *) {
    word-spacing: var(--a11y-word-spacing) !important;
}
@font-face {
    font-family: 'OpenDyslexic';
    src: url('../Fonts/OpenDyslexic-Regular.woff2') format('woff2');
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}
/* Icon-Fonts (Font Awesome, Material Icons, Glyphicons, generische .icon-*)
   dürfen NIE überschrieben werden – ihre Glyphen sind Zeichen aus der
   Icon-Schrift selbst; ein Font-Override macht sie zu Kauderwelsch
   (z. B. <i class="fa-solid fa-house"> zeigt sonst ein falsches Zeichen). */
html[data-a11y-dyslexia-font] body *:not(#a11y-root *):not(
    [class*="fa-"], .fa, [class^="icon-"], [class*=" icon-"], [class$="-icon"],
    .material-icons, .material-symbols-outlined, [class*="glyphicon"]
) {
    font-family: 'OpenDyslexic', Arial, sans-serif !important;
}
html[data-a11y-readable-font] body *:not(#a11y-root *):not(
    [class*="fa-"], .fa, [class^="icon-"], [class*=" icon-"], [class$="-icon"],
    .material-icons, .material-symbols-outlined, [class*="glyphicon"]
) {
    font-family: Arial, Helvetica, sans-serif !important;
}
html[data-a11y-text-align] body *:not(#a11y-root *) {
    text-align: left !important;
}
html[data-a11y-highlight-links] body a:not(#a11y-root *) {
    text-decoration: underline !important;
    text-underline-offset: 2px;
    outline: 1px solid currentColor;
    outline-offset: 1px;
}
html[data-a11y-highlight-headings] body :is(h1, h2, h3, h4, h5, h6):not(#a11y-root *) {
    background: #fff3b0 !important;
    color: #1a1a1a !important;
    padding: 0 .2em;
}

/* Grafik */
html[data-a11y-big-cursor] body:not(#a11y-root) *:not(#a11y-root *) {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'><path d='M4 2 L4 20 L9 15 L12 22 L15 21 L12 14 L19 14 Z' fill='black' stroke='white' stroke-width='1.5' stroke-linejoin='round'/></svg>") 4 4, auto !important;
}
html[data-a11y-highlight-buttons] body :is(a, button, [role="button"], input[type="submit"]):not(#a11y-root *) {
    outline: 3px solid var(--a11y-primary, #5a2572) !important;
    outline-offset: 2px;
}
html[data-a11y-hide-bg-media] video[autoplay]:not(#a11y-root *) { visibility: hidden !important; }
.a11y-bg-hidden { background-image: none !important; }

/* Lesehilfen */
html[data-a11y-hide-images] body :is(img, picture, svg, figure):not(#a11y-root *):not(#a11y-root svg) {
    visibility: hidden !important;
}

/* Navigation */
html[data-a11y-focus-ring] :focus-visible:not(#a11y-root *) {
    outline: 4px solid #e53935 !important;
    outline-offset: 3px !important;
}
html[data-a11y-stop-animations] *:not(#a11y-root *):not(#a11y-root) {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
    .a11y-trigger { transition: none; }
    .a11y-trigger--visible { animation: none; opacity: 1; transform: scale(1); }
    .a11y-panel__sheet, .a11y-section__panel, .a11y-section__chev { transition: none !important; }
}

/* ─── Mobile: Bottom-Sheet ──────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .a11y-panel__sheet {
        top: auto;
        left: 0;
        right: 0;
        width: auto;
        max-height: 90dvh;
        border-top-left-radius: var(--a11y-radius, 12px);
        border-top-right-radius: var(--a11y-radius, 12px);
        border-bottom-left-radius: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .a11y-panel__header { position: relative; }
    .a11y-panel__header::before {
        content: "";
        position: absolute;
        top: 6px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--a11y-panel-text, #1a1a1a), transparent 75%);
    }
}
