@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Inter-Regular-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Inter-Regular.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;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/Inter-Medium-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/Inter-Medium.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;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/Inter-SemiBold-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/Inter-SemiBold.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;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/Inter-Bold-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/Inter-Bold.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 {
  --bs-blue-100: #019BE1;
  --bs-blue-200: #017ED5;
  --bs-blue-300: #0062CA;
  --bs-blue-400: #0045BE;
  --bs-blue-500: #173993;
  --bs-blue-600: #122969;
  --bs-blue-700: #0A387A;
  --bs-blue-900: #001B4F;
  --bs-cyan-glow: #20BBEC;
  --bs-coral: #FF7272;
  --bs-orange: #FC9E1C;
  --bs-lime: #C8F252;
  --bs-periwinkle: #5E7CE1;
  --bs-fg-1: #FFFFFF;
  --bs-fg-2: #A6B5EC;
  --bs-fg-3: #95959D;
  --bs-fg-4: rgba(255, 255, 255, 0.35);
  --bs-fg-on-light: #141415;
  --bs-overlay-10: rgba(255, 255, 255, 0.1);
  --bs-overlay-05: rgba(255, 255, 255, 0.05);
  --bs-bg-deep: #001B4F;
  --bs-bg-night: #050E2B;
  --bs-font-display: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-radius-xs: 10px;
  --bs-radius-sm: 10px;
  --bs-radius-md: 16px;
  --bs-radius-lg: 29px;
  --bs-radius-xl: 40px;
  --bs-radius-pill: 100px;
  --bs-shadow-cyan: 0 24px 80px -24px rgba(0, 255, 255, 0.24);

  /* ── LANDING tokens — светлая тема (default / data-theme="light") ── */
  --bs-landing-page:         #F4F8FE;
  --bs-landing-ink:          #1F2125;
  --bs-landing-sub:          #5C6270;
  --bs-landing-micro:        #8A8F9C;
  --bs-landing-eyebrow-fg:   #0062CA;
  --bs-landing-eyebrow-bg:   rgba(0, 98, 202, 0.06);
  --bs-landing-eyebrow-bd:   transparent;
  --bs-landing-accent-grad:  linear-gradient(120deg, #0062CA, #019BE1 55%, #017ED5);
  --bs-landing-surface:      #FFFFFF;
  --bs-landing-surface-chip: #F0F4FB;
  --bs-landing-border:       #E2E7F0;
  --bs-landing-bar-border:   #EEF0F5;
  --bs-landing-icon:         #8A8F9C;
  --bs-landing-placeholder:  #8A8F9C;
  --bs-landing-chip-fg:      #1F2125;
  --bs-landing-bar-text:     #5C6270;
  --bs-landing-glow:         radial-gradient(circle, rgba(0, 98, 202, 0.12) 0%, rgba(0, 98, 202, 0) 62%);
  --bs-landing-comp-shadow:  0 2px 12px rgba(15, 40, 90, 0.08), 0 1px 3px rgba(15, 40, 90, 0.05);
  --bs-landing-chip-shadow:  0 1px 2px rgba(15, 40, 90, 0.05);
  --bs-landing-grid:         none;

  /* Шапка: фон полупрозрачной полосы + кнопка «Личный кабинет» (светлая тема) */
  --bs-landing-header-bg:     rgba(244, 248, 254, 0.92);
  --bs-landing-icon-bg:       #FFFFFF;
  --bs-landing-icon-bg-hover: #F0F4FB;
  --bs-landing-cabinet-bg:    #0062CA;
  --bs-landing-cabinet-fg:    #FFFFFF;
  --bs-landing-cabinet-hover: #004A99;

  /* ── Документные страницы (for-users / for-developers) — светлая тема ── */
  --bs-landing-faint:          #C0C5D0;
  --bs-doc-code-fg:            #0062CA;
  --bs-doc-code-bg:            rgba(0, 98, 202, 0.06);
  --bs-doc-code-bdr:           rgba(0, 98, 202, 0.14);
  --bs-doc-pre-bg:             #F0F4FB;
  --bs-doc-pre-fg:             #2D3748;
  --bs-doc-pre-bdr:            #E2E7F0;
  --bs-doc-pn-bg:              #FFFFFF;
  --bs-doc-pn-bdr:             #E2E7F0;
  --bs-doc-pn-bg-h:            #F0F4FB;
  --bs-doc-pn-bdr-h:           #C8D0E0;
  --bs-doc-tbl-bg:             rgba(0, 0, 0, 0.01);
  --bs-doc-tbl-bdr:            #E2E7F0;
  --bs-doc-tbl-hd-bg:          #F8FAFE;
  --bs-doc-tbl-row-bdr:        #EEF0F5;
  --bs-doc-callout-note-bg:    rgba(0, 98, 202, 0.04);
  --bs-doc-callout-note-bdr:   rgba(0, 98, 202, 0.18);
  --bs-doc-callout-tip-bg:     rgba(0, 139, 58, 0.04);
  --bs-doc-callout-tip-bdr:    rgba(0, 139, 58, 0.18);
  --bs-doc-callout-warn-bg:    rgba(247, 144, 9, 0.04);
  --bs-doc-callout-warn-bdr:   rgba(247, 144, 9, 0.22);
  --bs-doc-callout-danger-bg:  rgba(217, 8, 8, 0.04);
  --bs-doc-callout-danger-bdr: rgba(217, 8, 8, 0.18);
  --bs-doc-arch-bg:            #FFFFFF;
  --bs-doc-arch-bdr:           #E2E7F0;
}

/* ── LANDING tokens — тёмная тема ── */
[data-theme="dark"] {
  --bs-landing-page:         #001B4F;
  --bs-landing-ink:          #FFFFFF;
  --bs-landing-sub:          #A6B5EC;
  --bs-landing-micro:        #6E7BA8;
  --bs-landing-eyebrow-fg:   #20BBEC;
  --bs-landing-eyebrow-bg:   rgba(32, 187, 236, 0.12);
  --bs-landing-eyebrow-bd:   rgba(32, 187, 236, 0.30);
  --bs-landing-accent-grad:  linear-gradient(180deg, #20BBEC, #3195FF 60%, #0045BE);
  --bs-landing-surface:      #0A1F52;
  --bs-landing-surface-chip: #122969;
  --bs-landing-border:       rgba(255, 255, 255, 0.10);
  --bs-landing-bar-border:   rgba(255, 255, 255, 0.06);
  --bs-landing-icon:         #8FA0D4;
  --bs-landing-placeholder:  #8FA0D4;
  --bs-landing-chip-fg:      #D6DEF6;
  --bs-landing-bar-text:     #8FA0D4;
  --bs-landing-glow:         radial-gradient(circle, rgba(32, 187, 236, 0.30) 0%, rgba(32, 187, 236, 0) 60%);
  --bs-landing-comp-shadow:  0 24px 70px -26px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(49, 149, 255, 0.06);
  --bs-landing-chip-shadow:  none;
  --bs-landing-grid:         linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
                             linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);

  /* Шапка: фон полупрозрачной полосы + кнопка «Личный кабинет» (тёмная тема) */
  --bs-landing-header-bg:     rgba(0, 27, 79, 0.88);
  --bs-landing-icon-bg:       rgba(255, 255, 255, 0.03);
  --bs-landing-icon-bg-hover: rgba(255, 255, 255, 0.06);
  --bs-landing-cabinet-bg:    #FFFFFF;
  --bs-landing-cabinet-fg:    #06122F;
  --bs-landing-cabinet-hover: #E4ECFF;

  /* ── Документные страницы (for-users / for-developers) — тёмная тема ── */
  --bs-landing-faint:          #3D4D6E;
  --bs-doc-code-fg:            #C8F2FF;
  --bs-doc-code-bg:            rgba(255, 255, 255, 0.07);
  --bs-doc-code-bdr:           rgba(255, 255, 255, 0.08);
  --bs-doc-pre-bg:             #050E2B;
  --bs-doc-pre-fg:             #E8EEFC;
  --bs-doc-pre-bdr:            rgba(255, 255, 255, 0.07);
  --bs-doc-pn-bg:              rgba(255, 255, 255, 0.03);
  --bs-doc-pn-bdr:             rgba(255, 255, 255, 0.08);
  --bs-doc-pn-bg-h:            rgba(255, 255, 255, 0.055);
  --bs-doc-pn-bdr-h:           rgba(255, 255, 255, 0.14);
  --bs-doc-tbl-bg:             rgba(255, 255, 255, 0.018);
  --bs-doc-tbl-bdr:            rgba(255, 255, 255, 0.07);
  --bs-doc-tbl-hd-bg:          rgba(255, 255, 255, 0.025);
  --bs-doc-tbl-row-bdr:        rgba(255, 255, 255, 0.05);
  --bs-doc-callout-note-bg:    rgba(49, 149, 255, 0.06);
  --bs-doc-callout-note-bdr:   rgba(49, 149, 255, 0.25);
  --bs-doc-callout-tip-bg:     rgba(200, 242, 82, 0.04);
  --bs-doc-callout-tip-bdr:    rgba(200, 242, 82, 0.22);
  --bs-doc-callout-warn-bg:    rgba(252, 158, 28, 0.05);
  --bs-doc-callout-warn-bdr:   rgba(252, 158, 28, 0.30);
  --bs-doc-callout-danger-bg:  rgba(255, 114, 114, 0.05);
  --bs-doc-callout-danger-bdr: rgba(255, 114, 114, 0.30);
  --bs-doc-arch-bg:            #050E2B;
  --bs-doc-arch-bdr:           rgba(255, 255, 255, 0.07);
}

/* ── Документные страницы: пер-страничный акцент + фоновое свечение ──
   Цвета берутся из прототипов v0.0.2: страница «Пользователям» — голубой
   акцент, «Разработчикам» — сине-фиолетовый (periwinkle). Значения зависят и от
   страницы, и от темы, поэтому заданы отдельными блоками. */
body.doc--users {
  --bs-doc-accent:      #0062CA;
  --bs-doc-accent-glow: transparent;
  --bs-doc-active:      #0062CA;
  --bs-doc-sel:         rgba(0, 98, 202, 0.18);
  --bs-doc-glow1:       rgba(0, 98, 202, 0.05);
  --bs-doc-glow2:       rgba(1, 155, 225, 0.03);
}
[data-theme="dark"] body.doc--users {
  --bs-doc-accent:      #20BBEC;
  --bs-doc-accent-glow: #20BBEC;
  --bs-doc-active:      #019BE1;
  --bs-doc-sel:         rgba(32, 187, 236, 0.30);
  --bs-doc-glow1:       rgba(32, 187, 236, 0.10);
  --bs-doc-glow2:       rgba(49, 149, 255, 0.07);
}
body.doc--dev {
  --bs-doc-accent:      #5E7CE1;
  --bs-doc-accent-glow: transparent;
  --bs-doc-active:      #5E7CE1;
  --bs-doc-sel:         rgba(94, 124, 225, 0.18);
  --bs-doc-glow1:       rgba(94, 124, 225, 0.05);
  --bs-doc-glow2:       rgba(0, 98, 202, 0.03);
}
[data-theme="dark"] body.doc--dev {
  --bs-doc-accent:      #5E7CE1;
  --bs-doc-accent-glow: rgba(94, 124, 225, 0.5);
  --bs-doc-active:      #5E7CE1;
  --bs-doc-sel:         rgba(94, 124, 225, 0.28);
  --bs-doc-glow1:       rgba(94, 124, 225, 0.09);
  --bs-doc-glow2:       rgba(49, 149, 255, 0.06);
}

/* Свечение в углах вместо сетки: документные страницы прототипа используют
   два радиальных пятна, а не координатную сетку. Перекрываем body::before. */
body.doc::before,
body.doc::after {
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
  content: "";
  border-radius: 50%;
  background-image: none;
  background-size: auto;
  mask-image: none;
  -webkit-mask-image: none;
  transition: background 0.25s;
}

body.doc::before {
  top: -18%;
  right: -14%;
  width: 65vw;
  height: 65vw;
  background-image: radial-gradient(circle, var(--bs-doc-glow1) 0%, transparent 62%);
}

body.doc::after {
  bottom: -18%;
  left: -14%;
  width: 55vw;
  height: 55vw;
  background-image: radial-gradient(circle, var(--bs-doc-glow2) 0%, transparent 62%);
}

body.doc ::selection {
  background: var(--bs-doc-sel);
  color: var(--bs-landing-ink);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bs-landing-page, var(--bs-blue-900));
  color: var(--bs-landing-ink, var(--bs-fg-1));
  scroll-behavior: smooth;
  transition: background 0.25s, color 0.25s;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--bs-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--bs-landing-sub, var(--bs-fg-2));
  background: var(--bs-landing-page, #001B4F);
  transition: background 0.25s, color 0.25s;
}

