/**
 * CSS Reset
 *
 * Modern CSS reset for consistent rendering across browsers.
 * Based on modern-normalize with custom additions.
 */

/* Box sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margins and padding */
* {
    margin: 0;
    padding: 0;
}

/* HTML & Body */
html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

/* Links */
a {
    color: inherit;
    text-decoration: inherit;
}

/* Lists */
ol, ul {
    list-style: none;
}

/* Images */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Forms */
button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    color: inherit;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Tables */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove button styling */
button {
    border: none;
    background: none;
}

/* Accessibility */
[hidden] {
    display: none !important;
}

/* Remove default styling on fieldsets */
fieldset {
    border: none;
}

/* Remove default styling on legends */
legend {
    padding: 0;
}

/* Remove default styling on progress bars */
progress {
    vertical-align: baseline;
}

/* Remove default styling on summary */
summary {
    display: list-item;
    cursor: pointer;
}

/* Remove spinner buttons on number inputs in WebKit browsers */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    height: auto;
}

/* Remove default styling on search inputs */
[type='search'] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

/* Remove inner padding on search inputs in WebKit browsers */
[type='search']::-webkit-search-decoration {
    -webkit-appearance: none;
}

/* File upload button */
::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

/* Prevent text overflow */
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* Monospace fonts */
code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 1em;
}

/* Small text */
small {
    font-size: 80%;
}

/* Subscript and superscript */
sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}
