.a11y-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

:root {
    --a11y-font-scale: 1;
    --a11y-line-height: 1.5;
    --a11y-letter-spacing-em: 0;
    --a11y-word-spacing: 0;
    --a11y-max-width-ch: 0;
    --w-bg: #ffffff;
    --w-border: #e2e5ea;
    --w-text: #1a1d23;
    --w-text-muted: #6b7280;
    --w-accent: #2563eb;
    --w-accent-light: #dbeafe;
    --w-btn-bg: #f1f3f6;
    --w-btn-hover: #e2e5ea;
    --w-pressed-bg: #dbeafe;
    --w-pressed-border: #2563eb;
    --w-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    --w-radius: 12px;
    --w-focus-ring: 0 0 0 3px rgba(37,99,235,0.4);
    --a11y-trigger-bottom: 108px;
    --a11y-menu-bottom: 188px;
}

#a11y-widget-container {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 100010;
    background: transparent;
}

#a11y-widget-container > * {
    pointer-events: auto;
}

#a11y-trigger {
    position: fixed;
    bottom: var(--a11y-trigger-bottom);
    right: 24px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #e3a51a !important;
    border: 3px solid #1a1a1a !important;
    cursor: pointer;
    z-index: 100010;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    padding: 0;
    visibility: visible !important;
    opacity: 1 !important;
    color: #1a1a1a !important;
    -webkit-appearance: none;
    appearance: none;
}
#a11y-trigger .a11y-trigger-symbol {
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    display: block;
    font-style: normal;
    letter-spacing: -0.08em;
}
#a11y-trigger:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}
#a11y-trigger:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}

#a11y-menu {
    position: fixed;
    bottom: var(--a11y-menu-bottom);
    right: 24px;
    width: 320px;
    max-height: min(72vh, 520px);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    z-index: 100011;
    box-shadow: var(--w-shadow);
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    overflow: hidden;
}

#a11y-menu[hidden] {
    display: none !important;
}

.a11y-hint {
    margin: 0 0 4px 0;
    font-size: 11px;
    line-height: 1.35;
    color: var(--w-text-muted);
}

.a11y-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--w-border);
    flex-shrink: 0;
}
.a11y-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--w-accent);
}
.a11y-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--w-text);
    letter-spacing: -0.01em;
}

#a11y-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--w-btn-bg);
    border: 1px solid var(--w-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--w-text-muted);
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
#a11y-close:hover { background: var(--w-btn-hover); color: var(--w-text); }
#a11y-close:focus-visible { outline: none; box-shadow: var(--w-focus-ring); }
#a11y-close svg { pointer-events: none; }

.a11y-body {
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--w-border) transparent;
}

.a11y-section-title {
    margin: 0 0 8px 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--w-text-muted);
}

