Zend certified PHP/Magento developer

How to use theme’s _variables.less file in my custom code module?

I have written a custom module that is located in the /app/code folder. My less file is located in /app/code/<Vendor>/<Module>/view/frontend/web/css/source/_module.less. How do I include the theme’s _variables.less file so I can pre-style my content to match the theme’s colours? I’m only after the header and button colours (example code below):

.mydiv {
    border-top: 1px solid @top-header;
    border-bottom: 1px solid @top-header;
}
input[type="button"] {
    background-color: @button_primary;
    color: @button-primary__hover__color;
}

I’ve tried to use the @import commands but this does not work:

@import 'source/_variables.less';
@import 'source/_theme.less';