:root {
    --a11y-panel-green: #143d32;
    --a11y-panel-green-dark: #0d2b23;
    --a11y-panel-lime: #d9f36b;
    --a11y-panel-ink: #17221e;
    --a11y-panel-muted: #53635c;
    --a11y-panel-line: #d8e1dc;
    --a11y-panel-surface: #ffffff;
    --a11y-panel-soft: #f2f6f3;
}

.a11y-tools {
    position: relative;
    z-index: 450;
}

.a11y-trigger {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 450;
    display: grid;
    width: 58px !important;
    height: 58px !important;
    padding: 14px !important;
    place-items: center;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    background: var(--a11y-panel-green) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 34px rgb(13 43 35 / 30%) !important;
    cursor: pointer;
}

.a11y-trigger:hover {
    background: var(--a11y-panel-green-dark) !important;
}

.a11y-trigger svg,
.a11y-close svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

dialog.a11y-panel {
    inset: 0 0 0 auto;
    z-index: 900;
    width: min(460px, 100vw);
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 24px 0 0 24px;
    background: var(--a11y-panel-surface);
    color: var(--a11y-panel-ink);
    box-shadow: -24px 0 70px rgb(11 37 30 / 28%);
}

dialog.a11y-panel:not([open]) {
    display: none;
}

dialog.a11y-panel[open] {
    display: flex;
    right: 0;
    flex-direction: column;
}

dialog.a11y-panel::backdrop {
    background: rgb(8 27 22 / 62%);
    backdrop-filter: blur(2px);
}

.a11y-dialog-open {
    overflow: hidden;
}

.a11y-panel-header {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 28px 28px 24px;
    background: var(--a11y-panel-green);
    color: #ffffff;
}

.a11y-panel-header h2 {
    margin: 5px 0 8px;
    color: #ffffff;
    font: 700 27px/1.15 "DM Sans", Arial, sans-serif;
    letter-spacing: -.02em;
}

.a11y-panel-header p {
    max-width: 350px;
    margin: 0;
    color: #e4eee9;
    font-size: 14px;
    line-height: 1.55;
}

.a11y-eyebrow {
    color: var(--a11y-panel-lime);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
}

.a11y-close {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 13px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 42%);
    border-radius: 14px;
    background: rgb(255 255 255 / 10%);
    color: #ffffff;
    cursor: pointer;
}

.a11y-close:hover {
    background: rgb(255 255 255 / 20%);
}

.a11y-panel-body {
    flex: 1 1 auto;
    padding: 22px 24px 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.a11y-control-group + .a11y-control-group {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--a11y-panel-line);
}

.a11y-group-heading {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 15px;
}

.a11y-group-heading > span {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: #e9f1ed;
    color: var(--a11y-panel-green);
    font-weight: 800;
}

.a11y-group-heading h3 {
    margin: 0 0 2px;
    color: var(--a11y-panel-ink);
    font: 700 17px/1.3 "DM Sans", Arial, sans-serif;
}

.a11y-group-heading p {
    margin: 0;
    color: var(--a11y-panel-muted);
    font-size: 13px;
    line-height: 1.45;
}

.a11y-font-control {
    display: grid;
    grid-template-columns: 1fr 76px 1fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--a11y-panel-line);
    border-radius: 16px;
    background: var(--a11y-panel-soft);
}

.a11y-font-control button {
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid #c9d5cf;
    border-radius: 11px;
    background: #ffffff;
    color: var(--a11y-panel-green-dark);
    font: 700 12px/1.25 "DM Sans", Arial, sans-serif;
    cursor: pointer;
}

.a11y-font-control button:disabled {
    color: #78847f;
    background: #e7ece9;
    cursor: not-allowed;
}

.a11y-font-control [data-a11y-font-value] {
    color: var(--a11y-panel-green-dark);
    font-size: 17px;
    font-weight: 800;
    text-align: center;
}

.a11y-option {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 12px;
    width: 100%;
    min-height: 66px;
    margin-top: 9px;
    padding: 10px 12px;
    align-items: center;
    border: 1px solid var(--a11y-panel-line);
    border-radius: 15px;
    background: #ffffff;
    color: var(--a11y-panel-ink);
    text-align: left;
    cursor: pointer;
}

.a11y-option:hover {
    border-color: #91a59a;
    background: #f8fbf9;
}

.a11y-option[aria-checked="true"] {
    border-color: var(--a11y-panel-green);
    background: #eff7f2;
    box-shadow: inset 4px 0 var(--a11y-panel-green);
}

.a11y-option-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--a11y-panel-soft);
    color: var(--a11y-panel-green);
    font-size: 17px;
    font-weight: 800;
}

