/* Widoczność AI — accessibility: skip link, visible focus fallback, visitor panel and its modes. */
.wai-skip-link { position: absolute; left: 12px; top: -200px; z-index: 100001; padding: 12px 18px; border-radius: 8px; background: #111; color: #fff !important; font: 700 16px/1.3 system-ui, sans-serif; text-decoration: none; }
.wai-skip-link:focus { top: 12px; outline: 3px solid #ffbf47; outline-offset: 2px; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

.wai-a11y { position: fixed; left: 16px; bottom: calc(16px + var(--wai-a11y-lift, 0px) + env(safe-area-inset-bottom, 0px)); transition: bottom .2s ease; z-index: 99990; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #111; }
.wai-a11y-toggle { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #1b3a8c; color: #fff; cursor: pointer; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .45); }
.wai-a11y-toggle:hover { background: #142d6e; }
.wai-a11y-toggle:focus-visible, .wai-a11y-panel button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }
.wai-a11y-panel { position: absolute; left: 0; bottom: 60px; width: min(300px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow: auto; padding: 16px; border: 1px solid #c9ccd4; border-radius: 14px; background: #fff; color: #111; box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .4); }
.wai-a11y-panel[hidden] { display: none; }
.wai-a11y-title { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.wai-a11y-label { margin: 0 0 6px; font-size: 13px; color: #444; }
.wai-a11y-size { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.wai-a11y-panel button { font: inherit; color: #111; cursor: pointer; }
.wai-a11y-size button { min-height: 44px; border: 1px solid #9aa0ad; border-radius: 8px; background: #fff; font-weight: 700; }
.wai-a11y-size button[aria-pressed="true"] { border-color: #1b3a8c; background: #1b3a8c; color: #fff; }
.wai-a11y-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; margin: 0 0 6px; padding: 8px 12px; border: 1px solid #9aa0ad; border-radius: 8px; background: #fff; text-align: left; }
.wai-a11y-switch { position: relative; flex: none; width: 36px; height: 20px; border-radius: 10px; background: #767c88; }
.wai-a11y-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.wai-a11y-option[aria-pressed="true"] { border-color: #1b3a8c; }
.wai-a11y-option[aria-pressed="true"] .wai-a11y-switch { background: #1b3a8c; }
.wai-a11y-option[aria-pressed="true"] .wai-a11y-switch::after { transform: translateX(16px); }
.wai-a11y-reset { width: 100%; min-height: 44px; margin-top: 6px; border: 0; border-radius: 8px; background: #eef0f4; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .wai-a11y { transition: none; } }
@media print { .wai-a11y, .wai-skip-link { display: none !important; } }

/* Text size: the content scales like browser zoom (themes in px keep their proportions); the fixed header stays as it is. */
html.wai-a11y-text-1 :is(main, [role="main"], body > footer, .site-footer) { zoom: 1.15; }
html.wai-a11y-text-2 :is(main, [role="main"], body > footer, .site-footer) { zoom: 1.3; }

/* High contrast: white text on black, yellow links. Images, video, maps and the panel keep their own colours. */
html.wai-a11y-contrast :where(body, body *:not(img, picture, video, iframe, svg, svg *, canvas, .leaflet-container, .leaflet-container *, .wai-a11y, .wai-a11y *)) {
    background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important; text-shadow: none !important;
}
html.wai-a11y-contrast body a:not(.wai-a11y *), html.wai-a11y-contrast body a:not(.wai-a11y *) * { color: #ff0 !important; text-decoration: underline !important; }
html.wai-a11y-contrast body :focus-visible { outline: 3px solid #ff0 !important; outline-offset: 3px !important; }
html.wai-a11y-contrast body :is(input, select, textarea, button):not(.wai-a11y *) { border: 2px solid #fff !important; }
html.wai-a11y-contrast ::placeholder { color: #ddd !important; opacity: 1; }

html.wai-a11y-links body a:not(.wai-a11y *) { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* Text spacing from WCAG 1.4.12. */
html.wai-a11y-spacing body *:not(.wai-a11y):not(.wai-a11y *) { line-height: 1.5 !important; letter-spacing: .12em !important; word-spacing: .16em !important; }
html.wai-a11y-spacing body p:not(.wai-a11y *) { margin-bottom: 2em !important; }

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