/* =====================================================================
   a11y.css — Barrierefreiheits-Widget (Eigenbau, lokal, ohne Cloud)
   Nora, 2026-12-01. Nachbau der Live-Funktionen des früheren Plugins
   „Web Accessibility" (Ally) im Design-System der Seite.
   - Effekte hängen als Klassen an <html> (gesetzt von a11y-init.js im <head>).
   - Effekte wirken nur auf den Seiteninhalt: body > :not(.a11y).
     Knopf, Panel und Lesemaske (.a11y) bleiben immer bedienbar.
   - Widget-Maße bewusst in px: es wächst nicht mit „Größere Schrift".
   - Keine style-Attribute im HTML; Positionen setzt das Skript über CSSOM.
   ===================================================================== */

/* ---------- 1. Effekte auf den Seiteninhalt ---------- */

/* Größere Schrift (3 Stufen). Fast alle Schriftgrößen der Seite sind rem. */
html.a11y-fs-1{font-size:115% !important;}
html.a11y-fs-2{font-size:130% !important;}
html.a11y-fs-3{font-size:150% !important;}
/* Feste px-Zeilenhöhen würden bei größerer Schrift überlappen: relativ setzen */
html[class*="a11y-fs-"] body > :not(.a11y),
html[class*="a11y-fs-"] body > :not(.a11y) *{line-height:1.5 !important;}

/* Größere oder breitere Schrift: lange Wörter umbrechen statt seitlich überlaufen */
html[class*="a11y-fs-"] body > :not(.a11y) *,
html.a11y-font body > :not(.a11y) *{overflow-wrap:anywhere;}
/* Cookie-Hinweis bleibt auch mit großer Schrift im Bild (scrollbar) und lässt mobil
   Platz für den Barrierefreiheits-Knopf darüber */
.cookie{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;}
@media (max-width:767px){
  .cookie{max-height:calc(100vh - 96px);max-height:calc(100dvh - 96px);}
}

/* Größerer Zeilenabstand (3 Stufen); steht nach der Schriftgröße und gewinnt */
html.a11y-lh-1 body > :not(.a11y),html.a11y-lh-1 body > :not(.a11y) *{line-height:1.8 !important;}
html.a11y-lh-2 body > :not(.a11y),html.a11y-lh-2 body > :not(.a11y) *{line-height:2.1 !important;}
html.a11y-lh-3 body > :not(.a11y),html.a11y-lh-3 body > :not(.a11y) *{line-height:2.4 !important;}

/* Textausrichtung: 1 links, 2 zentriert, 3 rechts */
html.a11y-align-1 body > :not(.a11y) *{text-align:left !important;}
html.a11y-align-2 body > :not(.a11y) *{text-align:center !important;}
html.a11y-align-3 body > :not(.a11y) *{text-align:right !important;}

/* Lesbare Schrift: nur lokal installierte bzw. Systemschriften, kein Download.
   Verdana/Tahoma kennen keine Dünnschnitte, die 100–300er-Gewichte werden normal. */
html.a11y-font body > :not(.a11y),
html.a11y-font body > :not(.a11y) *:not(svg):not(svg *){
  font-family:"Atkinson Hyperlegible","Atkinson Hyperlegible Next",Verdana,Tahoma,"DejaVu Sans","Segoe UI",sans-serif !important;
  letter-spacing:.01em !important;word-spacing:.06em !important;
}

/* Graustufen und „Farben umkehren" teilen sich die filter-Eigenschaft.
   Filter nur auf die direkten Kinder von <body>: dort gibt es außer dem
   Cookie-Hinweis (selbst Kind) keine fixierten Elemente, die er stören würde. */
html.a11y-gray{--a11y-gray:grayscale(1);}
html.a11y-contrast-3{--a11y-inv:invert(1) hue-rotate(180deg);}
html.a11y-gray body > :not(.a11y),
html.a11y-contrast-3 body > :not(.a11y){filter:var(--a11y-gray,) var(--a11y-inv,);}
/* Inhaltsfotos beim Umkehren zurückdrehen, damit sie natürlich bleiben. Hintergrundfotos
   mit Text darüber (Hero, Zitate, Seitenbanner) bleiben umgekehrt, sonst stünde helle Schrift auf hellem Foto. */
