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

:root {
  --bg: #1c1c1e;
  --text: #ffffff;
  --muted: #444444;
  --page-padding-x: 24px;
  --doc-gap: 24px;
  --doc-content-padding-x-desktop: min(400px, max(24px, calc((100vw - 640px) / 2)));
  --switch-bg: #27272c;
  --switch-active: #ffffff;
  --switch-active-text: #000000;
  --switch-text: #ffffff;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.doc-page {
  min-height: 100dvh;
  background: var(--bg);
}

/* Контент — макет 507:29591 (мобила) / 507:29564 (десктоп) */

.doc-content {
  padding: 24px var(--page-padding-x) 48px;
}

.doc-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  padding: 4px;
  border-radius: 36px;
  background: var(--switch-bg);
}

.language-switch__option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 36px;
  color: var(--switch-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.language-switch__option[aria-current="true"] {
  background: var(--switch-active);
  color: var(--switch-active-text);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

.doc-article {
  display: flex;
  flex-direction: column;
  gap: var(--doc-gap);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.doc-article h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.doc-article h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.doc-article p {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.doc-lead {
  color: var(--muted);
}

.doc-article ul {
  margin: 0;
  padding-left: 1.25em;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.doc-article li + li {
  margin-top: 0.35em;
}

.doc-article p strong {
  font-weight: 700;
}

@media (min-width: 768px) {
  .doc-content {
    padding: 64px var(--doc-content-padding-x-desktop) 64px;
  }

  .doc-toolbar {
    margin-bottom: 32px;
  }
}
