@charset "UTF-8";
/*!
 * Accessibility widget ("Barrierefrei") — standalone stylesheet.
 * Loaded via the <link> tag rendered by reusables/accessibility-widget.php, so
 * markup + behavior (assets/js/accessibility-widget.js) + styles travel as one
 * drop-in unit, independent of the webpack bundle. Panel design: Figma file
 * 11--3G--DRAFTS--SH-V1, node 37859:2581 "Barrierefrei Overlay V1"; stepper
 * + toggle cards follow draft 37894:2585 "Panel · Bedienungshilfen 3G"; the
 * fixed header bar follows node 37907:2591 "Kopfzeile".
 *
 * ── Re-theming ─────────────────────────────────────────────────────────────
 * Every colour and font the widget uses is a --a11y-* custom property. To
 * restyle the widget in another project, DON'T edit this file — just redefine
 * any of these tokens in your own :root rule, e.g.
 *
 *     :root {
 *       --a11y-primary: #0055ff;
 *       --a11y-font:    "Inter", sans-serif;
 *     }
 *
 * The defaults below live on `:where(:root)` (zero specificity), so a plain
 * `:root { … }` override always wins regardless of stylesheet load order — it
 * can sit in <head>, be enqueued before this file, or come after; no ordering
 * gymnastics needed. The colour tokens also follow the host's own palette
 * custom properties (--3G-*, --gray-*, …) when those exist and fall back to the
 * 3G defaults otherwise.
 *
 * ── Weights ──────────────────────────────────────────────────────────────────
 * The host font here is Matter, which ships 430 / 570 / 790 only. 600 fell
 * through to the 790 file and 400 to 430, so the widget states the real
 * weights: 570 Medium for titles, labels and values, 430 Regular for body
 * text (Pablo, 07.10.2026). The readable-font rules keep their own 600.
 *
 * ── Host integration points ────────────────────────────────────────────────
 *   1. root font-size hook: html { font-size: calc(<base> * var(--a11y-root-scale, 1)); }
 *   2. content regions for the page-reshaping rules: the semantic <main>, <header>
 *      and <footer> landmarks (the widget's own <header>/<footer> are excluded).
 *   3. rem-based sizes assume a 10px root (1rem = 10px).
 * The page-reshaping rules are `html.a11y-*`-scoped and use !important, so
 * load order vs. the site stylesheet is not critical — but loading after it
 * is safest for the widget's own component styles.
 */
