/* TOP-NOZHI v2 - основа: сброс, типографика, ссылки, служебные классы */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 1rem;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 var(--step-0)/1.65 var(--font-sans);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* <picture> вокруг картинки с WebP-копией не участвует в вёрстке */
picture {
    display: contents;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.01em;
    text-wrap: balance;
}

h1 {
    font-size: var(--step-3);
}

h2 {
    font-size: var(--step-2);
}

h3 {
    font-size: var(--step-1);
}

p, ul, ol {
    margin: 0 0 var(--gap-2);
}

a {
    color: inherit;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: .2em;
}

a:hover {
    color: var(--accent-ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* моно-подпись капслоком: метки, выноски, навигация */
.mono {
    font: 500 var(--step--1)/1.3 var(--font-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.wrap {
    width: min(100% - 2 * var(--gutter), var(--w-page));
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: var(--gutter);
    top: -4rem;
    padding: .5rem .75rem;
    background: var(--ink);
    color: var(--paper);
    z-index: 10;
}

.skip:focus {
    top: .5rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
        animation: none !important;
    }
}
