/* Основа: шрифт Onest (свои файлы, вариативный 100–900), сброс, типографика, контейнер,
   выделение, фокус и прочие поверхности браузера. Значения — только из tokens.css. */

@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-cyrillic-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + var(--space-4));
  accent-color: var(--accent);
  caret-color: var(--accent);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
b, strong { font-weight: var(--fw-medium); color: var(--ink); }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--space-1);
}

/* типографика */
.display {
  font-size: var(--fs-display);
  font-weight: var(--fw-medium);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
.display .soft { color: var(--ink-3); }
.display .dot { color: var(--accent); }
.h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}
.h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  line-height: 1.3;
  letter-spacing: var(--tracking-tight);
}
.muted { color: var(--ink-2); }
.prose { max-width: var(--measure); color: var(--ink-2); }
.prose > * + * { margin-top: var(--space-4); }
.prose .h3 { color: var(--ink); margin-top: var(--space-6); }
.prose .h3:first-child { margin-top: 0; }
.prose--lead { font-size: var(--fs-lead); }
.num { font-variant-numeric: tabular-nums; }
.placeholder { background: var(--placeholder); color: var(--ink); padding: 0 var(--space-1); border-radius: var(--space-1); }

/* раскладка */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { margin-top: var(--section-gap); }
.section--tight { margin-top: var(--space-7); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--space-4); top: calc(-1 * var(--nav-h));
  z-index: 20; padding: var(--space-2) var(--space-4);
  background: var(--ink); color: var(--on-ink); border-radius: var(--r-pill); text-decoration: none;
}
.skip:focus { top: var(--space-3); }

/* ошибка сервера: страница без шаблонов */
.error-plain { padding-block: var(--section-gap); max-width: var(--measure); }
.error-plain h1 { font-size: var(--fs-h2); font-weight: var(--fw-medium); letter-spacing: var(--tracking-display); }
.error-plain p { margin-top: var(--space-4); color: var(--ink-2); }