/* Кнопка-переключатель темы — на токенах --bs-landing-* */
.theme-toggle {
  background: none;
  border: 1px solid var(--bs-landing-border);
  border-radius: var(--bs-radius-pill);
  color: inherit;
  cursor: pointer;
  font-size: var(--bs-font-size-lg, 16px);
  padding: 4px 12px;
  transition: opacity 180ms ease;
  line-height: 1.5;
}

.theme-toggle:hover {
  opacity: 0.8;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image: var(--bs-landing-grid,
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px));
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 75%);
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--bs-cyan-glow);
  outline-offset: 4px;
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: clip;
}

/* Главная: герой занимает весь экран под шапкой (родной поток v0.0.2 —
   landing это шапка плюс герой во всю высоту, без секций под ним). */
.page > main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 20px clamp(20px, 5vw, 64px);
  background: var(--bs-landing-header-bg, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bs-landing-bar-border, rgba(255, 255, 255, 0.06));
  transition: background 0.25s ease, border-color 0.25s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 26px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: 16px;
  padding: 0;
}

.site-nav a {
  padding: 0;
  color: var(--bs-landing-sub, var(--bs-fg-2));
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  white-space: nowrap;
  transition: color 180ms ease;
}

.site-nav a:hover {
  color: var(--bs-landing-ink, var(--bs-fg-1));
}

