/* Only a little spacing; headings, text and links keep the design's styles */
.accessibility-statement h2 {
    margin-top: 2rem;
}

.accessibility-statement h2:first-child {
    margin-top: 0;
}

.accessibility-statement-contact {
    padding-left: 0;
    list-style: none;
}

.accessibility-statement-contact li + li {
    margin-top: 0.25rem;
}

/* The tools: a round button in a corner and the panel above it. They bring their own look, which
   the design's styles for buttons and headings do not reach. */
.a11y-tools {
    position: relative;
    font: 15px/1.4 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1d1d1f;
    text-align: left;
}

.a11y-tools[hidden],
.a11y-tools [hidden] {
    display: none !important;
}

/* The block itself sits in the corner, above the design's layers and below the admin's, so in
   the admin its frame and options are where the button is */
.block:has(> .a11y-tools) {
    position: fixed !important;
    top: auto !important;
    right: 20px !important;
    bottom: 20px !important;
    left: auto !important;
    z-index: 9999990 !important;
    display: block !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.block:has(> .a11y-tools-left) {
    right: auto !important;
    left: 20px !important;
}

.a11y-tools button {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
}

.a11y-tools button:focus-visible,
.a11y-tools a:focus-visible {
    outline: 3px solid #1a5fb4;
    outline-offset: 2px;
}

.a11y-tools svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.a11y-tools .a11y-tools-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #1d1d1f;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.a11y-tools .a11y-tools-toggle svg {
    width: 30px;
    height: 30px;
}

.a11y-tools-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.a11y-tools-panel {
    position: absolute;
    bottom: 64px;
    width: 360px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    border-radius: 12px;
    background: #f2f2f4;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.a11y-tools-right .a11y-tools-panel {
    right: 0;
}

.a11y-tools-left .a11y-tools-panel {
    left: 0;
}

.a11y-tools-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 12px 16px;
    background: #1d1d1f;
    color: #ffffff;
}

.a11y-tools .a11y-tools-header h2 {
    margin: 0;
    padding: 0;
    border: 0;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
    text-transform: none;
    letter-spacing: 0;
}

.a11y-tools .a11y-tools-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.a11y-tools-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
}

.a11y-tools .a11y-tools-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 92px;
    padding: 10px 6px;
    border: 2px solid #dcdce0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
    hyphens: auto;
    overflow-wrap: anywhere;
}

.a11y-tools .a11y-tools-option[aria-pressed="true"],
.a11y-tools .a11y-tools-stepper.a11y-tools-active {
    border-color: #1d1d1f;
    background: #1d1d1f;
    color: #ffffff;
}

.a11y-tools-state {
    font-size: 12px;
    opacity: 0.85;
}

.a11y-tools .a11y-tools-stepper {
    grid-column: span 3;
    flex-direction: row;
    justify-content: flex-start;
    min-height: 0;
    padding: 10px 12px;
    text-align: left;
}

.a11y-tools-stepper .a11y-tools-label {
    flex: 1;
    font-size: 14px;
}

.a11y-tools-steps {
    display: flex;
    align-items: center;
    gap: 8px;
}

.a11y-tools .a11y-tools-steps button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1d1d1f;
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
}

.a11y-tools-stepper.a11y-tools-active .a11y-tools-steps button {
    background: #ffffff;
    color: #1d1d1f;
}

.a11y-tools .a11y-tools-steps button:disabled {
    opacity: 0.35;
    cursor: default;
}

.a11y-tools-steps output {
    min-width: 48px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.a11y-tools-footer {
    padding: 0 12px 14px;
    font-size: 13px;
}

.a11y-tools .a11y-tools-reset {
    display: block;
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    background: #1d1d1f;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
}

.a11y-tools-footer a {
    display: inline-block;
    margin-top: 12px;
    color: #1a5fb4;
    text-decoration: underline;
}

.a11y-tools-footer p {
    margin: 8px 0 0;
    color: #4a4a50;
}

@media (max-width: 400px) {
    .a11y-tools-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .a11y-tools .a11y-tools-stepper {
        grid-column: span 2;
    }
}

/* What the settings do. The tools and the admin's own interface keep their look. */
html.a11y-text-spacing body *:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *) {
    line-height: 1.5 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

html.a11y-text-spacing body p:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *) {
    margin-bottom: 2em !important;
}

/* Icon fonts keep their font */
html.a11y-readable-font body *:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *, i, [class*="icon"], [class*="fa-"], [class^="fa"]) {
    font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
}

html.a11y-align-left body *:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *) {
    text-align: left !important;
}

html.a11y-highlight-links body a:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *) {
    outline: 2px solid currentColor !important;
    outline-offset: 2px;
    background-color: #fff3a0 !important;
    color: #000000 !important;
    text-decoration: underline !important;
}

html.a11y-highlight-headings body :is(h1, h2, h3, h4, h5, h6):not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *) {
    outline: 3px solid #1a5fb4 !important;
    outline-offset: 4px;
}

/* Contrast: text and borders in one colour; a background only where the design has one
   (marked by the script), so transparent layers stay transparent and pictures stay visible */
html.a11y-contrast-dark body,
html.a11y-contrast-dark body [data-a11y-bg] {
    background-color: #000000 !important;
}

html.a11y-contrast-dark body *:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *) {
    color: #ffffff !important;
    border-color: #ffffff !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html.a11y-contrast-dark body a:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *),
html.a11y-contrast-dark body a:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *) * {
    color: #ffeb3b !important;
}

html.a11y-contrast-light body,
html.a11y-contrast-light body [data-a11y-bg] {
    background-color: #ffffff !important;
}

html.a11y-contrast-light body *:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *) {
    color: #000000 !important;
    border-color: #000000 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html.a11y-contrast-light body a:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *),
html.a11y-contrast-light body a:not(.a11y-tools, .a11y-tools *, #toolbar-wrapper, #toolbar-wrapper *, #admin-popup *, #admin-message *, [id^="admin-sidebar"] *, .block-button, .block-button *, .block-options, .block-options *, .block-frame, .sf-toolbar *) * {
    color: #0000cc !important;
}

/* Pictures, videos and embeds keep their colours with more contrast; on black they are also a
   little darker, so they do not glare */
html.a11y-contrast-dark body :is(img, video, canvas, iframe, [data-a11y-picture]):not(.a11y-tools *) {
    filter: brightness(0.85) contrast(1.4) !important;
}

html.a11y-contrast-light body :is(img, video, canvas, iframe, [data-a11y-picture]):not(.a11y-tools *) {
    filter: contrast(1.4) !important;
}

/* On the root, a filter keeps fixed elements like the tools in place */
html.a11y-grayscale {
    filter: grayscale(1);
}

html.a11y-stop-motion *,
html.a11y-stop-motion *::before,
html.a11y-stop-motion *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

html.a11y-big-cursor,
html.a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2.5l13.5 8-6 1.6 3.3 6.9-2.9 1.4-3.2-6.9L5 18z' fill='%23000' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 10 5, auto !important;
}

.a11y-reading-guide-band {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9999989;
    height: 2.4em;
    margin-top: -1.2em;
    border-top: 3px solid #1d1d1f;
    border-bottom: 3px solid #1d1d1f;
    background: rgba(255, 235, 59, 0.18);
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

/* While it speaks, the round button shows it, so it can be stopped from there */
.a11y-tools.a11y-tools-reading .a11y-tools-toggle {
    box-shadow: 0 0 0 4px #ffeb3b, 0 2px 10px rgba(0, 0, 0, 0.35);
}