.a11y-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.a11y-btn-cell {
    display: flex;
    align-items: stretch;
    min-width: 0;
    background: var(--w-btn-bg);
    border: 1px solid var(--w-border);
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.15s, border-color 0.15s;
}
.a11y-btn-cell:hover { background: var(--w-btn-hover); }
.a11y-btn-cell:has(.a11y-btn-action[aria-pressed="true"]) {
    background: var(--w-pressed-bg);
    border-color: var(--w-pressed-border);
}
.a11y-btn-cell .a11y-btn-action {
    flex: 1;
    min-width: 0;
    padding: 9px 6px 9px 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--w-text);
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
    line-height: 1.2;
}
.a11y-btn-cell:has(.a11y-btn-action[aria-pressed="true"]) .a11y-btn-action {
    color: var(--w-accent);
    font-weight: 600;
}
.a11y-btn-cell .a11y-btn-action:focus-visible {
    outline: none;
    box-shadow: var(--w-focus-ring);
}
.a11y-btn-cell .tooltip-layoutinstinkt-de-trigger {
    flex-shrink: 0;
    width: 24px;
    padding: 0;
    margin: 0;
    border: none;
    border-left: 1px solid var(--w-border);
    border-radius: 0;
    background: transparent;
    color: var(--w-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.a11y-btn-cell .tooltip-layoutinstinkt-de-trigger:hover,
.a11y-btn-cell .tooltip-layoutinstinkt-de-trigger[aria-expanded="true"] {
    color: var(--w-accent);
    background: rgba(37, 99, 235, 0.08);
}
.a11y-btn-cell .tooltip-layoutinstinkt-de-trigger:focus-visible {
    outline: none;
    box-shadow: inset var(--w-focus-ring);
}
.a11y-info-icon {
    display: block;
    pointer-events: none;
}
.a11y-scale-label-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.a11y-scale-label-wrap .tooltip-layoutinstinkt-de-trigger {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--w-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.a11y-scale-label-wrap .tooltip-layoutinstinkt-de-trigger:hover,
.a11y-scale-label-wrap .tooltip-layoutinstinkt-de-trigger[aria-expanded="true"] {
    color: var(--w-accent);
    background: var(--w-accent-light);
}
.a11y-scale-label-wrap .tooltip-layoutinstinkt-de-trigger:focus-visible {
    outline: none;
    box-shadow: var(--w-focus-ring);
}
.a11y-reset-cell {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #fecaca;
}
.a11y-reset-cell .a11y-reset-btn {
    flex: 1;
    border: none;
    border-radius: 0;
}
.a11y-reset-cell .a11y-reset-tip {
    width: 32px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-left: 1px solid #fecaca;
    border-radius: 0;
    background: #fff1f1;
    color: #b91c1c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: background 0.15s, opacity 0.15s;
}
.a11y-reset-cell .a11y-reset-tip:hover,
.a11y-reset-cell .a11y-reset-tip[aria-expanded="true"] {
    background: #fee2e2;
    opacity: 1;
}
.a11y-reset-cell .a11y-reset-tip:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px rgba(185, 28, 28, 0.3);
}
.tooltip-layoutinstinkt-de {
    position: fixed;
    z-index: 100020;
    max-width: min(280px, calc(100vw - 16px));
    padding: 6px 10px;
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    color: #fff;
    background: #1a1d23;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tooltip-layoutinstinkt-de[hidden] {
    display: none !important;
}
.tooltip-layoutinstinkt-de::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
}
.tooltip-layoutinstinkt-de.is-below::after {
    top: -10px;
    border-bottom-color: #1a1d23;
}
.tooltip-layoutinstinkt-de.is-above::after {
    bottom: -10px;
    border-top-color: #1a1d23;
}
.a11y-icon {
    font-style: normal;
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1;
}

.a11y-icon-invert-wrap {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.a11y-icon-invert-disk {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-sizing: border-box;
    border: 1px solid rgba(15, 23, 42, 0.25);
    background: linear-gradient(to right, #111827 50%, #f3f4f6 50%);
}
.a11y-icon-invert-svg {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    color: var(--w-accent);
}

.a11y-scale-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.a11y-scale-label {
    font-size: 12px;
    color: var(--w-text);
    font-weight: 500;
    flex: 1;
}
.a11y-scale-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}
.a11y-scale-controls button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--w-btn-bg);
    border: 1px solid var(--w-border);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: var(--w-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    font-weight: 600;
}
.a11y-scale-controls button:hover { background: var(--w-btn-hover); }
.a11y-scale-controls button:focus-visible { outline: none; box-shadow: var(--w-focus-ring); }
.a11y-scale-value {
    min-width: 44px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--w-accent);
    background: var(--w-accent-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

.a11y-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--w-border);
    flex-shrink: 0;
}
.a11y-reset-btn {
    width: 100%;
    padding: 9px 8px;
    background: #fff1f1;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
}
.a11y-reset-btn:hover { background: #fee2e2; }
.a11y-reset-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(185,28,28,0.3); }