.a11y-option-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.a11y-option-copy strong {
    font-size: 14px;
    line-height: 1.3;
}

.a11y-option-copy small {
    color: var(--a11y-panel-muted);
    font-size: 12px;
    line-height: 1.35;
}

.a11y-switch {
    position: relative;
    width: 42px;
    height: 24px;
    border: 2px solid #78877f;
    border-radius: 999px;
    background: #ffffff;
}

.a11y-switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #65736c;
    content: "";
    transition: transform .18s ease;
}

.a11y-option[aria-checked="true"] .a11y-switch {
    border-color: var(--a11y-panel-green);
    background: var(--a11y-panel-green);
}

.a11y-option[aria-checked="true"] .a11y-switch::after {
    background: #ffffff;
    transform: translateX(18px);
}

.a11y-panel-footer {
    flex: 0 0 auto;
    padding: 16px 24px max(18px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--a11y-panel-line);
    background: #f7faf8;
}

.a11y-panel-footer p {
    min-height: 20px;
    margin: 0 0 10px;
    color: var(--a11y-panel-muted);
    font-size: 12px;
    line-height: 1.45;
}

.a11y-reset {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border: 1px solid var(--a11y-panel-green);
    border-radius: 12px;
    background: transparent;
    color: var(--a11y-panel-green-dark);
    font-weight: 800;
    cursor: pointer;
}

.a11y-reset:hover {
    background: #e9f1ed;
}

:where(.a11y-trigger, .a11y-panel button):focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 3px solid #111111 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 2px #ffffff !important;
}

html[data-a11y-font-size="100"] { --a11y-text-scale: 1; font-size: 100%; }
html[data-a11y-font-size="110"] { --a11y-text-scale: 1.1; font-size: 110%; }
html[data-a11y-font-size="120"] { --a11y-text-scale: 1.2; font-size: 120%; }
html[data-a11y-font-size="130"] { --a11y-text-scale: 1.3; font-size: 130%; }
html[data-a11y-font-size="140"] { --a11y-text-scale: 1.4; font-size: 140%; }

html:not([data-a11y-font-size="100"]) :where(a, p, li, label, input, textarea, select, button, output, summary, td, th, address) {
    overflow-wrap: anywhere;
}

html:not([data-a11y-font-size="100"]) :is(.topbar, .home-hero-features b, .reference-trust small, .product-body p, .checkout-card label) {
    font-size: calc(12px * var(--a11y-text-scale)) !important;
}

html:not([data-a11y-font-size="100"]) :is(.site-header #mainNav, .product-body > small, .commerce-product-body > p, .special-offer-body > p) {
    font-size: calc(13px * var(--a11y-text-scale)) !important;
}

html:not([data-a11y-font-size="100"]) :is(.reference-trust b, .footer-column a, .footer-tagline, .a11y-option-copy strong) {
    font-size: calc(14px * var(--a11y-text-scale)) !important;
}

html:not([data-a11y-font-size="100"]) :is(.home-category-cards b, .commerce-product-body h3) {
    font-size: calc(15px * var(--a11y-text-scale)) !important;
}

html:not([data-a11y-font-size="100"]) .product-body h3 {
    font-size: calc(16px * var(--a11y-text-scale)) !important;
}

html:not([data-a11y-font-size="100"]) :is(.home-hero-copy > p, .product-copy p) {
    font-size: calc(18px * var(--a11y-text-scale)) !important;
}

html:not([data-a11y-font-size="100"]) .checkout-card h2 {
    font-size: calc(19px * var(--a11y-text-scale)) !important;
}

html:not([data-a11y-font-size="100"]) .legal-card p {
    font-size: calc(17px * var(--a11y-text-scale)) !important;
}

html.a11y-readable body,
html.a11y-readable button,
html.a11y-readable input,
html.a11y-readable select,
html.a11y-readable textarea {
    font-family: Arial, Helvetica, sans-serif !important;
}

html.a11y-spacing body,
html.a11y-spacing p,
html.a11y-spacing li,
html.a11y-spacing label,
html.a11y-spacing input,
html.a11y-spacing textarea,
html.a11y-spacing button {
    line-height: 1.5 !important;
    letter-spacing: .12em !important;
    word-spacing: .16em !important;
}

html.a11y-spacing p {
    margin-bottom: 2em !important;
}

html.a11y-links a:not(.btn):not(.brand):not(.footer-brand) {
    text-decoration: underline !important;
    text-decoration-thickness: .15em !important;
    text-underline-offset: .2em !important;
}