.site-nav a[aria-current="page"] {
  color: var(--bs-landing-ink, var(--bs-fg-1));
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Круглая иконочная кнопка переключения темы (солнце ↔ луна) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--bs-landing-border, rgba(255, 255, 255, 0.10));
  border-radius: 10px;
  background: var(--bs-landing-icon-bg, rgba(255, 255, 255, 0.03));
  color: var(--bs-landing-icon, var(--bs-fg-3));
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.theme-toggle:hover {
  background: var(--bs-landing-icon-bg-hover, rgba(255, 255, 255, 0.06));
  color: var(--bs-landing-ink, var(--bs-fg-1));
}

.theme-toggle svg {
  display: block;
}

/* Кнопка «Личный кабинет» — основная, инвертируется по теме
   (тёмная тема → белая кнопка, светлая → синяя) */
.cabinet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: var(--bs-landing-cabinet-fg, #06122F);
  background: var(--bs-landing-cabinet-bg, #FFFFFF);
  font: 500 14px/1 var(--bs-font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: filter 180ms ease;
}

.cabinet:hover {
  filter: brightness(1.08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 28px;
  border: 0;
  border-radius: var(--bs-radius-sm);
  color: var(--bs-fg-1);
  background: linear-gradient(180deg, #3195ff 0%, var(--bs-blue-300) 100%);
  box-shadow: 0 18px 42px -20px rgba(49, 149, 255, 0.9);
  font: 700 16px/22px var(--bs-font-display);
  cursor: pointer;
  transition: filter 180ms ease, transform 180ms ease;
}

.button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.button--ghost {
  border: 1px solid var(--bs-overlay-10);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

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

.hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: clamp(16px, 3vh, 40px) clamp(20px, 5vw, 64px) clamp(24px, 4vh, 56px);
  text-align: center;
}

.hero-copy {
  width: 100%;
  max-width: 820px;
}

.hero h1,
.doc-hero h1 {
  margin: 0;
  color: var(--bs-fg-1);
  font-family: var(--bs-font-display);
  font-size: clamp(38px, 4.3vw, 64px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hero h1 {
  max-width: 820px;
  margin: 0 auto 18px;
}

.accent {
  color: transparent;
  background: linear-gradient(180deg, #20BBEC, #3195FF 60%, #0045BE);
  background-clip: text;
  -webkit-background-clip: text;
}

.desktop-nowrap {
  white-space: nowrap;
}

.lead {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--bs-fg-2);
  font-size: 20px;
  line-height: 1.5;
  text-wrap: pretty;
}

.widget-shell {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 40px 20px;
  border-radius: 32px;
}

.hero .widget-shell {
  width: 100%;
}

.widget-shell::before {
  position: absolute;
  top: -40px;
  left: 50%;
  z-index: -1;
  width: min(680px, 100vw);
  height: min(680px, 100vw);
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 187, 236, 0.28) 0%, rgba(32, 187, 236, 0) 60%);
  transform: translateX(-50%);
}

#widget-root {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: min(78vh, 660px);
  color: var(--bs-fg-2);
}

#widget-root > * {
  max-width: 900px !important;
  margin: 0 auto;
}

#widget-root,
#widget-root * {
  text-align: left;
}

.widget-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 900px);
  min-height: 536px;
  padding: 24px;
  border: 1px solid rgba(49, 149, 255, 0.25);
  border-radius: var(--bs-radius-md);
  color: var(--bs-fg-2);
  background: rgba(16, 37, 90, 0.9);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.widget-fallback,