:where(:root) {
  /* Palette — override any of these to re-theme (see header). */
  --a11y-primary: var(--black--400, #000000);        /* selected fills, active borders */
  --a11y-secondary: var(--gray--250, #969696);       /* at-limit stepper glyphs */
  --a11y-accent: var(--a11y-primary);                /* reading-guide bar, magnifier ring */
  --a11y-active: var(--black--400, #000000);         /* toggle-card ON state: switch track */
  --a11y-on-accent: var(--white, #ffffff);           /* text/knob on primary/accent/active */
  --a11y-surface: var(--white, #ffffff);             /* panel bg, toggle cards, read-mode bg */
  --a11y-surface-raised: var(--white, #ffffff);      /* magnifier lens, read-mode chrome */
  --a11y-surface-muted: var(--3G-Stahlgrau--40, #e7ebeb); /* segmented-track bg */
  --a11y-surface-sunken: var(--3G-Stahlgrau--20, #f3f5f5); /* stepper-pill track bg */
  --a11y-ink: var(--black--400, #000000);
  --a11y-ink-muted: var(--gray--275, #6e6e6e);       /* toggle-card descriptions */
  --a11y-track-off: var(--3G-Stahlgrau--100, #c3cdcd); /* toggle-card switch off-track */
  --a11y-border: var(--3G-Stahlgrau--40, #e7ebeb);   /* toggle-card border, footer divider, read-mode borders */
  --a11y-focus-ring: var(--red-error--400, #ff0000);

  /* Overlay / shadow colours */
  --a11y-shadow: rgba(0, 0, 0, 0.3);        /* launcher, badge, guide, magnifier */
  --a11y-shadow-strong: rgba(0, 0, 0, 0.5); /* dialog panel */
  --a11y-backdrop: rgba(0, 0, 0, 0.4);      /* modal <dialog> backdrop */
  --a11y-mask: rgba(0, 0, 0, 0.7);          /* reading-mask panels */

  /* Motion: deliberately NOT declared here. Every transition reads
     var(--a11y-motion-fast|base, <own default>) var(--a11y-ease, ease), so a host
     that sets nothing keeps the original timings exactly, while a host with a
     motion system maps the three tokens in its own :root rule. */

  /* Typography */
  --a11y-font: inherit;                     /* widget UI font (defaults to the host page font) */
  --a11y-readable-font: Arial, "Helvetica Neue", Helvetica, sans-serif; /* readable-font effect, magnifier, reading mode */
}

.a11y-launcher {
  position: fixed;
  left: 1.6rem;
  bottom: 1.6rem;
  z-index: 1000;
}

.a11y-launcher__button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: var(--a11y-primary);
  color: var(--a11y-on-accent);
  box-shadow: 0 8px 20px -4px var(--a11y-shadow);
  transition: background var(--a11y-motion-base, 0.2s) var(--a11y-ease, ease), transform var(--a11y-motion-base, 0.2s) var(--a11y-ease, ease);
}
.a11y-launcher__button:hover {
  transform: scale(1.05);
}
.a11y-launcher__button:focus-visible {
  outline: 2px solid var(--a11y-focus-ring);
  outline-offset: 2px;
}

.a11y-launcher__icon {
  width: 26px;
  height: 26px;
}

.a11y-launcher.is-active .a11y-launcher__button {
  background: var(--a11y-accent);
}

.a11y-launcher__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--a11y-on-accent);
  color: var(--a11y-accent);
  box-shadow: 0 2px 6px -1px var(--a11y-shadow);
}
.a11y-launcher__badge[hidden] {
  display: none;
}
.a11y-launcher__badge svg {
  width: 12px;
  height: 12px;
}

.a11y-widget {
  position: fixed;
  inset: auto;
  left: 1.6rem;
  bottom: 1.6rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  /* dvh, not vh: on phones 100vh is the viewport with the browser bars
     retracted, so a bottom-anchored panel at full height ran past the top of
     the screen. vh stays as the fallback for browsers without dvh. */
  max-height: calc(100vh - 3.2rem);
  max-height: calc(100dvh - 3.2rem);
  overflow: visible;
}
.a11y-widget::backdrop {
  background: var(--a11y-backdrop);
}

.a11y-widget,
.a11y-widget * {
  box-sizing: border-box;
}

/* The panel is the frame only: the header is a fixed bar and __body scrolls,
   so overflow is clipped here (which is also what keeps the header's square top
   corners inside the panel radius) and the padding lives on the two children. */
.a11y-widget__panel {
  display: flex;
  flex-direction: column;
  width: 64rem;
  max-width: calc(100vw - 3.2rem);
  max-height: calc(100vh - 3.2rem);
  max-height: calc(100dvh - 3.2rem);
  overflow: hidden;
  border-radius: 1.6rem;
  background: var(--a11y-surface);
  color: var(--a11y-ink);
  font-family: var(--a11y-font);
  box-shadow: 0 20px 50px -20px var(--a11y-shadow-strong);
}

/* Body: the scroll container. min-height:0 is what lets it shrink inside the
   panel's max-height — without it the flex item refuses to shrink and pushes
   the header out instead of scrolling. */
.a11y-widget__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  padding: 2.4rem 2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Header (Figma "Kopfzeile" 37907:2591): one 8.8rem row — reset pill · centred
   title · close. It sits outside the scrollport, so it stays put while the
   controls scroll and can never cover a focused control (WCAG 2.2 SC 2.4.11). */
.a11y-widget__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  /* 2.2 + 4.4 + 2.2 = 8.8rem in Figma, where the rule is an inside stroke; in
     CSS the border adds height, so the bottom padding gives that 1px back. */
  padding: 2.2rem 2rem calc(2.2rem - 1px);
  border-bottom: 1px solid var(--a11y-border);
  border-radius: 1.6rem 1.6rem 0 0;
  background: var(--a11y-surface);
}

/* Equal 17rem side boxes are what centre the title. `0 1 17rem` rather than
   `0 0 17rem`: the default min-width:auto floors each box at its content, so a
   longer translation widens its box instead of overflowing the header. */
.a11y-widget__header-slot {
  flex: 0 1 17rem;
  display: flex;
  align-items: center;
  height: 4.4rem;
}
.a11y-widget__header-slot--end {
  justify-content: flex-end;
}

.a11y-widget__title {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font-size: calc(2.8 * var(--type, 1rem));
  font-weight: 570;
  line-height: 1.1;
  letter-spacing: calc(-0.06 * var(--type, 1rem)); /* -0.6px at 28px */
  text-align: center;
  /* Below ~360px the title no longer fits beside the pill and the close button.
     It wraps rather than forcing the panel to scroll sideways (SC 1.4.10);
     hyphens turn that into a proper break instead of a mid-word cut. */
  overflow-wrap: break-word;
  hyphens: auto;
  color: var(--a11y-ink);
}

.a11y-widget__close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 4.8rem;
  height: 4.4rem; /* Figma clips the 48px box to the 44px row */
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--a11y-ink);
  cursor: pointer;
  transition: background var(--a11y-motion-fast, 0.15s) var(--a11y-ease, ease);
}
.a11y-widget__close:hover {
  background: var(--a11y-surface-sunken);
}
.a11y-widget__close svg {
  width: 3.1rem;
  height: 3.1rem;
}

/* Reset: a pill (Figma "Kopf links"). The 3.8rem height falls out of icon +
   padding rather than being set, so it grows with the font-size control. */
.a11y-widget__reset {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
  padding: 1rem 1.6rem 1rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--a11y-surface-sunken);
  color: var(--a11y-ink);
  font-family: inherit;
  font-size: calc(1.4 * var(--type, 1rem));
  font-weight: 570;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--a11y-motion-fast, 0.15s) var(--a11y-ease, ease);
}
.a11y-widget__reset:hover {
  background: var(--a11y-surface-muted);
}
/* The JS hides it while every setting is still at its default; inline-flex would
   otherwise beat the [hidden] default of display:none. */
.a11y-widget__reset[hidden] {
  display: none;
}
.a11y-widget__reset svg {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
}

/* Controls: three groups (steppers / toggles / segmented). */
.a11y-widget__controls {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.a11y-widget__group {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Section heading (Figma "Abschnitt · …" frames). The panel body is one flat
   1.2rem stack — the 3.2rem that separates sections is this block's own top
   padding, exactly as in the design, so card-bottom to title is 1.2 + 3.2rem. */
.a11y-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 3.2rem 0 0.6rem;
  text-align: center;
}
/* The body's own padding already opens the panel. */
.a11y-widget__group:first-child .a11y-section {
  padding-top: 0;
}

.a11y-section__title {
  margin: 0;
  font-size: calc(2.2 * var(--type, 1rem));
  font-weight: 570;
  line-height: 1.15;
  letter-spacing: calc(-0.03 * var(--type, 1rem)); /* -0.3px at 22px */
  color: var(--a11y-ink);
}

.a11y-section__desc {
  margin: 0;
  font-size: calc(1.6 * var(--type, 1rem));
  font-weight: 430;
  line-height: 1.4;
  color: var(--a11y-ink-muted);
}

/* Summary panel: the page's own text, revealed by the Inhaltszusammenfassung
   card above it. No Figma source — the draft shows the switch but never the
   output — so it borrows the control-card shell and reads at the card's
   description size in full ink, since this one is content, not a label. */
.a11y-summary {
  padding: 2rem 2.2rem;
  border: 1px solid var(--a11y-border);
  border-radius: 1.6rem;
  background: var(--a11y-surface);
  color: var(--a11y-ink);
  font-size: calc(1.55 * var(--type, 1rem));
  line-height: 1.45;
}
.a11y-summary[hidden] {
  display: none;
}
.a11y-summary > :first-child {
  margin-top: 0;
}
.a11y-summary > :last-child {
  margin-bottom: 0;
}

/* Navigation row: arrow + label on a plain card. Both an <a> and a <button>
   wear this class, hence the button resets and the text-decoration. */
.a11y-nav__link {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  width: 100%;
  padding: 1.8rem 2.2rem 1.8rem 2rem;
  border: 1px solid var(--a11y-border);
  border-radius: 1.6rem;
  background: var(--a11y-surface);
  color: var(--a11y-ink);
  font-family: inherit;
  font-weight: 430;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--a11y-motion-fast, 0.15s) var(--a11y-ease, ease);
}
.a11y-nav__link:hover {
  border-color: var(--a11y-primary);
}

/* The arrow is a text glyph in the design, not an icon — so it scales with the
   font-size control like everything else. The fixed box keeps the labels aligned. */
.a11y-nav__arrow {
  flex: 0 0 auto;
  width: 2.6rem;
  font-size: calc(2 * var(--type, 1rem));
  line-height: 1.1;
  font-feature-settings: "dlig" 1;
}

.a11y-nav__label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: calc(1.9 * var(--type, 1rem));
  line-height: 1.2;
  font-feature-settings: "dlig" 1;
}

/* Control-card shell shared by stepper rows and toggle cards: white card
   with a bordered 64px icon field, title + description column (Figma draft
   37894:2585 "Panel · Bedienungshilfen 3G"), one card per row. */
.a11y-range,
.a11y-tile {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 100%;
  padding: 2rem 2.2rem 2rem 2rem;
  border: 1px solid var(--a11y-border);
  border-radius: 1.6rem;
  background: var(--a11y-surface);
  color: var(--a11y-ink);
}

.a11y-range__icon,
.a11y-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 6.4rem;
  height: 6.4rem;
  border: 2px solid currentColor;
  border-radius: 1.6rem;
  transition: color var(--a11y-motion-fast, 0.15s) var(--a11y-ease, ease);
}
.a11y-range__icon svg,
.a11y-tile__icon svg {
  width: 3.2rem;
  height: 3.2rem;
}

.a11y-range__text,
.a11y-tile__text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 auto;
  min-width: 0;
}

.a11y-range__label,
.a11y-tile__label {
  font-size: calc(2.4 * var(--type, 1rem));
  font-weight: 570;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.a11y-range__desc,
.a11y-tile__desc {
  font-size: calc(1.8 * var(--type, 1rem));
  font-weight: 570;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--a11y-ink-muted);
}

/* Stepper: [− value +] (Figma 37908:2584). Two free-standing sunken circles
   with the value between them — there is no enclosing track any more, so the
   row is just a flex line and its width falls out of the parts. */
.a11y-range__stepper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 0 0 auto;
}

.a11y-range__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.8rem;
  height: 3.8rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--a11y-surface-sunken);
  color: var(--a11y-ink);
  cursor: pointer;
  transition: background var(--a11y-motion-fast, 0.15s) var(--a11y-ease, ease), color var(--a11y-motion-fast, 0.15s) var(--a11y-ease, ease);
}
.a11y-range__btn:hover {
  background: var(--a11y-surface-muted);
}
/* 1.4rem: the bar is 14px wide in the design's 38px circle. */
.a11y-range__btn svg {
  width: 1.4rem;
  height: 1.4rem;
}
.a11y-range__btn[aria-disabled=true] {
  color: var(--a11y-secondary);
  cursor: no-drop;
}
.a11y-range__btn[aria-disabled=true]:hover {
  background: var(--a11y-surface-sunken);
}