html.a11y-links a:is(.btn, .brand, .footer-brand, .header-icon) {
    text-decoration: none !important;
}

html.a11y-focus :focus-visible {
    outline: 4px solid #ffbf47 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 2px #17221e !important;
}

html.a11y-cursor,
html.a11y-cursor body,
html.a11y-cursor :is(a, button, input, select, textarea, summary, label) {
    cursor: url('/assets/images/a11y-cursor.svg') 3 3, auto !important;
}

html.a11y-motion {
    scroll-behavior: auto !important;
}

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

html.a11y-contrast {
    --ink: #ffffff;
    --green: #000000;
    --green2: #ffffff;
    --lime: #ffef5a;
    --cream: #000000;
    --white: #000000;
    --muted: #ffffff;
    --line: #ffffff;
    --reference-green: #000000;
    --reference-wave: #ffffff;
    --reference-bg: #000000;
    --reference-text: #ffffff;
    --reference-card: #000000;
    --reference-line: #ffffff;
    color-scheme: dark;
    filter: none !important;
}

html.a11y-contrast .home-commerce {
    --hc-green: #000000;
    --hc-green-dark: #ffffff;
    --hc-green-soft: #ffffff;
    --hc-cream: #000000;
    --hc-cream-2: #000000;
    --hc-white: #000000;
    --hc-brown: #ffffff;
    --hc-muted: #ffffff;
    --hc-line: #ffffff;
    --hc-rust: #ffef5a;
    --hc-shadow: none;
}

html.a11y-contrast body,
html.a11y-contrast body *:not(img):not(picture):not(source):not(svg):not(path):not(use) {
    border-color: #ffffff !important;
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffffff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.a11y-contrast a,
html.a11y-contrast a * {
    color: #ffef5a !important;
    text-decoration: underline !important;
}

html.a11y-contrast :is(button, input, select, textarea, .btn) {
    border: 2px solid #ffffff !important;
    background: #000000 !important;
    color: #ffffff !important;
}

html.a11y-contrast ::placeholder {
    color: #e6e6e6 !important;
    opacity: 1;
}

html.a11y-contrast :disabled {
    color: #cccccc !important;
    opacity: 1;
}

html.a11y-contrast .a11y-option[aria-checked="true"] {
    border-color: #ffef5a !important;
    box-shadow: inset 5px 0 #ffef5a !important;
}

.a11y-reading-guide {
    --a11y-guide-y: 50vh;
    position: fixed;
    z-index: 880;
    top: 0;
    right: 0;
    left: 0;
    display: none;
    height: 48px;
    border-top: 3px solid rgb(20 61 50 / 70%);
    border-bottom: 3px solid rgb(20 61 50 / 70%);
    background: rgb(217 243 107 / 16%);
    box-shadow: 0 -50vh 0 rgb(255 255 255 / 12%), 0 50vh 0 rgb(255 255 255 / 12%);
    pointer-events: none;
    transform: translateY(calc(var(--a11y-guide-y) - 24px));
    will-change: transform;
}

html.a11y-guide .a11y-reading-guide:not([hidden]) {
    display: block;
}

html.a11y-contrast .a11y-reading-guide {
    border-color: #ffffff !important;
    background: #ffef5a !important;
    opacity: .35;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

@media (forced-colors: active) {
    .a11y-trigger,
    .a11y-panel button,
    .a11y-option,
    .a11y-font-control {
        border: 2px solid ButtonText;
        forced-color-adjust: auto;
    }

    .a11y-option[aria-checked="true"] {
        outline: 3px solid Highlight;
    }

    .a11y-reading-guide {
        border-color: Highlight;
        background: transparent;
    }
}

@media (max-width: 600px) {
    dialog.a11y-panel {
        width: 100vw;
        border-radius: 0;
    }

    .a11y-panel-header {
        padding: max(22px, env(safe-area-inset-top)) 18px 18px;
    }

    .a11y-panel-header h2 {
        font-size: 23px;
    }

    .a11y-panel-body {
        padding: 18px 16px 24px;
    }

    .a11y-panel-footer {
        padding-right: 16px;
        padding-left: 16px;
    }

    .a11y-option {
        grid-template-columns: 38px minmax(0, 1fr) 42px;
        gap: 9px;
    }

    .a11y-font-control {
        grid-template-columns: 1fr 66px 1fr;
    }

    .a11y-trigger {
        right: max(14px, env(safe-area-inset-right)) !important;
        bottom: max(14px, env(safe-area-inset-bottom)) !important;
        width: 52px !important;
        height: 52px !important;
        padding: 12px !important;
    }
}
