:root {
    --a11y-scale: 1;
    --a11y-font: 1;
    --a11y-line: 1.6;
    --a11y-letter: 0em;
}

[hidden] {
    display: none !important;
}

body {
    font-size: calc(16px * var(--a11y-scale) * var(--a11y-font));
    line-height: var(--a11y-line);
    letter-spacing: var(--a11y-letter);
}

.cookie-manage,
.a11y-open {
    position: fixed;
    right: 20px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 17px;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(10, 30, 20, 0.18);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 850;
    cursor: pointer;
}

.cookie-manage {
    bottom: 84px;
    color: var(--deep);
    background: var(--white);
    border: 1px solid rgba(6, 63, 43, 0.18);
}

.a11y-open {
    bottom: 20px;
    min-width: 210px;
    color: var(--white);
    background: #171b18;
    border: 2px solid rgba(255, 255, 255, 0.16);
}

.cookie-manage:hover,
.cookie-manage:focus-visible {
    color: var(--white);
    background: var(--green);
}

.a11y-open:hover,
.a11y-open:focus-visible {
    background: var(--deep);
}

.floating-control__icon {
    display: none;
}

.cookie-banner {
    position: fixed;
    inset: auto 16px 16px;
    z-index: 140;
}

.cookie-banner__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) auto;
    gap: 20px;
    align-items: center;
    width: min(1180px, 100%);
    margin-inline: auto;
    padding: 20px 22px;
    color: var(--white);
    background: rgba(18, 27, 21, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 24px 58px rgba(8, 22, 14, 0.34);
}

.cookie-banner__copy strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.08rem;
}

.cookie-banner__copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.cookie-banner__actions,
.cookie-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
}

.cookie-banner button,
.cookie-modal__footer button {
    min-height: 44px;
    padding: 9px 14px;
    color: var(--deep);
    background: var(--white);
    border: 1px solid rgba(6, 63, 43, 0.18);
    border-radius: 6px;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.cookie-banner button.is-primary,
.cookie-modal__footer button.is-primary {
    color: var(--white);
    background: var(--green);
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(11, 28, 18, 0.58);
}

.cookie-modal__panel {
    width: min(680px, 100%);
    max-height: calc(100dvh - 44px);
    overflow-y: auto;
    background: var(--white);
    border: 1px solid rgba(6, 63, 43, 0.16);
    border-radius: 8px;
    box-shadow: 0 28px 72px rgba(8, 22, 14, 0.28);
}

.cookie-modal__header,
.cookie-modal__footer {
    padding: 20px 22px;
}

.cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #dce7df;
}

.cookie-modal__header .eyebrow {
    margin: 0 0 4px;
}

.cookie-modal__header h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2rem);
}

.cookie-modal__close,
.a11y-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.cookie-modal__close {
    width: 44px;
    height: 44px;
    color: var(--deep);
    background: #eaf8ee;
    border: 1px solid rgba(6, 63, 43, 0.16);
    border-radius: 50%;
    font-size: 1.55rem;
}

.cookie-modal__body {
    display: grid;
    gap: 13px;
    padding: 22px;
}

.cookie-modal__body > p {
    margin: 0;
}

.cookie-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    background: #fbfdfb;
    border: 1px solid #dce7df;
    border-radius: 6px;
}

.cookie-option strong,
.cookie-option small {
    display: block;
}

.cookie-option small {
    margin-top: 4px;
    color: var(--muted);
}

.cookie-option input {
    width: 22px;
    height: 22px;
    accent-color: var(--green);
}

.cookie-option--locked,
.cookie-details {
    background: #f0f8f2;
}

.cookie-details {
    padding: 16px 18px;
    border: 1px solid #dce7df;
    border-radius: 6px;
}