/* Narrower than the design's fixed 6.4rem box (Pablo, 2026-08-20) — min-width
   rather than width, so a longer reading (or a raised font-size step) grows it
   instead of spilling. */
.a11y-range__value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 5.4rem;
  font-size: calc(1.3 * var(--type, 1rem));
  font-weight: 570;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

/* Toggle card: the whole card is the switch button. The ON state fills the
   track with --a11y-active and leaves the rest of the card alone. */
.a11y-tile {
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--a11y-motion-fast, 0.15s) var(--a11y-ease, ease);
}
.a11y-tile:hover {
  border-color: var(--a11y-primary);
}

/* The pill: 56×32 track, 26px knob travelling 3px → 27px. */
.a11y-tile__switch {
  position: relative;
  flex: 0 0 auto;
  width: 5.6rem;
  height: 3.2rem;
  border-radius: 999px;
  background: var(--a11y-track-off);
  transition: background var(--a11y-motion-fast, 0.15s) var(--a11y-ease, ease);
}
.a11y-tile__knob {
  position: absolute;
  top: 50%;
  left: 0.3rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--a11y-on-accent);
  transform: translateY(-50%);
  transition: transform var(--a11y-motion-fast, 0.15s) var(--a11y-ease, ease);
}
/* The icon field deliberately does NOT react to the ON state: in the design
   (Figma 37907:2682 "Hoher Kontrast", switched on) it is the same black-bordered
   box as in the OFF state — only the track fills. */
