html:not([data-site-theme="dark"]) {
    color-scheme: light;
}

.hl_fixed .hl_top .site-theme-switch {
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    width: 48px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.hl_fixed .hl_top .site-theme-switch:focus-visible {
    outline: 2px solid #a61925;
    outline-offset: -2px;
}

.site-theme-switch-track {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    width: 42px;
    height: 24px;
    padding-inline: 2px;
    border: 1px solid #b8a99a;
    border-radius: 999px;
    background: #ede5db;
}

.site-theme-switch-thumb {
    display: grid;
    position: relative;
    flex: 0 0 18px;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    color: #714d18;
    transition: transform .18s ease;
}

.site-theme-sun {
    box-sizing: border-box;
    width: 7px;
    height: 7px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.site-theme-sun::before,
.site-theme-sun::after {
    position: absolute;
    inset: 0;
    width: 1.5px;
    height: 1.5px;
    margin: auto;
    border-radius: 50%;
    box-shadow: 0 -6px currentColor, 0 6px currentColor, -6px 0 currentColor, 6px 0 currentColor;
    content: "";
}

.site-theme-sun::after {
    transform: rotate(45deg);
}

.site-theme-moon {
    display: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 3.5px -2px currentColor;
    transform: rotate(-17deg);
}

[data-site-theme="dark"] .site-theme-switch-track {
    border-color: #a98b75;
    background: #463831;
}

[data-site-theme="dark"] .site-theme-switch-thumb {
    transform: translateX(16px);
    background: #fbeda9;
    color: #412d20;
}

[data-site-theme="dark"] .site-theme-switch .site-theme-sun {
    display: none;
}

[data-site-theme="dark"] .site-theme-switch .site-theme-moon {
    display: block;
}

[data-site-theme="dark"] .hl_fixed .hl_top .site-theme-switch:focus-visible {
    outline-color: #ffaba1;
}

@media (prefers-reduced-motion: reduce) {
    .site-theme-switch-thumb {
        transition: none;
    }
}

@media (min-width: 1001px) {
    .hl_fixed .hl_top .site-theme-switch {
        float: right;
        margin-inline-end: 10px;
    }
}

@media (min-width: 1186px) {
    .hl_fixed .hl_top .site-theme-switch {
        margin-block-start: 7px;
    }

    .hl_fixed .hl_top > .wmain:has(> .site-theme-switch) > .hl_top_href {
        margin-left: clamp(80px, 7.5vw, 100px);
    }

    .hl_fixed .hl_top > .wmain:has(> .site-theme-switch) > .hl_top_href + .hl_top_href {
        margin-left: clamp(32px, 3.6vw, 42px);
    }
}

@media (max-width: 1000px) {
    .hl_fixed .hl_top > .wmain:has(> .site-theme-switch) {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }

    .hl_fixed .hl_top .site-theme-switch {
        width: 44px;
        height: 44px;
    }
}

@media (min-width: 781px) and (max-width: 1000px) {
    .hl_fixed .hl_top > .wmain:has(> .site-theme-switch) {
        grid-template-columns: auto repeat(2, minmax(0, 1fr)) auto auto;
        grid-template-areas:
            "logo phone phone theme menu"
            "address address email email email";
    }

    .hl_fixed .hl_top .site-theme-switch {
        grid-area: theme;
    }
}

@media (max-width: 400px) {
    .hl_fixed .hl_top:has(.site-theme-switch) {
        padding-inline: 10px;
    }

    .hl_fixed .hl_top > .wmain:has(> .site-theme-switch) {
        column-gap: 4px;
    }

    .hl_fixed .hl_top .logo.factory-brand-link:has(~ .site-theme-switch),
    .hl_fixed .hl_top .logo.factory-brand-link:has(~ .site-theme-switch) .factory-brand-mark {
        width: clamp(42px, 15vw, 60px);
    }

    .hl_fixed .hl_top > .wmain:has(> .site-theme-switch) > a.hl_phone {
        font-size: clamp(14px, 4.6vw, 18px);
    }
}