.widget-fallback * {
  text-align: center;
}

.widget-fallback[data-state="error"] {
  color: var(--bs-fg-1);
}

.widget-fallback[data-state="error"] .widget-spinner {
  display: none;
}

.widget-spinner {
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(32, 187, 236, 0.18);
  border-top-color: var(--bs-cyan-glow);
  border-radius: 50%;
  animation: widget-spin 900ms linear infinite;
}

@keyframes widget-spin {
  to {
    transform: rotate(1turn);
  }
}

.doc-card h2 {
  margin: 22px 0 10px;
  color: var(--bs-fg-1);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.doc-card p,
.article p,
.article li {
  margin: 0;
  color: var(--bs-fg-2);
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 228px;
  gap: 52px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px 0 96px;
  width: 100%;
}

.on-this-page {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 0;
  border-left: none;
}

.on-this-page h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--bs-landing-micro);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}

.on-this-page ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.on-this-page a {
  display: block;
  padding: 5px 0 5px 10px;
  color: var(--bs-landing-micro);
  font-size: 12.5px;
  line-height: 1.45;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.on-this-page a:hover {
  color: var(--bs-landing-ink);
}

.on-this-page a.active {
  color: var(--bs-landing-ink);
  border-left-color: var(--bs-doc-active);
}

.doc-main {
  min-width: 0;
  max-width: 720px;
}

/* ────── Breadcrumb ────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--bs-landing-micro);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--bs-landing-micro);
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--bs-landing-ink);
}

.breadcrumb .sep {
  color: var(--bs-landing-faint);
}

/* ────── Eyebrow ────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--bs-doc-accent, var(--bs-landing-eyebrow-fg));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--bs-doc-accent, var(--bs-landing-eyebrow-fg));
  border-radius: 50%;
  box-shadow: 0 0 10px var(--bs-doc-accent-glow, transparent);
}

/* ────── Meta row ────── */
.meta-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 22px 0 0;
  padding: 14px 0;
  border-top: 1px solid var(--bs-landing-border);
  border-bottom: 1px solid var(--bs-landing-border);
  font-size: 13px;
  color: var(--bs-landing-micro);
  transition: border-color 0.25s;
}