html.a11y-force-reduce-motion *,
html.a11y-force-reduce-motion *::before,
html.a11y-force-reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body.hl-links a {
    outline: 2px solid #2563eb !important;
    background: #dbeafe !important;
    color: #1e3a8a !important;
    padding: 0 2px;
    border-radius: 2px;
}

body.hl-headers h1,
body.hl-headers h2,
body.hl-headers h3,
body.hl-headers h4,
body.hl-headers h5,
body.hl-headers h6 {
    border-left: 4px solid #2563eb !important;
    padding-left: 10px !important;
    color: #1e3a8a !important;
    background: #eff6ff !important;
}

html.a11y-big-cursor,
html.a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M5 3l25 18-10 2 6 12-4 2-6-12-8 7z' fill='white' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 5 3, auto !important;
}

html.a11y-focus-guide *:focus,

html.a11y-focus-guide *:focus-visible {
    outline: 4px solid #ea580c !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 8px rgba(234, 88, 12, 0.35) !important;
}

#a11y-reading-guide {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    height: 2.5em;
    background: rgba(255,255,0,0.25);
    border-top: 2px solid rgba(200,150,0,0.5);
    border-bottom: 2px solid rgba(200,150,0,0.5);
    pointer-events: none;
    z-index: 100009;
    transition: top 0.05s;
}
html.a11y-reading-guide #a11y-reading-guide {
    display: block;
}

html[data-a11y-filter-active="invert"] #a11y-widget-container,
html[data-a11y-filter-active="invert"] #a11y-reading-guide,
html[data-a11y-filter-active="invert"] .scroll-top {
    filter: invert(1) hue-rotate(180deg);
}

html[data-a11y-filter-active="invert"] img,
html[data-a11y-filter-active="invert"] video,
html[data-a11y-filter-active="invert"] picture {
    filter: invert(1) hue-rotate(180deg);
}

body {
    letter-spacing: calc(var(--a11y-letter-spacing-em) * 1em);
    word-spacing: calc(var(--a11y-word-spacing) * 1em);
}

body,
body .section,
body .u-text,
body .u-align-left,
body .u-align-center,
body p,
body li {
    line-height: var(--a11y-line-height) !important;
}

html[data-a11y-font="readable"] body,
html[data-a11y-font="readable"] .u-body,
html[data-a11y-font="readable"] .section,
html[data-a11y-font="readable"] .u-text {
    font-family: Verdana, Tahoma, Geneva, sans-serif !important;
}

html[data-a11y-font="serif"] body,
html[data-a11y-font="serif"] .u-body,
html[data-a11y-font="serif"] .section,
html[data-a11y-font="serif"] .u-text {
    font-family: Georgia, 'Times New Roman', serif !important;
}

html[data-a11y-font="mono"] body,
html[data-a11y-font="mono"] .u-body,
html[data-a11y-font="mono"] .section,
html[data-a11y-font="mono"] .u-text {
    font-family: 'Courier New', Courier, monospace !important;
}

.a11y-font-preview-readable { font-family: Verdana, Tahoma, Geneva, sans-serif; }
.a11y-font-preview-serif { font-family: Georgia, serif; }
.a11y-font-preview-mono { font-family: 'Courier New', monospace; }

html.a11y-reading-max-w .u-header .u-menu-2 {
    display: none !important;
}
html.a11y-reading-max-w .u-header .u-menu-1 {
    display: block !important;
}
html.a11y-reading-max-w .u-header .u-menu-1.u-hidden-lg,
html.a11y-reading-max-w .u-header .u-menu-1.u-hidden-xl,
html.a11y-reading-max-w .u-header .u-menu-1.u-hidden-xxl {
    display: block !important;
}

@media (max-width: 400px) {
    :root {
        --a11y-trigger-bottom: 100px;
        --a11y-menu-bottom: 176px;
    }
    #a11y-menu {
        right: 8px;
        left: 8px;
        width: auto;
    }
    #a11y-trigger {
        right: 12px;
    }
}
