/* Второй шанс, V2: основа документа. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { background: var(--orange-light); color: var(--ink); }

h1, h2, h3, h4 { margin: 0; text-wrap: balance; overflow-wrap: normal; hyphens: manual; }
h1, h2 { font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: var(--text-h1); line-height: 1.04; }
h2 { font-size: var(--text-h2); line-height: 1.08; }
h3 { font-family: var(--font-body); font-size: var(--text-h3); font-weight: 600; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
a, button, summary, label { touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--orange); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 50; padding: 12px 16px; background: var(--ink); color: var(--paper); border-radius: var(--radius-control); }
.skip-link:focus { top: 16px; }
.nowrap { white-space: nowrap; }

@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; }
}
