/**
 * Базовые стили и нормализация элементов.
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--color-text);
    background-color: var(--color-background);
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.admin-bar {
    min-height: calc(100vh - 32px);
}

img,
picture,
svg,
video,
canvas,
iframe {
    display: block;
    max-width: 100%;
}

img,
picture {
    height: auto;
}

button,
input,
textarea,
select {
    color: inherit;
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
figure,
blockquote {
    margin-top: 0;
}

ul,
ol {
    margin-top: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/**
 * Скрытый текст для программ экранного доступа.
 */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    z-index: 100000;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 12px 16px;
    margin: 0;
    overflow: visible;
    clip-path: none;
    color: var(--color-primary-dark);
    background-color: var(--color-surface);
    white-space: normal;
}