/* LBT Accessibility Tools */
.lbt-a11y-skip-link {
    position: fixed;
    top: -120px;
    left: 12px;
    z-index: 100000;
    background: #111;
    color: #fff;
    padding: 12px 16px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: 700;
}

.lbt-a11y-skip-link:focus {
    top: 0;
    outline: 3px solid #f8da02;
}

.lbt-a11y {
    position: fixed;
    font-family: inherit;
    z-index: var(--lbt-a11y-z-index, 99999);
}

.lbt-a11y-pos-right-middle {
    right: var(--lbt-a11y-offset-x, 12px);
    top: calc(50% + var(--lbt-a11y-offset-y, 0px));
    transform: translateY(-50%);
}

.lbt-a11y-pos-left-middle {
    left: var(--lbt-a11y-offset-x, 12px);
    top: calc(50% + var(--lbt-a11y-offset-y, 0px));
    transform: translateY(-50%);
}

.lbt-a11y-pos-right-bottom {
    right: var(--lbt-a11y-offset-x, 12px);
    bottom: calc(18px + var(--lbt-a11y-offset-y, 0px));
}

.lbt-a11y-pos-left-bottom {
    left: var(--lbt-a11y-offset-x, 12px);
    bottom: calc(18px + var(--lbt-a11y-offset-y, 0px));
}

.lbt-a11y-pos-right-top {
    right: var(--lbt-a11y-offset-x, 12px);
    top: calc(90px + var(--lbt-a11y-offset-y, 0px));
}

.lbt-a11y-pos-left-top {
    left: var(--lbt-a11y-offset-x, 12px);
    top: calc(90px + var(--lbt-a11y-offset-y, 0px));
}

.lbt-a11y-toggle {
    width: var(--lbt-a11y-button-size, 52px);
    height: var(--lbt-a11y-button-size, 52px);
    border-radius: 999px;
    border: 0;
    background: var(--lbt-a11y-button-color, #d61523);
    color: var(--lbt-a11y-button-text, #fff);
    font-size: calc(var(--lbt-a11y-button-size, 52px) * .46);
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,.24);
}

.lbt-a11y-toggle:focus,
.lbt-a11y-close:focus,
.lbt-a11y-controls button:focus {
    outline: 3px solid #f8da02;
    outline-offset: 2px;
}

.lbt-a11y-panel {
    position: absolute;
    top: 50%;
    width: min(var(--lbt-a11y-panel-width, 320px), calc(100vw - 92px));
    background: #fff;
    color: #111;
    border: 1px solid #ddd;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(0,0,0,.22);
    overflow: hidden;
}

.lbt-a11y-pos-right-middle .lbt-a11y-panel,
.lbt-a11y-pos-right-bottom .lbt-a11y-panel,
.lbt-a11y-pos-right-top .lbt-a11y-panel {
    right: calc(var(--lbt-a11y-button-size, 52px) + 12px);
    left: auto;
    transform: translateY(-50%);
}

.lbt-a11y-pos-left-middle .lbt-a11y-panel,
.lbt-a11y-pos-left-bottom .lbt-a11y-panel,
.lbt-a11y-pos-left-top .lbt-a11y-panel {
    left: calc(var(--lbt-a11y-button-size, 52px) + 12px);
    right: auto;
    transform: translateY(-50%);
}

.lbt-a11y-pos-right-bottom .lbt-a11y-panel,
.lbt-a11y-pos-left-bottom .lbt-a11y-panel {
    top: auto;
    bottom: 0;
    transform: none;
}

.lbt-a11y-pos-right-top .lbt-a11y-panel,
.lbt-a11y-pos-left-top .lbt-a11y-panel {
    top: 0;
    transform: none;
}

.lbt-a11y-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #111;
    color: #fff;
}

.lbt-a11y-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.lbt-a11y-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
}

.lbt-a11y-controls button {
    border: 1px solid #ddd;
    background: #f7f7f7;
    color: #111;
    border-radius: 8px;
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.lbt-a11y-controls button[aria-pressed="true"] {
    background: #d61523;
    color: #fff;
    border-color: #d61523;
}

.lbt-a11y-controls .lbt-a11y-reset {
    grid-column: 1 / -1;
    background: #222;
    color: #fff;
    border-color: #222;
}

html.lbt-a11y-font-1 body { font-size: 110% !important; }
html.lbt-a11y-font-2 body { font-size: 120% !important; }
html.lbt-a11y-font-3 body { font-size: 130% !important; }
html.lbt-a11y-font--1 body { font-size: 95% !important; }

html.lbt-a11y-readable body,
html.lbt-a11y-readable p,
html.lbt-a11y-readable li,
html.lbt-a11y-readable article,
html.lbt-a11y-readable .entry-content {
    line-height: 1.85 !important;
    letter-spacing: .01em;
}

html.lbt-a11y-contrast body,
html.lbt-a11y-contrast .site,
html.lbt-a11y-contrast main,
html.lbt-a11y-contrast article,
html.lbt-a11y-contrast header,
html.lbt-a11y-contrast footer,
html.lbt-a11y-contrast section,
html.lbt-a11y-contrast div:not(.lbt-a11y):not(.lbt-a11y-panel):not(.lbt-a11y-panel-head):not(.lbt-a11y-controls) {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #777 !important;
}

html.lbt-a11y-contrast a,
html.lbt-a11y-contrast h1,
html.lbt-a11y-contrast h2,
html.lbt-a11y-contrast h3,
html.lbt-a11y-contrast h4,
html.lbt-a11y-contrast h5,
html.lbt-a11y-contrast h6,
html.lbt-a11y-contrast p,
html.lbt-a11y-contrast span,
html.lbt-a11y-contrast li,
html.lbt-a11y-contrast time,
html.lbt-a11y-contrast small {
    color: #fff !important;
}

html.lbt-a11y-contrast a {
    color: #f8da02 !important;
    text-decoration: underline !important;
}

html.lbt-a11y-contrast img { opacity: .92; }
html.lbt-a11y-grayscale { filter: grayscale(100%); }
html.lbt-a11y-underline a { text-decoration: underline !important; text-underline-offset: 3px; }

html.lbt-a11y-motion *,
html.lbt-a11y-motion *::before,
html.lbt-a11y-motion *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}

body :focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #d61523 !important;
    outline-offset: 3px !important;
}

@media (max-width: 768px) {
    .lbt-a11y-toggle {
        width: min(var(--lbt-a11y-button-size, 52px), 52px);
        height: min(var(--lbt-a11y-button-size, 52px), 52px);
        font-size: 22px;
    }

    .lbt-a11y-panel {
        width: min(var(--lbt-a11y-panel-width, 300px), calc(100vw - 76px));
    }
}
