.kx-a11y-trigger {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9990;
    width: 52px;
    height: 52px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #112a6e 0%, #0a1c4a 100%);
    color: #ffffff;
    border: 2px solid #f0a818;
    box-shadow: 0 8px 24px rgba(10, 28, 74, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kx-a11y-trigger:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 28px rgba(10, 28, 74, 0.45);
}
.kx-a11y-trigger:focus-visible {
    outline: 3px solid #f0a818;
    outline-offset: 3px;
}

.kx-a11y-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9994;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.kx-a11y-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.kx-a11y-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9995;
    width: min(360px, 92vw);
    background: #f8fafc;
    color: #0f172a;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: system-ui, -apple-system, sans-serif;
}
.kx-a11y-panel.is-open {
    transform: translateX(0);
}

.kx-a11y-header {
    background: linear-gradient(135deg, #0a1c4a 0%, #112a6e 100%);
    color: #ffffff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #f0a818;
}
.kx-a11y-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.kx-a11y-header-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fcd05a;
}
.kx-a11y-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}
.kx-a11y-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: #cbd5e1;
}
.kx-a11y-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.kx-a11y-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.kx-a11y-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.kx-a11y-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.kx-a11y-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    min-height: 92px;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.kx-a11y-card:hover {
    border-color: #3566f0;
    transform: translateY(-1px);
}
.kx-a11y-card.is-active {
    background: #eef4ff;
    border-color: #1f4bd6;
    color: #0a1c4a;
    box-shadow: 0 0 0 2px rgba(31, 75, 214, 0.15);
}
.kx-a11y-card.is-active::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #1f4bd6;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.kx-a11y-icon {
    color: #112a6e;
    display: inline-flex;
}
.kx-a11y-label {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
}
.kx-a11y-steps {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}
.kx-a11y-steps i {
    display: block;
    width: 14px;
    height: 4px;
    border-radius: 9999px;
    background: #cbd5e1;
}
.kx-a11y-steps i.on {
    background: #1f4bd6;
}

.kx-a11y-footer {
    padding: 14px 16px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}
.kx-a11y-reset {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.kx-a11y-reset:hover {
    background: #e2e8f0;
}

.kx-a11y-reading-guide {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    height: 14px;
    background: rgba(240, 168, 24, 0.35);
    border-top: 2px solid #0a1c4a;
    border-bottom: 2px solid #0a1c4a;
    pointer-events: none;
    z-index: 9992;
    transform: translateY(-50%);
}
html.kx-a11y-reading-guide-on .kx-a11y-reading-guide {
    display: block;
}

/* Applied Accessibility Modes (scoped away from #kx-a11y-root where needed) */
html.kx-a11y-text-spacing body > *:not(#kx-a11y-root) {
    letter-spacing: 0.08em !important;
    word-spacing: 0.16em !important;
}
html.kx-a11y-lh-1 body > *:not(#kx-a11y-root) { line-height: 1.65 !important; }
html.kx-a11y-lh-2 body > *:not(#kx-a11y-root) { line-height: 1.95 !important; }
html.kx-a11y-lh-3 body > *:not(#kx-a11y-root) { line-height: 2.25 !important; }

html.kx-a11y-grayscale body > *:not(#kx-a11y-root) {
    filter: grayscale(100%) !important;
}
html.kx-a11y-invert body > *:not(#kx-a11y-root) {
    filter: invert(1) hue-rotate(180deg) !important;
}
html.kx-a11y-invert.kx-a11y-grayscale body > *:not(#kx-a11y-root) {
    filter: invert(1) hue-rotate(180deg) grayscale(100%) !important;
}

html.kx-a11y-contrast body > *:not(#kx-a11y-root),
html.kx-a11y-contrast body > *:not(#kx-a11y-root) * {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}
html.kx-a11y-contrast body > *:not(#kx-a11y-root) a {
    color: #00ffff !important;
    text-decoration: underline !important;
}

html.kx-a11y-links body > *:not(#kx-a11y-root) a {
    outline: 2px solid #f0a818 !important;
    background-color: #fef1c7 !important;
    color: #0a1c4a !important;
    text-decoration: underline !important;
}

html.kx-a11y-hide-images body > *:not(#kx-a11y-root) img,
html.kx-a11y-hide-images body > *:not(#kx-a11y-root) picture {
    opacity: 0 !important;
    visibility: hidden !important;
}

html.kx-a11y-pause body > *:not(#kx-a11y-root),
html.kx-a11y-pause body > *:not(#kx-a11y-root) * {
    animation-play-state: paused !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
}

html.kx-a11y-cursor,
html.kx-a11y-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 10-7 2-3 7-5-19z' fill='%230a1c4a' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E") 4 2, auto !important;
}