.a11y-tile[aria-checked=true] .a11y-tile__switch {
  background: var(--a11y-active);
}
.a11y-tile[aria-checked=true] .a11y-tile__knob {
  transform: translate(2.4rem, -50%);
}

.a11y-widget__footer {
  padding-top: 1.6rem;
  border-top: 1.5px solid var(--a11y-border);
  text-align: center;
  font-size: calc(1.2 * var(--type, 1rem));
  font-weight: 570;
  line-height: 1;
  color: var(--a11y-ink);
}

.a11y-widget__footer-link {
  color: var(--a11y-ink);
  text-decoration: underline;
  text-decoration-thickness: 10%;
  text-decoration-skip-ink: none;
  text-underline-position: from-font;
  border-radius: 2px;
}
.a11y-widget__footer-link:hover {
  text-decoration-thickness: 2px;
}

.a11y-widget__close:focus-visible,
.a11y-widget__reset:focus-visible,
.a11y-widget__footer-link:focus-visible,
.a11y-nav__link:focus-visible,
.a11y-tile:focus-visible,
.a11y-range__btn:focus-visible {
  outline: 2px solid var(--a11y-focus-ring);
  outline-offset: 2px;
}

/* Narrow panels: hugging header slots, tighter cards. */
@media (max-width: 560px) {
  /* The 17rem side boxes don't fit a ~34rem panel: let them hug their content
     and shrink the title, so the row stays three-across (reordering it would
     break the reading order, SC 1.3.2) and nothing forces horizontal scroll. */
  .a11y-widget__header {
    gap: 0.8rem;
    padding: 1.6rem;
  }
  /* Hugging slots, but never narrower than the close button: with Reset hidden
     the start slot would otherwise collapse to 0 and drag the centred title
     sideways — and back again the moment Reset returns. */
  .a11y-widget__header-slot {
    flex: 0 1 auto;
    min-width: 4.8rem;
  }
  /* A tighter pill and a smaller title are what buy the gaps back: at 37.5rem
     the three items would otherwise fill the row edge to edge. */
  .a11y-widget__reset {
    padding: 0.8rem 1.2rem 0.8rem 1rem;
    gap: 0.6rem;
  }
  .a11y-widget__reset svg {
    width: 1.6rem;
    height: 1.6rem;
  }
  .a11y-widget__title {
    font-size: calc(2 * var(--type, 1rem));
  }
  .a11y-widget__body {
    padding: 1.6rem;
  }
  .a11y-range,
  .a11y-tile,
  .a11y-nav__link,
  .a11y-summary {
    gap: 1.2rem;
    padding: 1.2rem;
  }
  .a11y-section {
    padding-top: 2.4rem;
  }
  .a11y-section__title {
    font-size: calc(2 * var(--type, 1rem));
  }
  .a11y-range__icon,
  .a11y-tile__icon {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 1.2rem;
  }
  .a11y-range__icon svg,
  .a11y-tile__icon svg {
    width: 2.6rem;
    height: 2.6rem;
  }
  /* Keep icon + text on one row; when the text would drop below 14rem the
     stepper wraps to its own row, indented to the text column. */
  .a11y-range {
    flex-wrap: wrap;
  }
  .a11y-range__text {
    flex-basis: 0;
    min-width: 14rem;
  }
  /* 30 % smaller on phones (Pablo, 07.10.2026): 24 → 16.8, 18 → 12.6. */
  .a11y-range__label,
  .a11y-tile__label {
    font-size: calc(1.68 * var(--type, 1rem));
  }
  .a11y-range__desc,
  .a11y-tile__desc {
    font-size: calc(1.26 * var(--type, 1rem));
  }
  .a11y-range__stepper {
    margin-left: 6rem;
  }
}

