/*
    Imarc Reset Custom Build
    Based on:
    - Josh's Custom CSS Reset - https://www.joshwcomeau.com/css/custom-css-reset/
    - The New CSS Reset - version 1.8.4 (last updated 14.2.2023) - https://github.com/elad2412/the-new-css-reset
    - Open Props - https://github.com/argyleink/open-props/blob/main/src/extra/normalize.src.css
*/

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

:where(:not(dialog)) {
    margin: 0;
}

:where(html) {
    block-size: 100%;
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: none; /* https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/ */

    @media (prefers-reduced-motion: no-preference) {
        scroll-behavior: smooth;
    }
}

:where(body) {
    line-height: 1.5;
    min-block-size: 100%;
    -webkit-font-smoothing: antialiased;
}

:where(p, h1, h2, h3, h4, h5, h6) {
    overflow-wrap: break-word;
}

:where(h1, h2, h3, h4, h5, h6) {
    text-wrap: balance; // still lacking full support but worth using where we can?
}

:where(ol, ul, menu):where([class]) {
    list-style: none;
    padding: 0;
}

:where(img, svg, video, canvas, audio, iframe, embed, object) {
    display: block;
}

:where(img, svg, video) {
    max-inline-size: 100%;
    block-size: auto;
}

table {
    border-collapse: collapse;
}

:where(a[href], area, button, input, label[for], select, summary, textarea, [tabindex]:not([tabindex*="-"])) {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

:where(input, textarea) {
    -webkit-user-select: auto;
}

:where(input, button, textarea, select),
:where(input[type="file"])::-webkit-file-upload-button {
    font: inherit;
    font-size: inherit;
    color: inherit;
    letter-spacing: inherit;
}

pre {
    white-space: pre-wrap;
}

:where(svg:not([width])) {
    max-inline-size: var(--size-10); // keep svgs from growing too large.
}

::placeholder {
    color: unset;
}