/*
 * Minimal reset.
 *
 * Only removes the browser defaults that fight the design system. Everything
 * that carries an accessibility guarantee (focus outline, reduced motion,
 * form control semantics) is preserved or reinstated.
 */

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

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

ul[class],
ol[class] {
    margin: 0;
    padding: 0;
    list-style: none;
}

html {
    /*
     * The Figma scale is expressed in px and must not be rescaled by the root
     * font size. Text zoom keeps working, only the token values stay stable.
     */
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

/*
 * `display: block` above wins over the user agent rule for [hidden], which would leave a hidden
 * icon or image on screen. Restated here so the attribute keeps meaning what it says.
 */
[hidden] {
    display: none;
}

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

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

/* Keep a visible focus indicator, but only for keyboard navigation. */
:focus-visible {
    outline: var(--mo-focus-ring-width) solid var(--mo-focus-ring-color);
    outline-offset: var(--mo-focus-ring-offset);
}

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