html.a11y-readable-font :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)),
html.a11y-readable-font :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) :is(p, li, a, span, h1, h2, h3, h4, h5, h6, div, button, label, td, th, blockquote) {
  font-family: var(--a11y-readable-font) !important;
  letter-spacing: normal;
}

html.a11y-emphasize-titles :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) :is(h1, h2, h3, h4, h5, h6) {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

html.a11y-line-height :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) :is(p, li, a, span, h1, h2, h3, h4, h5, h6, div, button, label, td, th, blockquote) {
  line-height: var(--a11y-user-line-height) !important;
}

html.a11y-letter-spacing :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) :is(p, li, a, span, h1, h2, h3, h4, h5, h6, div, button, label, td, th, blockquote) {
  letter-spacing: var(--a11y-user-letter-spacing) !important;
}

html.a11y-align-right :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) :is(p, li, h1, h2, h3, h4, h5, h6, div) {
  text-align: right !important;
}

html.a11y-monochrome :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) {
  filter: grayscale(1);
}

html.a11y-saturation-high :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) {
  filter: saturate(1.7);
}

html.a11y-saturation-low :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) {
  filter: saturate(0.45);
}

html.a11y-contrast-high :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) {
  filter: contrast(1.4);
}

html.a11y-contrast-dark :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) {
  filter: invert(1) hue-rotate(180deg);
}

