/* Ansicht und Barrierefreiheit (Knopf in der Kopfzeile, /ansicht.js). Funktion wie ai-risk.ch, Farben und Schriften aus brand.css. */
header.top > nav { margin-left: auto; }
.a11y { position: relative; }
.a11y[hidden], .a11y-panel[hidden] { display: none; }
.a11y-btn { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3); font: 500 .8rem/1 var(--font-mono); color: var(--ink-dim); background: transparent; border: 1px solid var(--line); border-radius: var(--r, var(--radius-md)); cursor: pointer; }
.a11y-btn:hover, .a11y-btn[aria-expanded="true"] { color: var(--brand); border-color: var(--brand); }
.a11y-btn:focus-visible, .a11y-panel button:focus-visible, .a11y-row input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.a11y-panel { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 12; width: min(20rem, calc(100vw - 2rem)); display: grid; gap: .8rem; padding: var(--space-4); background: var(--raise); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r, var(--radius-md)); box-shadow: var(--shade); font-family: var(--font-body); }
.a11y-h { margin: 0; font: 700 1rem/1.3 var(--font-display); }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .92rem; cursor: pointer; }
.a11y-row input[type="checkbox"] { width: 1.35rem; height: 1.35rem; flex: none; margin: 0; accent-color: var(--brand); cursor: pointer; }
.a11y-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); overflow: hidden; flex: none; }
.a11y-seg button { min-width: 2.5rem; height: 2.4rem; border: 0; background: var(--raise); color: var(--ink); font-family: var(--font-display); font-weight: 700; cursor: pointer; }
.a11y-seg button + button { border-left: 1px solid var(--line); }
.a11y-seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.a11y-s0 { font-size: .9rem; } .a11y-s1 { font-size: 1.1rem; } .a11y-s2 { font-size: 1.3rem; }
.a11y-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.a11y-act { min-height: 2.4rem; padding: .45rem .9rem; font: 600 .9rem/1.2 var(--font-body); color: var(--brand-ink); background: var(--brand); border: 1px solid var(--brand); border-radius: var(--radius-sm, 8px); cursor: pointer; }
.a11y-act-ghost { color: var(--ink); background: transparent; border-color: var(--line); }
@media (max-width: 40rem) {
  .a11y-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .a11y-panel { position: fixed; left: 1rem; right: 1rem; top: 4.25rem; width: auto; max-height: calc(100vh - 5.5rem); overflow: auto; }
}

/* Einstellungen (data-Attribute auf <html>) */
:root[data-size="1"] { font-size: 112.5%; }
:root[data-size="2"] { font-size: 125%; }
:root[data-motion="reduce"] { scroll-behavior: auto; }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root[data-read="1"] .ab { line-height: 1.85; letter-spacing: .015em; word-spacing: .06em; }
:root[data-read="1"] p, :root[data-read="1"] li, :root[data-read="1"] dd { max-width: 68ch; }
:root[data-links="1"] a { text-decoration: underline !important; text-decoration-thickness: 2px !important; }
:root[data-contrast="high"], :root[data-contrast="high"]:not([data-theme="light"]), :root[data-contrast="high"] .ab {
  color-scheme: light;
  --ground: #ffffff; --raise: #ffffff; --band: #ffffff; --ink: #000000; --ink-dim: #000000; --ink-faint: #000000;
  --line: #000000; --brand: #5a1a30; --brand-ink: #ffffff; --brand-soft: #ffffff; --focus: #000000; --mid: #000000;
  --accent: #5a1a30; --accent-ink: #ffffff; --shade: none;
}
:root[data-contrast="high"] :focus-visible { outline: 3px solid #000000 !important; outline-offset: 3px; box-shadow: 0 0 0 6px #ffffff; }
