.fgy-accessibility {
    --fgy-a11y-accent: #7b2d8e;
    --fgy-a11y-ink: #171219;
    --fgy-a11y-paper: #fff;
    position: fixed;
    z-index: 100000;
    left: 1rem;
    bottom: 1rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.35;
    color: var(--fgy-a11y-ink);
}

.fgy-accessibility button,
.fgy-accessibility select {
    font: inherit;
}

.fgy-accessibility button:focus-visible,
.fgy-accessibility select:focus-visible,
html[data-fgy-links="true"] a:focus-visible {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 3px !important;
}

.fgy-accessibility svg {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
}

.fgy-a11y-launcher {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #000;
    border-radius: 0;
    background: #000;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
    cursor: pointer;
    font-weight: 700;
}

.fgy-a11y-launcher svg {
    width: 1.65rem;
    height: 1.65rem;
}

.fgy-a11y-launcher:hover,
.fgy-a11y-launcher[aria-expanded="true"] {
    background: #333;
    border-color: #333;
    color: #fff;
}

.fgy-a11y-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + .65rem);
    width: min(25rem, calc(100vw - 2rem));
    max-height: min(42rem, calc(100vh - 6rem));
    overflow: auto;
    padding: 1rem;
    border: 2px solid var(--fgy-a11y-ink);
    border-radius: 4px;
    background: var(--fgy-a11y-paper);
    color: var(--fgy-a11y-ink);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .28);
}

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

.fgy-a11y-header,
.fgy-a11y-reader-heading,
.fgy-a11y-reader-settings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fgy-a11y-header h2 {
    margin: 0;
    color: inherit;
    font: 700 1.25rem/1.25 Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

.fgy-a11y-close {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #686268;
    border-radius: 3px;
    background: #fff;
    color: #171219;
    cursor: pointer;
}

.fgy-a11y-group,
.fgy-a11y-options,
.fgy-a11y-reader {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #d6d1d6;
}

.fgy-a11y-label { font-weight: 700; }

.fgy-a11y-ai-note {
    margin: .45rem 0 0;
    color: #686268;
    font-size: .75rem;
    line-height: 1.35;
}

.fgy-a11y-size {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: .5rem;
    margin-top: .6rem;
}

.fgy-a11y-size button,
.fgy-a11y-option,
.fgy-a11y-reader-actions button {
    min-height: 2.9rem;
    border: 1px solid #686268;
    border-radius: 3px;
    background: #fff;
    color: #171219;
    cursor: pointer;
    font-weight: 700;
}

.fgy-a11y-size button:disabled,
.fgy-a11y-reader-actions button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.fgy-a11y-options {
    display: grid;
    gap: .55rem;
}

.fgy-a11y-option {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .75rem;
    text-align: left;
}

.fgy-a11y-option[aria-pressed="true"] {
    border-color: var(--fgy-a11y-accent);
    background: #eee3f1;
    box-shadow: inset 4px 0 var(--fgy-a11y-accent);
}

.fgy-a11y-reader-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(7rem, auto);
    margin-top: .65rem;
}

.fgy-a11y-reader-settings label:first-child { grid-column: 1 / -1; }

.fgy-a11y-reader-settings label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .9rem;
}

.fgy-a11y-reader-settings select {
    min-height: 2.5rem;
    min-width: 0;
    border: 1px solid #686268;
    border-radius: 3px;
    background: #fff;
    color: #171219;
}

.fgy-a11y-reader-settings label:first-child select { flex: 1; }

.fgy-a11y-reader-actions {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: .5rem;
    margin-top: .75rem;
}

.fgy-a11y-reader-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .55rem;
    font-size: .86rem;
}

.fgy-a11y-read {
    border-color: var(--fgy-a11y-accent) !important;
    background: var(--fgy-a11y-accent) !important;
    color: #fff !important;
}

.fgy-a11y-status {
    min-height: 2.6em;
    margin: .75rem 0 0;
    color: #4e484e;
    font-size: .9rem;
}

html[data-fgy-font-size="115"] { font-size: 18.4px !important; }
html[data-fgy-font-size="130"] { font-size: 20.8px !important; }
html[data-fgy-font-size="145"] { font-size: 23.2px !important; }

html[data-fgy-links="true"] body a:not(.fgy-a11y-launcher) {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: .18em !important;
}

html[data-fgy-contrast="high"] body,
html[data-fgy-contrast="high"] #page,
html[data-fgy-contrast="high"] main,
html[data-fgy-contrast="high"] header,
html[data-fgy-contrast="high"] footer,
html[data-fgy-contrast="high"] section,
html[data-fgy-contrast="high"] article,
html[data-fgy-contrast="high"] nav,
html[data-fgy-contrast="high"] div:not(.fgy-accessibility):not([class*="overlay"]) {
    border-color: #fff !important;
    background-color: #000 !important;
    color: #fff !important;
    text-shadow: none !important;
}

html[data-fgy-contrast="high"] body :where(h1, h2, h3, h4, h5, h6, p, span, li, label, strong, em, time) {
    color: #fff !important;
}

html[data-fgy-contrast="high"] body a { color: #ffdf4d !important; }
html[data-fgy-contrast="high"] body button:not(.fgy-a11y-launcher),
html[data-fgy-contrast="high"] body input,
html[data-fgy-contrast="high"] body select,
html[data-fgy-contrast="high"] body textarea {
    border-color: #fff !important;
    background: #000 !important;
    color: #fff !important;
}

html[data-fgy-contrast="high"] .fgy-accessibility {
    --fgy-a11y-accent: #ffdf4d;
    --fgy-a11y-ink: #fff;
    --fgy-a11y-paper: #000;
}

html[data-fgy-contrast="high"] .fgy-a11y-launcher { color: #000 !important; }
html[data-fgy-contrast="high"] .fgy-a11y-option[aria-pressed="true"] { box-shadow: inset 4px 0 #ffdf4d; }

@media (max-width: 480px) {
    .fgy-accessibility { left: .65rem; bottom: .65rem; }
    .fgy-a11y-launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .fgy-a11y-launcher { width: 3.25rem; height: 3.25rem; justify-content: center; padding: 0; }
    .fgy-a11y-panel { width: calc(100vw - 1.3rem); max-height: calc(100vh - 5rem); }
    .fgy-a11y-reader-actions { grid-template-columns: 1fr 1fr; }
    .fgy-a11y-read { grid-column: 1 / -1; }
    .fgy-a11y-reader-settings { grid-template-columns: 1fr; align-items: stretch; }
    .fgy-a11y-reader-settings label { justify-content: space-between; }
    .fgy-a11y-reader-settings select { max-width: 70%; }
}

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