html.a11y-contrast-dark :is(img:not(picture img), video, picture) {
  filter: invert(1) hue-rotate(180deg);
}

/* The invert() filter above only covers main/header/footer, so the page canvas
   (html/body, margins, area below a short footer, overscroll) would stay the
   light design colour and frame the dark content in white. Darken the canvas
   directly — html is NOT inverted, so a plain dark value renders as-is and
   matches the inverted-dark landmarks. */
html.a11y-contrast-dark {
  background: #000 !important;
}

/* Colour-scheme themes: force black-on-white / white-on-black on the landmarks
   and their text (the canvas too, so margins/overscroll match). */
html.a11y-theme-light {
  background: #fff !important;
}
html.a11y-theme-light :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) {
  background: #fff !important;
  color: #000 !important;
}
html.a11y-theme-light :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) :is(p, li, span, a, div, h1, h2, h3, h4, h5, h6, button, label, td, th, blockquote) {
  color: #000 !important;
}

html.a11y-theme-dark {
  background: #000 !important;
}
html.a11y-theme-dark :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) {
  background: #000 !important;
  color: #fff !important;
}
html.a11y-theme-dark :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) :is(p, li, span, a, div, h1, h2, h3, h4, h5, h6, button, label, td, th, blockquote) {
  color: #fff !important;
}

