:root {
    --theme-accent: #4f6755;
    --theme-link: #425947;
    --theme-link-hover: #29382c;
    --theme-focus: #587260;
    accent-color: var(--theme-accent);
}

body:has(#dark-mode:checked) {
    --theme-link: #b7d2be;
    --theme-link-hover: #d3e1d6;
    --theme-focus: #a9c6b0;
}

:where(a:any-link) {
    color: var(--theme-link);
}

:where(a:any-link:hover) {
    color: var(--theme-link-hover);
}

:where(:focus-visible) {
    outline: 2px solid var(--theme-focus);
    outline-offset: 2px;
}

::selection {
    color: #29382c;
    background: #d3e1d6;
}

.select2-container--default .select2-results__option--highlighted:is([aria-selected], .select2-results__option--selectable),
.select2-container--classic .select2-results__option--highlighted:is([aria-selected], .select2-results__option--selectable) {
    color: #fff;
    background: var(--theme-accent);
}

.select2-container--classic :is(.select2-selection--single, .select2-selection--multiple):focus,
.select2-container--classic.select2-container--open :is(.select2-selection--single, .select2-selection--multiple, .select2-dropdown) {
    border-color: var(--theme-focus);
}

.ui-state-active,
:is(.ui-widget-content, .ui-widget-header) .ui-state-active,
.ui-button.ui-state-active:hover,
.ui-button:active {
    border-color: var(--theme-accent);
    background: var(--theme-accent);
    color: #fff;
}