.meta-row span {
  display: inline-flex;
  gap: 6px;
}

.meta-row span b {
  color: var(--bs-landing-ink);
  font-weight: 500;
}

/* ────── Section number ────── */
.section-no {
  color: var(--bs-landing-faint);
  font-variant-numeric: tabular-nums;
  margin-right: 12px;
  font-weight: 400;
}

/* ────── Doc table ────── */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 14px;
  background: var(--bs-doc-tbl-bg);
  border: 1px solid var(--bs-doc-tbl-bdr);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s;
}

.doc-table th,
.doc-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--bs-doc-tbl-row-bdr);
  vertical-align: top;
  color: var(--bs-landing-sub);
}

.doc-table tr:last-child th,
.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table th {
  font-family: var(--bs-font-display);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-landing-micro);
  background: var(--bs-doc-tbl-hd-bg);
}

.doc-table td:first-child {
  color: var(--bs-landing-ink);
  font-weight: 500;
}

/* Architecture image */
.arch-img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: var(--bs-radius-md);
  border: 1px solid var(--bs-doc-arch-bdr);
  margin: 14px 0 20px;
  background: var(--bs-doc-arch-bg);
  transition: background 0.25s, border-color 0.25s;
}

.doc-hero {
  max-width: 720px;
  padding-bottom: 36px;
}