html.a11y-hide-images :is(main, header:not(.a11y-widget__header), footer:not(.a11y-widget__footer)) :is(img, picture, video) {
  visibility: hidden !important;
}

html.a11y-stop-animations *,
html.a11y-stop-animations *::before,
html.a11y-stop-animations *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

html.a11y-cursor-black,
html.a11y-cursor-black * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l0 20 5-6 3 7 2.6-1-3-7 7 0z' fill='%23000' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") 2 2, auto !important;
}

html.a11y-cursor-white,
html.a11y-cursor-white * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l0 20 5-6 3 7 2.6-1-3-7 7 0z' fill='%23fff' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") 2 2, auto !important;
}

.a11y-reading-mask {
  --a11y-mask-band: 52px;
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

.a11y-reading-mask__panel {
  position: fixed;
  left: 0;
  right: 0;
  background: var(--a11y-mask);
}

.a11y-reading-mask__panel--top {
  top: 0;
  height: max(0px, var(--a11y-mask-y, 50vh) - var(--a11y-mask-band));
}

.a11y-reading-mask__panel--bottom {
  bottom: 0;
  height: max(0px, 100vh - var(--a11y-mask-y, 50vh) - var(--a11y-mask-band));
}

.a11y-reading-guide {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--a11y-guide-y, 50vh);
  height: 6px;
  margin-top: -3px;
  background: var(--a11y-accent);
  box-shadow: 0 1px 4px var(--a11y-shadow);
  z-index: 2001;
  pointer-events: none;
}

.a11y-magnifier {
  position: fixed;
  z-index: 2002;
  pointer-events: none;
  max-width: 42rem;
  padding: 1.2rem 1.6rem;
  border: 2px solid var(--a11y-accent);
  border-radius: 1rem;
  background: var(--a11y-surface-raised);
  color: var(--a11y-ink);
  box-shadow: 0 10px 34px var(--a11y-shadow);
  font-family: var(--a11y-readable-font);
  font-size: calc(2.6 * var(--type, 1rem));
  line-height: 1.3;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--a11y-motion-fast, 0.08s) var(--a11y-ease, ease);
}

.a11y-read-mode {
  position: fixed;
  inset: 0;
  z-index: 2003;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--a11y-surface);
  color: var(--a11y-ink);
}

.a11y-read-mode__bar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  padding: 1.4rem 2rem;
  background: var(--a11y-surface);
  border-bottom: 1.5px solid var(--a11y-border);
}

.a11y-read-mode__close {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.6rem;
  border: 1.5px solid var(--a11y-border);
  border-radius: 999px;
  background: var(--a11y-surface-raised);
  color: var(--a11y-ink);
  font-family: var(--a11y-readable-font);
  font-size: calc(1.4 * var(--type, 1rem));
  font-weight: 600;
  cursor: pointer;
}
.a11y-read-mode__close:focus-visible {
  outline: 2px solid var(--a11y-focus-ring);
  outline-offset: 2px;
}

.a11y-read-mode__article {
  max-width: 68ch;
  margin: 0 auto;
  padding: 4rem 2.4rem 8rem;
  font-family: var(--a11y-readable-font);
  font-size: calc(2.2 * var(--type, 1rem));
  line-height: 1.7;
}
.a11y-read-mode__article :is(h1, h2, h3, h4, h5, h6) {
  line-height: 1.2;
  margin: 2.8rem 0 1.2rem;
}
.a11y-read-mode__article h1 {
  font-size: calc(3.6 * var(--type, 1rem));
}
.a11y-read-mode__article h2 {
  font-size: calc(2.9 * var(--type, 1rem));
}
.a11y-read-mode__article h3 {
  font-size: calc(2.5 * var(--type, 1rem));
}
.a11y-read-mode__article h4, .a11y-read-mode__article h5, .a11y-read-mode__article h6 {
  font-size: calc(2.2 * var(--type, 1rem));
}
.a11y-read-mode__article p {
  margin: 0 0 1.6rem;
}