.cookie-details h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.cookie-details ul {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.cookie-details li + li {
    margin-top: 7px;
}

.has-cookie-modal,
.has-a11y-panel {
    overflow: hidden;
}

.a11y-backdrop {
    position: fixed;
    inset: 0;
    z-index: 155;
    background: rgba(12, 22, 17, 0.6);
    backdrop-filter: blur(3px);
}

.a11y-panel {
    position: fixed;
    inset: min(4vh, 38px) max(18px, calc((100vw - 980px) / 2));
    z-index: 160;
    display: grid;
    gap: 18px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: clamp(22px, 3vw, 38px);
    color: var(--white);
    background: #1d211e;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.a11y-head,
.a11y-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.a11y-head__copy {
    max-width: 48rem;
}

.a11y-head__copy .eyebrow {
    margin: 0 0 7px;
    color: var(--sun);
}

.a11y-head h2 {
    margin: 0;
    color: var(--white);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.05;
}

.a11y-head__copy p:last-child {
    margin: 9px 0 0;
    color: rgba(255, 255, 255, 0.75);
}

.a11y-close {
    width: 50px;
    height: 50px;
    color: var(--white);
    background: var(--blue);
    border: 0;
    border-radius: 50%;
    font-size: 1.9rem;
}

.a11y-reset,
.a11y-option,
.a11y-step {
    color: var(--white);
    background: #2d332f;
    border: 1px solid #3c443e;
    border-radius: 6px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.a11y-reset {
    min-height: 44px;
    padding: 9px 14px;
}

.a11y-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.a11y-option {
    display: grid;
    gap: 6px;
    min-height: 88px;
    padding: 15px 17px;
    text-align: left;
}

.a11y-option strong,
.a11y-option small {
    display: block;
}

.a11y-option small {
    color: rgba(255, 255, 255, 0.68);
}

.a11y-option[aria-pressed="true"] {
    background: #244866;
    border-color: #76b8e7;
    outline: 2px solid #76b8e7;
}

.a11y-controls {
    display: grid;
    gap: 10px;
}

.a11y-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.1fr) minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #2d332f;
    border: 1px solid #3c443e;
    border-radius: 6px;
}

.a11y-row__meta {
    display: grid;
}

.a11y-row__meta small {
    color: rgba(255, 255, 255, 0.66);
}

.a11y-range {
    width: 100%;
    accent-color: var(--sky);
}

.a11y-row > span {
    min-width: 62px;
    text-align: right;
    font-weight: 850;
}

.a11y-step {
    min-width: 48px;
    min-height: 42px;
    font-size: 1.2rem;
}

.a11y-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

body.a11y-invert main,
body.a11y-invert .site-header,
body.a11y-invert .site-footer {
    filter: invert(1) hue-rotate(180deg);
}

body.a11y-mono main,
body.a11y-mono .site-header,
body.a11y-mono .site-footer {
    filter: grayscale(1);
}

body.a11y-low main,
body.a11y-low .site-header,
body.a11y-low .site-footer {
    filter: saturate(0.25);
}

body.a11y-high main,
body.a11y-high .site-header,
body.a11y-high .site-footer {
    filter: saturate(1.8);
}

body.a11y-dark,
body.a11y-dark main,
body.a11y-dark .site-header,
body.a11y-dark .site-footer,
body.a11y-dark .post-card,
body.a11y-dark .feed-item,
body.a11y-dark .single-content,
body.a11y-dark .page-card,
body.a11y-dark .info-box {
    color: #fff;
    background: #070a08;
}

body.a11y-dark a {
    color: #b7e4ff;
}

body.a11y-light,
body.a11y-light main,
body.a11y-light .site-header,
body.a11y-light .site-footer,
body.a11y-light .post-card,
body.a11y-light .feed-item,
body.a11y-light .single-content,
body.a11y-light .page-card,
body.a11y-light .info-box {
    color: #000;
    background: #fff;
}

body.a11y-mark-links main a,
body.a11y-mark-links .site-footer a {
    color: #000 !important;
    background: #fff1a0 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 3px !important;
}

body.a11y-mark-headings main h1,
body.a11y-mark-headings main h2,
body.a11y-mark-headings main h3,
body.a11y-mark-headings main h4 {
    outline: 3px solid var(--blue);
    outline-offset: 4px;
}

@media (max-width: 900px) {
    .cookie-banner__inner,
    .cookie-modal__footer {
        grid-template-columns: 1fr;
    }

    .cookie-banner__actions,
    .cookie-modal__footer {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .cookie-banner button,
    .cookie-modal__footer button {
        width: 100%;
    }

    .a11y-panel {
        inset: 12px;
        max-height: calc(100dvh - 24px);
    }

    .a11y-grid,
    .a11y-row {
        grid-template-columns: 1fr;
    }

    .a11y-row > span {
        text-align: left;
    }

    html.has-mobile-nav .cookie-manage,
    html.has-mobile-nav .a11y-open {
        opacity: 0;
        pointer-events: none;
    }
}

@media (max-width: 700px) {
    .cookie-manage,
    .a11y-open {
        right: 14px;
        width: 50px;
        min-width: 50px;
        height: 50px;
        min-height: 50px;
        padding: 0;
        border-radius: 50%;
    }

    .cookie-manage {
        bottom: 76px;
    }

    .a11y-open {
        bottom: 14px;
    }

    .floating-control__icon {
        display: inline;
        font-weight: 900;
        line-height: 1;
    }

    .floating-control__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .cookie-banner {
        inset: auto 10px 10px;
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
    }

    .cookie-banner__inner,
    .cookie-modal__header,
    .cookie-modal__body,
    .cookie-modal__footer {
        padding: 17px;
    }

    .cookie-banner__copy p {
        font-size: 0.9rem;
    }

    .cookie-option {
        grid-template-columns: 1fr;
    }

    .a11y-head,
    .a11y-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .a11y-close,
    .a11y-reset {
        width: 100%;
        border-radius: 6px;
    }
}
