@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('./fonts/manrope-cyrillic-ext.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: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('./fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('./fonts/manrope-latin-ext.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('./fonts/manrope-latin.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 {
  --accent: #377bd6;
  --container: 1120px;
}

[data-theme='light'],
:root:not([data-theme='dark']) {
  --page-bg: #ffffff;
  --surface: #f7f9fc;
  --text: #141922;
  --text-muted: #5a6375;
  --border: #e4e8f0;
  --toggle-bg: #eef1f6;
  --toggle-border: #d5dbe6;
  color-scheme: light;
}

[data-theme='dark'] {
  --page-bg: #0c0f14;
  --surface: #12161d;
  --text: #e8eaef;
  --text-muted: #b8c0d0;
  --border: #232a37;
  --toggle-bg: #1a1f2a;
  --toggle-border: #2a3142;
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body.doc-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  font-family:
    Manrope,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

a {
  color: inherit;
}

.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
  padding: 1.25rem 0;
}

.doc-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.doc-brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
}

.doc-brand span {
  color: var(--accent);
}

.doc-header-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}

.doc-header-link:hover {
  color: var(--text);
}

.doc-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.doc-theme-toggle:hover {
  color: var(--text);
}

.doc-theme-toggle__icon {
  display: none;
  width: 1.1rem;
  height: 1.1rem;
}

[data-theme='light'] .doc-theme-toggle__icon--moon,
:root:not([data-theme='dark']) .doc-theme-toggle__icon--moon {
  display: block;
}

[data-theme='dark'] .doc-theme-toggle__icon--sun {
  display: block;
}

.doc-main {
  flex: 1;
  padding: 2rem 0 4rem;
}

.doc-article {
  width: min(100% - 2rem, 720px);
  margin: 0 auto;
}

.doc-article > header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 1.45px;
  text-transform: uppercase;
  color: var(--accent);
}

.doc-article h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.65rem, 3.5vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.doc-meta {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.doc-article section {
  margin-top: 2rem;
}

.doc-article h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.doc-article p,
.doc-article li {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.doc-article p + p {
  margin-top: 0.85rem;
}

.doc-article ul,
.doc-article ol {
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
}

.doc-article li + li {
  margin-top: 0.4rem;
}

.doc-article a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.doc-article a:hover {
  text-decoration: underline;
}

.doc-license-block {
  margin-top: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.doc-license-block dt {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.doc-license-block dd {
  margin: 0.35rem 0 0.85rem;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.doc-license-block dd:last-child {
  margin-bottom: 0;
}

.doc-note {
  margin-top: 2rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.doc-footer-nav {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.8125rem;
}

.doc-footer-nav a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}

.doc-footer-nav a:hover {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  body.doc-page,
  .doc-theme-toggle {
    transition: none;
  }
}
