:root {
    --ekfd-a11y-focus: #0b6b8a;
    --ekfd-a11y-focus-ring: #f6a91b;
}

.ekfd-skip-link {
    position: fixed;
    z-index: 2147483647;
    top: 10px;
    left: 10px;
    padding: 12px 16px;
    border: 2px solid #fff;
    border-radius: 10px;
    background: #00365e;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 120ms ease;
}

.ekfd-skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--ekfd-a11y-focus-ring) !important;
    outline-offset: 3px !important;
}

.ekfd-a11y-launcher {
    position: fixed;
    z-index: 2147483645;
    right: 18px;
    bottom: 18px;
    min-width: 48px;
    min-height: 48px;
    padding: 10px 14px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    background: #00365e;
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 54, 94, 0.24);
    font: 800 14px/1.2 system-ui, sans-serif;
    cursor: pointer;
}

.ekfd-a11y-launcher[aria-expanded="true"] {
    visibility: hidden;
}

.ekfd-a11y-panel {
    position: fixed;
    z-index: 2147483646;
    right: 18px;
    bottom: 78px;
    width: min(360px, calc(100vw - 28px));
    max-height: min(680px, calc(100vh - 110px));
    overflow: auto;
    padding: 20px;
    border: 1px solid #b9c9d5;
    border-radius: 18px;
    background: #fffdf9;
    color: #2f3a45;
    box-shadow: 0 22px 60px rgba(35, 78, 112, 0.22);
    font: 400 16px/1.45 system-ui, sans-serif;
}

.ekfd-a11y-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ekfd-a11y-close {
    flex: none;
    width: 42px;
    height: 42px;
    border: 1px solid #c5d2dc;
    border-radius: 50%;
    background: #fff;
    color: #234e70;
    font: 800 22px/1 system-ui, sans-serif;
    cursor: pointer;
}

.ekfd-a11y-panel[hidden] {
    display: none !important;
}

.ekfd-a11y-heading {
    margin: 0;
    color: #234e70;
    font-size: 21px;
    line-height: 1.25;
}

.ekfd-a11y-intro {
    margin: 7px 0 18px;
    color: #59636c;
    font-size: 14px;
}

.ekfd-a11y-group {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.ekfd-a11y-group legend {
    margin-bottom: 8px;
    color: #234e70;
    font-size: 14px;
    font-weight: 800;
}

.ekfd-a11y-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.ekfd-a11y-choice,
.ekfd-a11y-toggle,
.ekfd-a11y-reset {
    min-height: 44px;
    border: 1px solid #c5d2dc;
    border-radius: 10px;
    background: #fff;
    color: #2f3a45;
    font: 700 13px/1.25 system-ui, sans-serif;
    cursor: pointer;
}

.ekfd-a11y-choice[aria-pressed="true"],
.ekfd-a11y-toggle[aria-pressed="true"] {
    border-color: #234e70;
    background: #234e70;
    color: #fff;
}

.ekfd-a11y-toggle {
    width: 100%;
    margin-bottom: 7px;
    padding: 10px 12px;
    text-align: left;
}

.ekfd-a11y-reset {
    width: 100%;
    margin-top: 3px;
    background: #f7f3ee;
}

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

html[data-ekfd-text="large"] {
    font-size: 112.5%;
}

html[data-ekfd-text="xlarge"] {
    font-size: 125%;
}

html[data-ekfd-text="large"] body :where(p, li, label, input, select, textarea, button, a, summary, td, th),
html[data-ekfd-text="large"] body {
    font-size: max(1em, 1rem);
}

html[data-ekfd-text="xlarge"] body :where(p, li, label, input, select, textarea, button, a, summary, td, th),
html[data-ekfd-text="xlarge"] body {
    font-size: max(1em, 1rem);
}

html[data-ekfd-contrast="high"] body {
    color: #17202a !important;
    background-color: #fff !important;
}

html[data-ekfd-contrast="high"] :where(p, li, label, small, td, th) {
    color: #17202a;
}

html[data-ekfd-contrast="high"] :where(input, select, textarea, button, a, article, section) {
    border-color: #52606d !important;
}

html[data-ekfd-spacing="comfortable"] body {
    line-height: 1.7 !important;
}

html[data-ekfd-spacing="comfortable"] :where(p, li) {
    line-height: 1.75 !important;
}

html[data-ekfd-spacing="comfortable"] :where(button, input, select, textarea) {
    min-height: 48px;
}

html[data-ekfd-motion="reduced"] *,
html[data-ekfd-motion="reduced"] *::before,
html[data-ekfd-motion="reduced"] *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

html[data-ekfd-focus="on"] body {
    background-image: none !important;
}

html[data-ekfd-focus="on"] :where(.guide, .kai-tip, footer, .status, .board-meta, .board-color-strip) {
    display: none !important;
}

html[data-ekfd-focus="on"] :where(.actions, .board-actions) > :not(:first-child):not(:last-child) {
    display: none !important;
}

html[data-ekfd-focus="on"] :where(article, section, .card, .board-card, .template-card, .modal) {
    box-shadow: none !important;
}

html[data-ekfd-focus="on"] :where(.workspace-intro, .new-start-zone, .hero) {
    background-image: none !important;
}

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

@media (max-width: 520px) {
    .ekfd-a11y-launcher {
        right: 12px;
        bottom: 12px;
    }

    .ekfd-a11y-panel {
        right: 14px;
        bottom: 72px;
    }
}

@media print {
    .ekfd-skip-link,
    .ekfd-a11y-launcher,
    .ekfd-a11y-panel {
        display: none !important;
    }
}
