@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/golos-text-cyrillic-ext-v7.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/golos-text-cyrillic-v7.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/golos-text-latin-ext-v7.woff2) format('woff2');
  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: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/golos-text-latin-v7.woff2) format('woff2');
  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;
}

:root {
  color-scheme: dark;
  --bg: #101011;
  --text: #f3f3f4;
  --body-text: #dedee0;
  --muted: #ababaf;
  --surface: rgb(24 24 24 / 78%);
  --surface-hover: rgb(33 33 35 / 94%);
  --control: #202023;
  --line: rgb(255 255 255 / 11%);
  --line-hover: #48484c;
  --primary: #e6e6ec;
  --radius: 7px;
  --font: "Golos Text", "Segoe UI", system-ui, sans-serif;
}

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

html {
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font: 400 1rem / 1.5 var(--font);
}

a { color: inherit; }

:where(a, button):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 14% 24%, #474747 0%, transparent 54%),
    radial-gradient(ellipse at 82% 78%, #383838 0%, transparent 62%),
    #161616;
}

.bg-canvas {
  display: block;
  width: 100%;
  height: 100%;
  visibility: hidden;
}

.bg-ready .bg-canvas {
  visibility: visible;
  opacity: 0.76;
}

.site {
  position: relative;
  width: min(1120px, 100%);
  min-height: 100dvh;
  margin-inline: auto;
  padding:
    max(1.25rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    max(2rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
}

.topbar {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top, 0px));
  right: max(0.85rem, env(safe-area-inset-right, 0px));
  z-index: 4;
}

.site--home { width: min(800px, 100%); }
.site--home .shell { padding-top: clamp(0.9rem, 3vw, 2rem); }

.lang-switch {
  display: flex;
  gap: 0.2rem;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.lang-switch button {
  min-height: 30px;
  padding: 0 0.65rem;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: 600 0.8125rem var(--font);
}

.lang-switch button:is(:hover, .is-on) { color: var(--text); background: var(--control); }

.shell { padding-top: clamp(1.4rem, 3.8vw, 2.6rem); }

.doc h1,
.missing-line {
  margin: 0;
  font-size: clamp(1.55rem, 1.25rem + 1.15vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.service-grid,
.doc,
.missing-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-grid > li { min-width: 0; border-top: 1px solid var(--line); }
.service-grid > li:nth-child(-n + 2) { border-top: 0; }
.service-grid > li:nth-child(even) { border-inline-start: 1px solid var(--line); }

.service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  min-height: 54px;
  gap: 0.85rem;
  padding: 0.8rem clamp(0.9rem, 2.2vw, 1.25rem);
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.service-card:is(:hover, :focus-visible) { background: var(--surface-hover); }
.service-card:focus-visible { outline-offset: -3px; }

.service-card__name { font-size: 1rem; font-weight: 680; }
.service-card__arrow { color: var(--muted); font-family: system-ui, sans-serif; }
.service-card:is(:hover, :focus-visible) .service-card__arrow { color: var(--text); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.site-nav a {
  padding: 10px 3px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

.site-nav a[aria-current="page"] { border-bottom-color: var(--primary); }

.shell-doc {
  max-width: 52rem;
  margin-inline: auto;
  padding-top: max(3.35rem, calc(env(safe-area-inset-top, 0px) + 2.85rem));
}

.doc-content { min-width: 0; }

.doc {
  padding: clamp(1.1rem, 3.2vw, 2.35rem);
  color: var(--body-text);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.doc-head {
  margin-bottom: 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.doc h1 { color: var(--text); }

.doc .updated { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.8125rem; }

.doc h2 {
  margin: 1.35rem 0 0.5rem;
  color: var(--text);
  font-size: 1.075rem;
  font-weight: 680;
  line-height: 1.35;
}

.doc :is(p, ul, ol) { margin: 0 0 0.7rem; }
.doc :is(ul, ol) { padding-inline-start: 1.25rem; }
.doc li + li { margin-top: 0.3rem; }
.doc > :last-child { margin-bottom: 0; }

.doc a { color: var(--text); text-decoration-color: var(--muted); text-underline-offset: 0.18em; }
.doc a:hover { text-decoration-color: currentColor; }
.doc code { color: #e7e2d4; font: 0.9em ui-monospace, Consolas, monospace; }

.shell-missing {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 3.25rem);
}

.missing-card {
  width: min(100%, 30rem);
  padding: clamp(1.2rem, 4vw, 2rem);
}

.missing-code { margin: 0 0 0.45rem; color: var(--muted); font-size: 0.875rem; }

@media (max-width: 580px) {
  .service-grid { grid-template-columns: minmax(0, 1fr); }
  .service-grid > li:nth-child(2) { border-top: 1px solid var(--line); }
  .service-grid > li:nth-child(even) { border-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .service-card { transition: none; }
}