.doc-hero h1 {
  color: var(--bs-landing-ink);
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
  text-wrap: balance;
  margin: 0 0 14px;
}

.doc-hero .lead {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--bs-landing-sub);
  margin: 0;
  max-width: 640px;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--bs-fg-3);
  font-size: 13px;
}

.crumb a {
  color: var(--bs-fg-2);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0 42px;
}

.doc-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--bs-overlay-10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
}

.article {
  max-width: 720px;
}

.article h2 {
  margin: 60px 0 16px;
  padding-top: 14px;
  border-top: 1px solid var(--bs-landing-border);
  color: var(--bs-landing-ink);
  font-family: var(--bs-font-display);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.012em;
  scroll-margin-top: 96px;
  transition: border-color 0.25s;
}

.article h3 {
  margin: 34px 0 10px;
  color: var(--bs-landing-ink);
  font-family: var(--bs-font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 96px;
}

.article p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--bs-landing-sub);
  margin: 0 0 14px;
  text-wrap: pretty;
}

.article p + p {
  margin-top: 0;
}

.article ul,
.article ol {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--bs-landing-sub);
}

.article li {
  margin: 0 0 5px;
}

.article li::marker {
  color: var(--bs-landing-faint);
}

.article strong {
  color: var(--bs-landing-ink);
  font-weight: 600;
}

.article a {
  color: var(--bs-blue-100);
  border-bottom: 1px solid rgba(1, 155, 225, 0.3);
  transition: border-color 0.15s;
}

.article a:hover {
  border-bottom-color: var(--bs-blue-100);
}

.callout {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 13px;
  margin: 14px 0 18px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 1.6;
}

.callout p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: var(--bs-landing-sub);
}

.callout strong {
  color: var(--bs-landing-ink);
}

.callout .icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
  flex: 0 0 22px;
  margin-top: 1px;
}

.callout--note {
  background: var(--bs-doc-callout-note-bg);
  border-color: var(--bs-doc-callout-note-bdr);
}

.callout--note .icon {
  background: var(--bs-blue-300);
  color: #fff;
}

.callout--tip {
  background: var(--bs-doc-callout-tip-bg);
  border-color: var(--bs-doc-callout-tip-bdr);
}

.callout--tip .icon {
  background: var(--bs-lime);
  color: var(--bs-bg-deep);
}

.callout--warning {
  background: var(--bs-doc-callout-warn-bg);
  border-color: var(--bs-doc-callout-warn-bdr);
}

.callout--warning .icon {
  background: var(--bs-orange);
  color: var(--bs-bg-deep);
}

.callout--danger {
  background: var(--bs-doc-callout-danger-bg);
  border-color: var(--bs-doc-callout-danger-bdr);
}

.callout--danger .icon {
  background: var(--bs-coral);
  color: #fff;
}

.callout--dev {
  background: rgba(94, 124, 225, 0.09);
  border-color: rgba(94, 124, 225, 0.34);
}

.callout--dev .icon {
  background: var(--bs-periwinkle);
  color: #fff;
}

.params {
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--bs-overlay-10);
  border-radius: 18px;
}

.params-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  padding: 16px 18px;
  border-top: 1px solid var(--bs-overlay-10);
}

.params-row:first-child {
  border-top: 0;
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 760px;
  margin-top: 52px;
}