html.a11y-contrast-3 body > :not(.a11y) :is(img,video):not(:is(.home-hero__bg,.home-quote__bg,.page-banner) *){filter:invert(1) hue-rotate(180deg);}
html.a11y-contrast-3 body{background:#000;}

/* Dunkler und heller Kontrast: Hintergrundfotos hinter Text ausblenden (Platz bleibt) */
html:is(.a11y-contrast-1,.a11y-contrast-2) body > :not(.a11y) :is(.home-hero__bg,.home-quote__bg,.page-banner > picture,.page-banner > img){visibility:hidden !important;}

/* Kontrast Stufe 1: dunkel (helle Schrift auf Schwarz, gelbe Links) */
html.a11y-contrast-1 body{background:#000 !important;}
html.a11y-contrast-1 body > :not(.a11y),
html.a11y-contrast-1 body > :not(.a11y) *:not(img):not(video):not(svg *){
  background-color:#000 !important;background-image:none !important;
  color:#fff !important;border-color:#fff !important;text-shadow:none !important;box-shadow:none !important;
  -webkit-text-stroke-color:#fff !important;
}
html.a11y-contrast-1 body > :not(.a11y) *::before,
html.a11y-contrast-1 body > :not(.a11y) *::after{background-image:none !important;border-color:#fff !important;}
html.a11y-contrast-1 body > :not(.a11y) :is(a,a *):not(img):not(video):not(svg *){color:#FFE45C !important;-webkit-text-stroke-color:#FFE45C !important;}
html.a11y-contrast-1 body > :not(.a11y) :is(button,.btn,input,select,textarea){box-shadow:inset 0 0 0 2px #fff !important;}
html.a11y-contrast-1 body > :not(.a11y) a.btn{box-shadow:inset 0 0 0 2px #FFE45C !important;}
html.a11y-contrast-1 body > :not(.a11y) ::placeholder{color:#d0d0d0 !important;}

/* Striche, die nur aus Hintergrundfarbe bestehen (Menü-Knopf, Trennlinien), sichtbar halten */
html.a11y-contrast-1 body > :not(.a11y) :is(.nav-toggle span,.rule){background-color:#fff !important;}

/* Kontrast Stufe 2: hell (Schwarz auf Weiß, dunkelblaue Links) */
html.a11y-contrast-2 body{background:#fff !important;}
html.a11y-contrast-2 body > :not(.a11y),
html.a11y-contrast-2 body > :not(.a11y) *:not(img):not(video):not(svg *){
  background-color:#fff !important;background-image:none !important;
  color:#000 !important;border-color:#000 !important;text-shadow:none !important;box-shadow:none !important;
  -webkit-text-stroke-color:#000 !important;
}
html.a11y-contrast-2 body > :not(.a11y) *::before,
html.a11y-contrast-2 body > :not(.a11y) *::after{background-image:none !important;border-color:#000 !important;}
html.a11y-contrast-2 body > :not(.a11y) :is(a,a *):not(img):not(video):not(svg *){color:#0B3A8C !important;-webkit-text-stroke-color:#0B3A8C !important;}
html.a11y-contrast-2 body > :not(.a11y) :is(button,.btn,input,select,textarea){box-shadow:inset 0 0 0 2px #000 !important;}
html.a11y-contrast-2 body > :not(.a11y) a.btn{box-shadow:inset 0 0 0 2px #0B3A8C !important;}
html.a11y-contrast-2 body > :not(.a11y) ::placeholder{color:#444 !important;}
html.a11y-contrast-2 body > :not(.a11y) :is(.nav-toggle span,.rule){background-color:#000 !important;}

/* Bilder ausblenden: Platz bleibt erhalten (kein Layout-Sprung) */
html.a11y-img body > :not(.a11y) :is(img,picture,video,canvas){visibility:hidden !important;}
html.a11y-img body > :not(.a11y),
html.a11y-img body > :not(.a11y) *,
html.a11y-img body > :not(.a11y) *::before,
html.a11y-img body > :not(.a11y) *::after{background-image:none !important;}

/* Animationen anhalten (dazu stoppt main.js den Schreibmaschinen-Effekt) */
html.a11y-motion{scroll-behavior:auto !important;}
html.a11y-motion *,html.a11y-motion *::before,html.a11y-motion *::after{
  animation:none !important;transition:none !important;scroll-behavior:auto !important;
}

/* Links hervorheben: ohne Farbwechsel, damit kein Kontrast verloren geht */
html.a11y-links body > :not(.a11y) a{
  text-decoration:underline !important;text-decoration-thickness:2px !important;text-underline-offset:3px !important;
  outline:2px dashed currentColor;outline-offset:2px;
}

/* Fokusrahmen: doppelter Ring (gelb innen, dunkelblau außen), auf hellem und blauem Grund sichtbar */
html.a11y-focus body > :not(.a11y) :focus{
  outline:3px solid #1C244B !important;outline-offset:3px !important;
  box-shadow:0 0 0 6px #FFD43B !important;border-radius:4px;
}

/* Sprunglink: Ziel nicht unter der klebenden Kopfzeile verstecken */
#main{scroll-margin-top:var(--header-h,88px);}
#main:focus{outline:none;}

/* ---------- 2. Widget (immer ohne Effekte) ---------- */
.a11y{
  --a11y-blue:#0E77B7;--a11y-blue-dark:#0C6AA3;--a11y-navy:#1C244B;--a11y-tint:#E4F3FC;--a11y-line:#e3eef6;
  font-family:-apple-system,"system-ui","Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  font-size:15px;line-height:1.45;font-weight:400;letter-spacing:normal;word-spacing:normal;
  text-align:left;color:var(--a11y-navy);
}
.a11y *,.a11y *::before,.a11y *::after{box-sizing:border-box;}
.a11y [hidden]{display:none !important;}
.a11y button{font-family:inherit;line-height:inherit;letter-spacing:normal;text-transform:none;margin:0;-webkit-appearance:none;appearance:none;}
.a11y svg{display:block;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.a11y .a11y-sr{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}

/* Auslöse-Knopf: Person-Symbol, mittel (48 px), rund, #0E77B7.
   Desktop rechts mittig, 10 px vom Rand; mobil rechts unten 10/10 px. */
.a11y-trigger{
  position:fixed;z-index:2147483000;right:10px;top:50%;transform:translateY(-50%);
  width:48px;height:48px;padding:0;border:0;border-radius:32px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  background:var(--a11y-blue);color:#fff;
  /* weißer Ring: Knopf bleibt auch auf blauen Flächen (Fußzeile, Karten) als Kreis erkennbar */
  box-shadow:0 0 0 2px #fff,0 4px 14px rgba(14,119,183,.35);
  outline:3px solid transparent;outline-offset:2px;
  transition:background-color .2s ease,box-shadow .2s ease;
}
.a11y-trigger svg{width:30px;height:30px;fill:currentColor;stroke:none;}
.a11y-trigger:hover{background:var(--a11y-blue-dark);}
.a11y-trigger:focus-visible{outline:3px solid transparent;box-shadow:0 0 0 3px #fff,0 0 0 6px var(--a11y-navy),0 0 0 8px #fff;}
/* kleiner Punkt, solange mindestens eine Anpassung aktiv ist */
.a11y-trigger[data-active]::after{
  content:"";position:absolute;top:1px;right:1px;width:12px;height:12px;border-radius:50%;
  background:#fff;box-shadow:inset 0 0 0 3px var(--a11y-blue);
}
@media (max-width:767px){
  .a11y-trigger{top:auto;transform:none;bottom:calc(10px + var(--a11y-lift,0px));}
}

/* Panel */
.a11y-panel{
  position:fixed;z-index:2147483001;top:16px;right:16px;
  width:384px;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);
  display:flex;flex-direction:column;overflow:hidden;
  background:#fff;color:var(--a11y-navy);border-radius:25px;
  box-shadow:0 24px 60px rgba(28,36,75,.28),0 0 0 1px rgba(28,36,75,.06);
  animation:a11y-in .18s cubic-bezier(.22,.61,.36,1);
}
@keyframes a11y-in{from{opacity:0;transform:translateX(16px);}to{opacity:1;transform:none;}}
@media (max-width:600px){
  .a11y-panel{top:8px;right:8px;left:8px;bottom:8px;width:auto;max-width:none;max-height:none;border-radius:20px;}
}
.a11y-head{
  display:flex;align-items:center;gap:12px;flex-shrink:0;
  padding:12px 10px 12px 20px;background:var(--a11y-blue);color:#fff;
}
.a11y-head > svg{width:26px;height:26px;fill:currentColor;stroke:none;}
.a11y-title{
  flex:1;margin:0;font-family:inherit;font-size:18px;line-height:1.3;font-weight:600;
  color:#fff;text-transform:none;letter-spacing:normal;
}
.a11y-close{
  width:44px;height:44px;flex-shrink:0;padding:0;border:0;border-radius:50%;cursor:pointer;
  display:flex;align-items:center;justify-content:center;background:transparent;color:#fff;
  outline:3px solid transparent;outline-offset:-3px;
}
.a11y-close svg{width:22px;height:22px;stroke-width:2.2;}
.a11y-close:hover{background:rgba(255,255,255,.16);}
.a11y-close:focus-visible{outline:3px solid #fff;outline-offset:-3px;}

.a11y-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;}
.a11y-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.a11y-grid li{margin:0;padding:0;}
.a11y-tile{
  position:relative;width:100%;height:100%;min-height:104px;
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;
  padding:14px 14px 12px;border:2px solid transparent;border-radius:16px;cursor:pointer;
  background:var(--a11y-tint);color:var(--a11y-navy);
  font-size:14.5px;line-height:1.3;font-weight:500;text-align:left;
  outline:3px solid transparent;outline-offset:2px;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease;
}
.a11y-tile svg{width:28px;height:28px;color:var(--a11y-blue);}
.a11y-tile:hover{border-color:var(--a11y-blue);}
.a11y-tile:focus-visible{outline:3px solid var(--a11y-navy);outline-offset:2px;}
.a11y-tile[aria-pressed="true"]{background:var(--a11y-blue);color:#fff;border-color:var(--a11y-blue);}
.a11y-tile[aria-pressed="true"] svg{color:#fff;}
.a11y-tile[aria-pressed="true"]:hover{background:var(--a11y-blue-dark);border-color:var(--a11y-navy);color:#fff;}
.a11y-label{display:block;}
.a11y-state{display:flex;align-items:center;gap:8px;margin-top:auto;font-size:12.5px;font-weight:400;line-height:1.2;min-height:15px;}
.a11y-bars{display:flex;gap:3px;}
.a11y-bars i{display:block;width:14px;height:4px;border-radius:2px;background:#9FC9E2;}
.a11y-bars i.on{background:var(--a11y-blue);}
.a11y-tile[aria-pressed="true"] .a11y-bars i{background:rgba(255,255,255,.45);}
.a11y-tile[aria-pressed="true"] .a11y-bars i.on{background:#fff;}
/* Haken in der Ecke für aktive Ein/Aus-Schalter (nicht nur Farbe als Hinweis) */
.a11y-check{position:absolute;top:10px;right:10px;width:22px;height:22px;border-radius:50%;background:#fff;color:var(--a11y-blue);display:none;align-items:center;justify-content:center;}
.a11y-check svg{width:14px;height:14px;stroke-width:3;color:var(--a11y-blue);}
.a11y-tile[aria-pressed="true"] .a11y-check{display:flex;}
.a11y-tile[aria-pressed="true"] .a11y-check svg{color:var(--a11y-blue);}
.a11y-tile .a11y-chev{position:absolute;top:14px;right:12px;width:18px;height:18px;}
.a11y-tile .a11y-chev svg{width:18px;height:18px;stroke-width:2.2;}

.a11y-foot{flex-shrink:0;padding:12px 16px 16px;border-top:1px solid var(--a11y-line);background:#fff;}
.a11y-reset{
  width:100%;min-height:46px;padding:12px 20px;border:0;border-radius:50px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:8px;
  background:#fff;color:var(--a11y-blue);box-shadow:inset 0 0 0 2px var(--a11y-blue);
  font-family:"Roboto",-apple-system,"system-ui","Segoe UI",Arial,sans-serif;
  font-size:13px;font-weight:600;letter-spacing:1px;text-transform:uppercase;line-height:1.2;
  outline:3px solid transparent;outline-offset:3px;
}
.a11y-reset svg{width:18px;height:18px;stroke-width:2.2;}
.a11y-reset:hover{background:var(--a11y-blue);color:#fff;}
.a11y-reset:focus-visible{outline:3px solid var(--a11y-navy);outline-offset:3px;}
.a11y-note{margin:10px 0 0;font-size:12.5px;line-height:1.4;color:#4a4f63;text-align:center;}

/* Seitenstruktur (Unteransicht im Panel) */
.a11y-back{
  display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:8px 14px 8px 10px;margin:0 0 12px;
  border:0;border-radius:50px;cursor:pointer;background:var(--a11y-tint);color:var(--a11y-navy);
  font-size:14px;font-weight:500;outline:3px solid transparent;outline-offset:2px;
}
.a11y-back svg{width:18px;height:18px;stroke-width:2.2;}
.a11y-back:hover{background:#CFE4F1;}
.a11y-back:focus-visible{outline:3px solid var(--a11y-navy);}
.a11y-subtitle{margin:0 0 4px;font-family:inherit;font-size:17px;font-weight:600;line-height:1.3;color:var(--a11y-navy);text-transform:none;letter-spacing:normal;}
.a11y-group{margin:16px 0 0;font-family:inherit;font-size:13px;font-weight:600;line-height:1.3;color:#3d4560;text-transform:uppercase;letter-spacing:.06em;}
.a11y-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:4px;}
.a11y-list li{margin:0;padding:0;}
.a11y-jump{
  width:100%;display:flex;align-items:baseline;gap:10px;min-height:40px;padding:9px 12px;
  border:0;border-radius:10px;cursor:pointer;background:transparent;color:var(--a11y-navy);
  font-size:14.5px;line-height:1.35;font-weight:400;text-align:left;
  outline:3px solid transparent;outline-offset:-3px;overflow-wrap:anywhere;
}
.a11y-jump:hover{background:var(--a11y-tint);}
.a11y-jump:focus-visible{outline:3px solid var(--a11y-navy);outline-offset:-3px;background:var(--a11y-tint);}
.a11y-jump[data-level="2"]{padding-left:24px;}
.a11y-jump[data-level="3"]{padding-left:36px;}
.a11y-jump[data-level="4"],.a11y-jump[data-level="5"],.a11y-jump[data-level="6"]{padding-left:48px;}
.a11y-badge{
  flex-shrink:0;min-width:28px;padding:2px 6px;border-radius:6px;
  background:var(--a11y-blue);color:#fff;font-size:11.5px;font-weight:700;line-height:1.4;text-align:center;
}
.a11y-empty{margin:8px 0 0;font-size:14px;color:#4a4f63;}

/* Lesemaske: zwei abgedunkelte Flächen, dazwischen ein heller Lesestreifen */
.a11y-mask{position:fixed;left:0;right:0;z-index:2147482990;pointer-events:none;background:rgba(10,16,40,.62);}
.a11y-mask--top{top:0;height:40vh;border-bottom:3px solid #6EADD4;}
.a11y-mask--bottom{bottom:0;height:40vh;border-top:3px solid #6EADD4;}

/* Hochkontrast-Modus des Systems (Windows) */
@media (forced-colors:active){
  .a11y-trigger,.a11y-tile,.a11y-reset,.a11y-back,.a11y-close{border:2px solid ButtonText;}
  .a11y-tile[aria-pressed="true"]{border-width:4px;}
  .a11y-check{display:none !important;}
  .a11y-mask{background:Canvas;opacity:.85;}
}
@media (prefers-reduced-motion:reduce){
  .a11y-panel{animation:none;}
}
@media print{.a11y{display:none !important;}}
