/* CSS Reset - Modern Normalize */
/* Based on normalize.css and modern best practices */

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

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

/* Prevent adjustments of font size after orientation changes in iOS */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Remove the gray background on active links in IE 10 */
a {
    background-color: transparent;
}

/* Improve consistency of default fonts in all browsers */
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    line-height: 1.15;
}

/* Remove the margin in all browsers */
body {
    margin: 0;
}

/* Render the `main` element consistently in IE */
main {
    display: block;
}

/* Correct the font size and margin on `h1` elements within `section` and `article` contexts in Chrome, Firefox, and Safari */
h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

/* Remove the border on images inside links in IE 10 */
img {
    border-style: none;
    max-width: 100%;
    height: auto;
}

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

/* Show the overflow in IE and Edge */
button,
input {
    overflow: visible;
}

/* Remove the inheritance of text transform in Edge, Firefox, and IE */
button,
select {
    text-transform: none;
}

/* Correct the inability to style clickable types in iOS and Safari */
button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    appearance: button;
}

/* Remove the inner border and padding in Firefox */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

/* Restore the focus styles unset by the previous rule */
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

/* Remove the default vertical scrollbar in IE 10+ */
textarea {
    overflow: auto;
}

/* Correct the cursor style of increment and decrement buttons in Chrome */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

/* Correct the odd appearance in Chrome and Safari */
[type="search"] {
    -webkit-appearance: textfield;
    appearance: textfield;
    outline-offset: -2px;
}

/* Remove the inner padding in Chrome and Safari on macOS */
[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/* Correct the inability to style clickable types in iOS and Safari */
::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

/* Interactive elements */
summary {
    display: list-item;
}

/* Misc */
template {
    display: none;
}

[hidden] {
    display: none;
}

/* Additional resets for consistent styling */
ul, ol {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Remove default focus outline and provide better alternative */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

/* Improve text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
