@layer reset, grid, tokens, anatomy, components, skin;

@layer reset {

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

    body,
    h1, h2, h3, h4, h5, h6,
    p, figure, blockquote, dl, dd, ol, ul, pre {
        margin: 0;
    }

    html {

        -webkit-text-size-adjust: 100%;

        scroll-padding-block-start: var(--mr-space-8, 3rem);

        color-scheme: light;
    }

    [data-theme="dark"] {
        color-scheme: dark;
    }

    [data-theme="light"] {
        color-scheme: light;
    }

    body {
        min-block-size: 100svb;
        font-family: var(--mr-font-body);
        font-size: var(--mr-text-body);
        line-height: var(--mr-leading-base);
        color: var(--mr-fg);
        background-color: var(--mr-bg);

        overflow-wrap: break-word;
    }

    img, svg, video, canvas, audio, iframe, embed, object {
        display: block;
        max-inline-size: 100%;
    }

    img, video {
        block-size: auto;
    }

    input, button, textarea, select {
        font: inherit;
        color: inherit;
        letter-spacing: inherit;
    }

    textarea:not([rows]) {
        min-block-size: 6rem;
    }

    button {
        background: none;
        border: 0;
        padding: 0;
        cursor: pointer;
    }

    fieldset {
        margin: 0;
        padding: 0;
        border: 0;
        min-inline-size: 0;
    }

    legend {
        padding: 0;
    }

    a {
        color: var(--mr-link);
        text-underline-offset: 0.15em;
    }

    :focus-visible {
        outline: var(--mr-border-width-lg, 3px) solid var(--mr-focus-ring, currentColor);
        outline-offset: 2px;
    }

    h1:focus,
    [tabindex="-1"]:focus:not(:focus-visible) {
        outline: none;
    }

    address {
        font-style: normal;
    }

    .mr-list-plain {
        list-style: none;
        margin: 0;
        padding-inline-start: 0;
    }

    .mr-visually-hidden:not(:focus):not(:active) {
        position: absolute;
        inline-size: 1px;
        block-size: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 1ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 1ms !important;
            scroll-behavior: auto !important;
        }
    }
}