.prev-next a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--bs-doc-pn-bdr);
  border-radius: 8px;
  background: var(--bs-doc-pn-bg);
  color: var(--bs-landing-ink);
  transition: background 0.18s, border-color 0.18s;
}

.prev-next a:hover {
  background: var(--bs-doc-pn-bg-h);
  border-color: var(--bs-doc-pn-bdr-h);
}

.prev-next .label {
  color: var(--bs-landing-micro);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prev-next .title {
  display: block;
  margin-top: 4px;
  color: var(--bs-landing-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}

.prev-next .next {
  text-align: right;
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--bs-doc-code-fg);
  background: var(--bs-doc-code-bg);
  border: 1px solid var(--bs-doc-code-bdr);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  transition: background 0.25s, color 0.25s;
}

pre {
  position: relative;
  margin: 14px 0 20px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--bs-doc-pre-bdr);
  border-radius: 8px;
  background: var(--bs-doc-pre-bg);
  color: var(--bs-doc-pre-fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  transition: background 0.25s, border-color 0.25s;
}

pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 0;
  right: 12px;
  transform: translateY(-50%);
  padding: 2px 8px;
  border: 1px solid var(--bs-doc-pre-bdr);
  border-radius: 4px;
  background: var(--bs-doc-pre-bg);
  color: var(--bs-landing-micro);
  font-family: var(--bs-font-body);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.25s, border-color 0.25s;
}

pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 18px 20px;
  border-top: 1px solid var(--bs-landing-border);
  color: var(--bs-landing-faint);
  font-size: 12.5px;
  text-align: center;
  transition: border-color 0.25s;
}

@media (max-width: 1180px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .on-this-page {
    display: none;
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: clamp(24px, 4vh, 40px);
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: center;
    flex-wrap: wrap;
    row-gap: 18px;
  }

  .site-nav {
    order: 3;
    justify-content: center;
    width: 100%;
    margin-left: 0;
    gap: clamp(12px, 5vw, 24px);
  }

  .site-nav a {
    min-width: 0;
    font-size: 13px;
    text-align: center;
    overflow-wrap: normal;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .site-header,
  .section,
  .site-footer {
    width: 100%;
  }

  .brand img {
    width: auto;
    height: 26px;
  }

  .header-actions {
    margin-left: auto;
  }

  .desktop-nowrap {
    white-space: normal;
  }

  .site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 14px;
    row-gap: 4px;
  }

  .site-nav a {
    flex: 0 1 auto;
    padding-right: 0;
    padding-left: 0;
    font-size: 12px;
  }

  .button {
    min-height: 46px;
    padding: 11px 18px;
    font-size: 14px;
  }

  .hero h1,
  .doc-hero h1 {
    font-size: 32px;
  }

  .hero {
    padding-top: 24px;
  }

  .lead {
    font-size: 18px;
  }

  #widget-root {
    min-height: 520px;
  }

  .doc-grid {
    grid-template-columns: 1fr;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

  .prev-next .next {
    text-align: left;
  }

  .params-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Главная (index.html): виджет во всё окно ПОД шапкой (родной поток v0.0.2).
   Шапка остаётся сверху, ниже виджет занимает всю ширину и всю оставшуюся
   высоту; внутренний топбар, двухколоночное тело и панель «Что понял ИИ» —
   часть самого виджета (mode=fullscreen). Высоту виджета задаём как остаток
   вьюпорта минус шапка через --bs-fullscreen-block-size (наследуется в Shadow
   Root). Правила скоупом .page--widget, чтобы не задеть страницы документации.
   ────────────────────────────────────────────────────────────────────────── */
.page--widget {
  height: 100dvh;
  overflow: hidden;
}

.page--widget > main,
.page--widget .section.hero,
.page--widget .widget-shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 0;
  border-radius: 0;
}

.page--widget .widget-shell::before {
  display: none;
}

.page--widget #widget-root {
  --bs-fullscreen-block-size: calc(100dvh - var(--bs-landing-header-h, 81px));
  display: block;
  width: 100%;
  min-height: 0;
}

.page--widget #widget-root > * {
  max-width: 100% !important;
  margin: 0;
}
