html.a11y {
    --a11y-font-scale: 1;
    --a11y-zoom: 1;
    --a11y-outline-color: #ff0;
    --a11y-outline-size: 4px;
    --a11y-highlight-bg: #ff0;
    --a11y-highlight-text: #000;
    --a11y-link-bg: #000;
    --a11y-link-text: #fff;
}

html.a11y {
    font-size: calc(1em * var(--a11y-font-scale)) !important;
}

html.a11y .site-wrapper {
    zoom: var(--a11y-zoom);
}

.a11y-toolbar {
    filter: none !important;
}

html.a11y-monochrome .site-wrapper {
    filter: grayscale(100%) !important;
}

html.a11y-sepia .site-wrapper {
    filter: sepia(100%) !important;
}

html.a11y-invert .site-wrapper {
    filter: invert(100%) hue-rotate(180deg) !important;
}

html.a11y-highcontrast body {
    background: #000 !important;
    color: #fff !important;
}

html.a11y-highcontrast a {
    color: #0ff !important;
}

html.a11y-blackyellow body {
    background: #000 !important;
    color: #ff0 !important;
}

html.a11y-blackyellow a {
    color: #ff0 !important;
}

html.a11y-stop-animations body *,
html.a11y-stop-animations body *::before,
html.a11y-stop-animations body *::after {
    animation: none !important;
    transition: none !important;
}

html.a11y-highlight-links a {
    outline: 3px solid var(--a11y-outline-color) !important;
    background: var(--a11y-link-bg) !important;
    color: var(--a11y-link-text) !important;
    text-decoration: underline !important;
}

html.a11y-highlight-titles h1,
html.a11y-highlight-titles h2,
html.a11y-highlight-titles h3,
html.a11y-highlight-titles h4,
html.a11y-highlight-titles h5,
html.a11y-highlight-titles h6 {
    background: var(--a11y-highlight-bg) !important;
    color: var(--a11y-highlight-text) !important;
    padding: 4px !important;
}

html.a11y-readable-font body {
    font-family: Arial, Helvetica, sans-serif !important;
}

html.a11y-keyboard-nav *:focus {
    outline: var(--a11y-outline-size) solid var(--a11y-outline-color) !important;
    outline-offset: 3px !important;
}

html.a11y-cursor-white {
    cursor: url('/assets/cursor-white.png'), auto !important;
}

html.a11y-cursor-black {
    cursor: url('/assets/cursor-black.png'), auto !important;
}

.a11y-tooltip {
    position: absolute;
    background: #000;
    color: #fff;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 4px;
    z-index: 99999;
    pointer-events: none;
    white-space: nowrap;
}

.a11y-tooltip.persistent {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 4px;
    pointer-events: none;
    text-align: center;
    box-sizing: border-box;
}

html.a11y body {
    transition:
        font-size 0.2s ease,
        zoom 0.2s ease;
}

.a11y-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    padding: 10px 0;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.a11y-toolbar:not(.a11y-toolbar--open) {
    transform: translateY(100%);
}

.a11y-toolbar__container {
    display: grid;
    gap: 10px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    grid-template-columns: repeat(10, 1fr);
}

.a11y-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-width: 90px;
    padding: 10px 12px;

    background: #222;
    border: 1px solid #333;
    border-radius: 8px;

    color: #fff;
    font-size: 12px;
    cursor: pointer;

    transition: all 0.2s ease;
}

.a11y-btn i {
    font-size: 18px;
}

.a11y-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.a11y-btn:active {
    transform: translateY(0);
}

.a11y-btn.active {
    background: #0066ff;
    border-color: #0066ff;
}

.a11y-floating-btn {
    position: fixed;
    bottom: 50px;
    left: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #3aa6ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition:
        transform 0.25s ease,
        background 0.25s ease;
    z-index: 20;
}

.a11y-floating-btn span {
    border-radius: 3px;
    padding: 2px 5px;
    background: #fff;
    position: absolute;
    top: 40px;
    left: 40px;
    font-size: 0.65rem;
    color: #111;
    border: 1px solid #ccc;
}

.a11y-floating-btn:hover {
    transform: scale(1.05);
    background: #1f8fff;
}

.a11y-floating-btn:active {
    transform: scale(0.95);
}

@media (max-width: 1024px) {
    .a11y-toolbar__container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .a11y-toolbar__container {
        grid-template-columns: repeat(3, 1fr);
    }

    .a11y-floating-btn {
        left: 10px;
        bottom: 10px;
    }
}
