:root{--n-0:oklch(1 0 0);--n-50:oklch(0.973 0.007 269);--n-100:oklch(0.958 0.009 265);--n-150:oklch(0.937 0.013 267);--n-200:oklch(0.924 0.013 262);--n-300:oklch(0.865 0.021 262);--n-400:oklch(0.704 0.038 264);--n-500:oklch(0.513 0.042 265);--n-600:oklch(0.438 0.041 265);--n-700:oklch(0.354 0.042 266);--n-900:oklch(0.211 0.051 267);--brand:oklch(0.546 0.215 263);--brand-hover:oklch(0.488 0.217 264);--brand-foreground:oklch(1 0 0);--primary-solid:var(--brand);--primary-solid-hover:var(--brand-hover);--primary-solid-foreground:var(--brand-foreground);--primary:oklch(0.546 0.215 263);--primary-hover:oklch(0.488 0.217 264);--primary-foreground:oklch(1 0 0);--primary-soft:oklch(0.957 0.020 264);--primary-border:oklch(0.820 0.083 264);--background:var(--n-50);--foreground:var(--n-900);--surface:var(--n-0);--surface-sunken:var(--n-100);--muted:var(--n-100);--muted-foreground:var(--n-500);--subtle-foreground:var(--n-400);--border:var(--n-200);--border-strong:var(--n-300);--divider:oklch(0.955 0.009 265);--row-hover:oklch(0.979 0.006 265);--row-selected:var(--primary-soft);--ring:var(--primary);--card:var(--surface);--card-foreground:var(--foreground);--popover:var(--surface);--popover-foreground:var(--foreground);--secondary:var(--n-100);--secondary-foreground:var(--n-900);--accent:var(--n-100);--accent-foreground:var(--n-900);--input:var(--border-strong);--destructive:oklch(0.535 0.203 28);--destructive-foreground:oklch(1 0 0);--rail-width:240px;--rail-bg:oklch(0.195 0.061 269);--rail-fg:oklch(0.846 0.038 270);--rail-fg-strong:oklch(1 0 0);--rail-muted:oklch(0.689 0.053 270);--rail-hover-bg:oklch(0.250 0.080 270);--rail-active-bg:var(--brand);--rail-active-fg:oklch(1 0 0);--rail-border:oklch(0.279 0.081 271);--rail-accent:oklch(0.797 0.134 212);--st-success-fg:oklch(0.510 0.131 150);--st-success-bd:oklch(0.865 0.081 156);--st-success-bg:oklch(0.962 0.043 157);--st-failed-fg:oklch(0.535 0.203 28);--st-failed-bd:oklch(0.832 0.075 19);--st-failed-bg:oklch(0.936 0.031 18);--st-indeterminate-fg:oklch(0.524 0.121 62);--st-indeterminate-bd:oklch(0.606 0.136 65);--st-indeterminate-bg:oklch(0.962 0.058 96);--st-progress-fg:oklch(0.488 0.217 264);--st-progress-bd:oklch(0.820 0.083 264);--st-progress-bg:oklch(0.932 0.032 256);--st-neutral-fg:var(--n-600);--st-neutral-bd:var(--n-300);--st-neutral-bg:var(--n-100);--series-a:oklch(0.596 0.127 163);--series-b:oklch(0.511 0.230 277);--seg-bg:oklch(0.929 0.034 271);--seg-fg:oklch(0.379 0.138 266);--radius-sm:7px;--radius:10px;--radius-md:14px;--shadow-card:0 1px 2px oklch(0.211 0.051 267 / 0.04), 0 1px 3px oklch(0.211 0.051 267 / 0.05);--shadow-overlay:0 2px 4px oklch(0.211 0.051 267 / 0.06), 0 12px 32px oklch(0.211 0.051 267 / 0.12);--shadow-hairline:0 1px 0 var(--border);--row-height:36px;--row-height-hd:32px;--motion-fast:120ms;--motion-ease:cubic-bezier(0.32, 0.72, 0, 1)}
:root[data-theme='dark']{--n-50:oklch(0.162 0.041 270);--n-0:oklch(0.203 0.059 269);--n-100:oklch(0.235 0.066 270);--n-150:oklch(0.267 0.076 269);--n-200:oklch(0.287 0.076 270);--n-300:oklch(0.352 0.087 270);--n-400:oklch(0.585 0.070 270);--n-500:oklch(0.721 0.055 269);--n-600:oklch(0.778 0.048 269);--n-700:oklch(0.862 0.036 270);--n-900:oklch(0.962 0.018 272);--primary:oklch(0.729 0.140 264);--primary-hover:oklch(0.799 0.101 264);--primary-foreground:oklch(0.203 0.063 267);--primary-soft:oklch(0.269 0.085 267);--primary-border:oklch(0.449 0.152 267);--surface-sunken:var(--n-50);--divider:oklch(0.249 0.069 270);--row-hover:oklch(0.225 0.063 269);--destructive:var(--st-failed-fg);--destructive-foreground:oklch(0.209 0.047 18);--st-success-fg:oklch(0.800 0.182 152);--st-success-bd:oklch(0.471 0.096 157);--st-success-bg:oklch(0.313 0.059 161);--st-failed-fg:oklch(0.711 0.166 22);--st-failed-bd:oklch(0.405 0.111 19);--st-failed-bg:oklch(0.270 0.070 15);--st-indeterminate-fg:oklch(0.837 0.164 84);--st-indeterminate-bd:oklch(0.729 0.145 78);--st-indeterminate-bg:oklch(0.342 0.066 80);--st-progress-fg:oklch(0.729 0.141 258);--st-progress-bd:oklch(0.443 0.128 263);--st-progress-bg:oklch(0.308 0.093 262);--series-a:oklch(0.773 0.153 163);--series-b:oklch(0.681 0.169 275);--seg-bg:var(--brand);--seg-fg:oklch(1 0 0);--shadow-card:0 0 0 oklch(0 0 0 / 0);--shadow-overlay:0 2px 4px oklch(0 0 0 / 0.35), 0 16px 40px oklch(0 0 0 / 0.55)}
@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-cyrillic-ext-wght-normal.woff2) format('woff2-variations');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-cyrillic-wght-normal.woff2) format('woff2-variations');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');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:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations');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:'Manrope Variable';font-style:normal;font-display:swap;font-weight:200 800;src:url(fonts/manrope-cyrillic-ext-wght-normal.woff2) format('woff2-variations');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Manrope Variable';font-style:normal;font-display:swap;font-weight:200 800;src:url(fonts/manrope-cyrillic-wght-normal.woff2) format('woff2-variations');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Manrope Variable';font-style:normal;font-display:swap;font-weight:200 800;src:url(fonts/manrope-latin-ext-wght-normal.woff2) format('woff2-variations');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 Variable';font-style:normal;font-display:swap;font-weight:200 800;src:url(fonts/manrope-latin-wght-normal.woff2) format('woff2-variations');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:'IBM Plex Mono';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/ibm-plex-mono-cyrillic-ext-400-normal.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:'IBM Plex Mono';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/ibm-plex-mono-cyrillic-400-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/ibm-plex-mono-latin-ext-400-normal.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:'IBM Plex Mono';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/ibm-plex-mono-latin-400-normal.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:'IBM Plex Mono';font-style:normal;font-display:swap;font-weight:500;src:url(fonts/ibm-plex-mono-cyrillic-ext-500-normal.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:'IBM Plex Mono';font-style:normal;font-display:swap;font-weight:500;src:url(fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-display:swap;font-weight:500;src:url(fonts/ibm-plex-mono-latin-ext-500-normal.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:'IBM Plex Mono';font-style:normal;font-display:swap;font-weight:500;src:url(fonts/ibm-plex-mono-latin-500-normal.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}


.brand-loader {
  
  --bl-rim: #a9b9e8;
  --bl-body-a: #f6f8ff;
  --bl-body-b: #d6e0f7;
  --bl-body-c: #eaf0fd;
  --bl-shine: #ffffff;
  display: block;
  overflow: visible;
}

:root[data-theme='dark'] .brand-loader {
  --bl-rim: #4c5fa8;
  --bl-body-a: #22326c;
  --bl-body-b: #0c1432;
  --bl-body-c: #172452;
  --bl-shine: #93a6ec;
}

.brand-loader path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.brand-loader clipPath path {
  fill: #fff;
  stroke: none;
}


.brand-loader mask path {
  stroke: #000;
}

.brand-loader .bl-rim {
  stroke: var(--bl-rim);
}

.brand-loader .bl-shine {
  stroke: var(--bl-shine);
  opacity: 0.9;
}

.brand-loader .bl-shine--low {
  opacity: 0.45;
}

.brand-loader .bl-stop-a {
  stop-color: var(--bl-body-a);
}

.brand-loader .bl-stop-b {
  stop-color: var(--bl-body-b);
}

.brand-loader .bl-stop-c {
  stop-color: var(--bl-body-c);
}




.brand-loader__rise {
  animation: bl-rise 0.9s cubic-bezier(0.4, 0, 0.25, 1) 0.08s both;
}

.brand-loader__unrise {
  animation: bl-unrise 0.9s cubic-bezier(0.4, 0, 0.25, 1) 0.08s both;
}


.brand-loader__wave {
  animation: bl-wave 1.1s linear infinite;
}

.brand-loader__unwave {
  animation: bl-unwave 1.1s linear infinite;
}


.brand-loader--loop .brand-loader__rise {
  animation: bl-rise 1.15s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

.brand-loader--loop .brand-loader__unrise {
  animation: bl-unrise 1.15s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}


#boot-splash .brand-loader {
  animation: bl-glow 1.9s ease-in-out 1s infinite;
}


@keyframes bl-rise {
  from {
    transform: translateY(302px);
  }
  to {
    transform: translateY(-8px);
  }
}

@keyframes bl-unrise {
  from {
    transform: translateY(-302px);
  }
  to {
    transform: translateY(8px);
  }
}

@keyframes bl-wave {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-150px);
  }
}

@keyframes bl-unwave {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(150px);
  }
}

@keyframes bl-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgb(22 104 255 / 0));
  }
  50% {
    filter: drop-shadow(0 8px 18px rgb(22 104 255 / 0.34));
  }
}



#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f4f6fb;
  opacity: 1;
  transition:
    opacity 0.36s ease,
    visibility 0s linear 0.36s;
}

:root[data-theme='dark'] #boot-splash {
  background: #070c1f;
}

#boot-splash .brand-loader {
  width: 132px;
  height: 132px;
  transition: transform 0.36s cubic-bezier(0.2, 0.7, 0.2, 1);
}


#boot-splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#boot-splash.is-done .brand-loader {
  transform: scale(1.1);
}


#boot-splash .boot-message {
  position: absolute;
  top: calc(50% + 96px);
  left: 50%;
  width: min(30rem, 100vw - 48px);
  margin: 0;
  transform: translateX(-50%);
  font:
    500 14px/1.5 system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  text-align: center;
  color: #5b6680;
  opacity: 0;
  visibility: hidden;
}

:root[data-theme='dark'] #boot-splash .boot-message {
  color: #9aa6c8;
}


#boot-splash .boot-message--slow {
  animation: boot-late 0.4s ease 12s forwards;
}

@keyframes boot-late {
  to {
    opacity: 1;
    visibility: visible;
  }
}


#boot-splash.is-failed {
  transition: none;
}

#boot-splash.is-failed .boot-message--failed {
  opacity: 1;
  visibility: visible;
}


#boot-splash.is-crashed .boot-message--failed {
  opacity: 0;
  visibility: hidden;
}

#boot-splash.is-crashed .boot-message--crashed {
  opacity: 1;
  visibility: visible;
}

#boot-splash.is-failed .boot-message--slow {
  animation: none;
}

#boot-splash.is-failed .brand-loader,
#boot-splash.is-failed .brand-loader__rise,
#boot-splash.is-failed .brand-loader__unrise,
#boot-splash.is-failed .brand-loader__wave,
#boot-splash.is-failed .brand-loader__unwave {
  animation: none;
}

#boot-splash.is-failed .brand-loader__rise {
  transform: translateY(302px);
}

#boot-splash.is-failed .brand-loader__unrise {
  transform: translateY(-302px);
}


@media (prefers-reduced-motion: reduce) {
  .brand-loader__rise,
  .brand-loader--loop .brand-loader__rise {
    animation: none;
    transform: translateY(-8px);
  }

  .brand-loader__unrise,
  .brand-loader--loop .brand-loader__unrise {
    animation: none;
    transform: translateY(8px);
  }

  .brand-loader__wave,
  .brand-loader__unwave,
  #boot-splash .brand-loader {
    animation: none;
  }

  #boot-splash,
  #boot-splash .brand-loader {
    transition: none;
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   Сайт документации Plutera: стили.

   Цвета, радиусы и тени здесь не заданы: это токены темы консоли
   (web/src/styles/theme.css, решение 019), сборка кладёт их перед этим
   файлом вместе с правилами шрифтов. Здесь только раскладка и то, чего
   у консоли нет: текст для чтения, примеры, таблицы справочника.

   Что повторяет консоль: тёмное меню слева со знаком, одинаковое в обеих
   темах; активный пункт синей плашкой с бирюзовой полоской; карточки 14px,
   контролы 10px, чипы 7px; Inter, Manrope, IBM Plex Mono.

   Янтарный оставлен за тем же, за чем он в консоли: за неопределённостью.
   Выноска warning и ответы 5xx янтарные, потому что обе говорят «исход
   неизвестен, это ещё не отказ».

   Внешних адресов и встроенных в разметку стилей нет: сайт отдаётся под
   style-src 'self'.
   ──────────────────────────────────────────────────────────────────────────── */

:root {
  --doc-font: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --doc-display: 'Manrope Variable', 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
  --doc-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --doc-rail: 272px;
  --doc-toc: 232px;
  --doc-text: 760px;
  /* Цвета подсветки примеров: имена состояний консоли, чтобы тёмная тема переключала их сама. */
  --tok-key: var(--primary);
  --tok-str: var(--st-success-fg);
  --tok-num: var(--st-indeterminate-fg);
  --tok-lit: var(--st-failed-fg);
  --tok-dim: var(--muted-foreground);
}

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

html {
  font-size: 16px;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--doc-font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--primary-border);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-hover);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--brand);
  color: var(--brand-foreground);
  border-radius: var(--radius);
}

.skip:focus {
  left: 8px;
}

.icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* ── Раскладка ─────────────────────────────────────────────────────────────── */

.shell {
  display: grid;
  grid-template-columns: var(--doc-rail) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  background: var(--rail-bg);
  color: var(--rail-fg);
  border-right: 1px solid var(--rail-border);
  padding: 22px 14px 28px;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--rail-fg-strong);
  text-decoration: none;
}

.brand:hover {
  color: var(--rail-fg-strong);
}

.brand-glyph {
  width: 38px;
  height: 38px;
  flex: none;
  /* Зазор между потоком и ножкой буквы рисуется цветом подложки. */
  color: var(--rail-bg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--doc-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.brand-tag {
  margin-top: 3px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rail-muted);
}

.rail-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rail-border);
  color: var(--rail-fg);
  border-radius: var(--radius);
  padding: 8px;
  cursor: pointer;
}

.rail-section + .rail-section {
  margin-top: 22px;
}

.rail-title {
  margin: 0 0 6px;
  padding: 0 12px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rail-muted);
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-link {
  position: relative;
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--rail-fg);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.35;
}

.rail-link:hover {
  background: var(--rail-hover-bg);
  color: var(--rail-fg-strong);
}

.rail-link[aria-current='page'] {
  background: var(--rail-active-bg);
  color: var(--rail-active-fg);
  font-weight: 600;
}

.rail-link[aria-current='page']::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--rail-accent);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 40px 0;
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--doc-toc);
  gap: 48px;
  padding: 18px 40px 64px;
  max-width: calc(var(--doc-text) + var(--doc-toc) + 48px + 80px);
}

.content {
  min-width: 0;
  max-width: var(--doc-text);
}

/* ── Поиск и кнопки ────────────────────────────────────────────────────────── */

.search {
  position: relative;
  width: min(360px, 100%);
  display: none;
}

.js .search {
  display: block;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted-foreground);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 0.94rem;
}

.search-box input::placeholder {
  color: var(--muted-foreground);
}

.search-results {
  position: absolute;
  z-index: 5;
  top: 46px;
  left: 0;
  right: 0;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-overlay);
  padding: 6px;
}

.search-hit {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--foreground);
  text-decoration: none;
}

.search-hit:hover,
.search-hit[aria-selected='true'] {
  background: var(--primary-soft);
  color: var(--foreground);
}

.search-hit-title {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
}

.search-hit-text {
  display: block;
  font-size: 0.82rem;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-empty {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--muted-foreground);
}

.icon-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: pointer;
}

.js .icon-button {
  display: inline-flex;
  flex-shrink: 0;
}

.icon-button:hover {
  color: var(--foreground);
  background: var(--muted);
}

.button {
  display: inline-block;
  padding: 10px 18px;
  background: var(--brand);
  color: var(--brand-foreground);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.button:hover {
  background: var(--brand-hover);
  color: var(--brand-foreground);
}

/* ── Текст ─────────────────────────────────────────────────────────────────── */

.doc h1,
.doc h2,
.doc h3,
.doc h4 {
  font-family: var(--doc-display);
  color: var(--foreground);
  line-height: 1.25;
  letter-spacing: -0.01em;
  position: relative;
}

.doc h1 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 700;
}

.lead {
  margin: 10px 0 30px;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}

.doc h2 {
  margin: 46px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 1.5rem;
  font-weight: 700;
}

.doc h3 {
  margin: 32px 0 10px;
  font-size: 1.16rem;
  font-weight: 700;
}

.doc h4 {
  margin: 24px 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.anchor {
  position: absolute;
  left: -1.1em;
  width: 1em;
  color: var(--subtle-foreground);
  text-decoration: none;
  opacity: 0;
}

.doc h2:hover .anchor,
.doc h3:hover .anchor,
.doc h4:hover .anchor,
.anchor:focus {
  opacity: 1;
}

.doc p {
  margin: 0 0 16px;
}

.doc ul,
.doc ol {
  margin: 0 0 16px;
  padding-left: 1.4em;
}

.doc li {
  margin: 6px 0;
}

.doc li > p {
  margin-bottom: 8px;
}

.doc hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.doc strong {
  font-weight: 650;
}

.dim {
  color: var(--subtle-foreground);
}

code {
  font-family: var(--doc-mono);
  font-size: 0.875em;
}

.doc :not(pre) > code {
  padding: 2px 6px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  word-break: break-word;
}

.doc a > code {
  color: inherit;
}

/* ── Примеры ───────────────────────────────────────────────────────────────── */

.code {
  position: relative;
  margin: 0 0 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.code figcaption {
  padding: 9px 16px;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.code pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--doc-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  tab-size: 2;
}

.code pre code {
  font-size: inherit;
}

.copy {
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  opacity: 0;
}

.code:hover .copy,
.copy:focus-visible {
  opacity: 1;
}

.copy:hover {
  color: var(--foreground);
}

.t-key,
.t-flag {
  color: var(--tok-key);
}

.t-str {
  color: var(--tok-str);
}

.t-num,
.t-var {
  color: var(--tok-num);
}

.t-lit {
  color: var(--tok-lit);
}

.t-pun,
.t-com {
  color: var(--tok-dim);
}

.t-cmd {
  font-weight: 500;
}

/* ── Таблицы ───────────────────────────────────────────────────────────────── */

.table-wrap {
  margin: 0 0 20px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--divider);
}

th {
  background: var(--muted);
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.fields .field-name {
  white-space: nowrap;
}

.fields .field-parent {
  font-family: var(--doc-mono);
  font-size: 0.8em;
  color: var(--subtle-foreground);
}

.fields .field-type {
  color: var(--muted-foreground);
  width: 26%;
  min-width: 150px;
}

.fields .field-presence {
  color: var(--muted-foreground);
  white-space: nowrap;
}

.fields th:last-child {
  width: 40%;
}

.fields .field-flags,
.fields .field-values {
  display: block;
  margin-top: 3px;
  font-size: 0.86em;
}

.fields .field-values code {
  margin-right: 4px;
}

.fields .depth-1 .field-name {
  padding-left: 26px;
}

.fields .depth-2 .field-name {
  padding-left: 38px;
}

.fields .depth-3 .field-name {
  padding-left: 50px;
}

/* ── Справочник ────────────────────────────────────────────────────────────── */

.endpoint-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.doc .endpoint-line .endpoint-path {
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 1rem;
  font-weight: 500;
}

.endpoint-since {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.method,
.status {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--doc-mono);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.method-get {
  color: var(--st-progress-fg);
  background: var(--st-progress-bg);
  border-color: var(--st-progress-bd);
}

.method-post,
.method-put,
.method-patch {
  color: var(--st-success-fg);
  background: var(--st-success-bg);
  border-color: var(--st-success-bd);
}

.method-delete {
  color: var(--st-failed-fg);
  background: var(--st-failed-bg);
  border-color: var(--st-failed-bd);
}

.status-ok {
  color: var(--st-success-fg);
  background: var(--st-success-bg);
  border-color: var(--st-success-bd);
}

.status-client {
  color: var(--st-failed-fg);
  background: var(--st-failed-bg);
  border-color: var(--st-failed-bd);
}

.status-server {
  color: var(--st-indeterminate-fg);
  background: var(--st-indeterminate-bg);
  border-color: var(--st-indeterminate-bd);
  border-style: dashed;
}

/* ── Выноски ───────────────────────────────────────────────────────────────── */

.callout {
  margin: 0 0 20px;
  padding: 14px 18px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
}

.callout > :last-child {
  margin-bottom: 0;
}

.doc .callout-title {
  margin-bottom: 6px;
  font-family: var(--doc-display);
  font-weight: 700;
}

.callout-important {
  background: var(--surface);
  border-color: var(--border);
  border-left: 4px solid var(--brand);
  box-shadow: var(--shadow-card);
}

.callout-warning {
  background: var(--st-indeterminate-bg);
  border: 1px dashed var(--st-indeterminate-bd);
}

.callout-warning .callout-title {
  color: var(--st-indeterminate-fg);
}

.callout-danger {
  background: var(--st-failed-bg);
  border-color: var(--st-failed-bd);
}

.callout-danger .callout-title {
  color: var(--st-failed-fg);
}

/* ── Оглавление страницы, соседние страницы, подвал ────────────────────────── */

.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  font-size: 0.86rem;
  line-height: 1.4;
}

.toc-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 1px solid transparent;
  color: var(--muted-foreground);
  text-decoration: none;
}

.toc .toc-l3 a {
  padding-left: 26px;
}

.toc a:hover {
  color: var(--foreground);
}

.toc a[aria-current='true'] {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

.pager-link:hover {
  border-color: var(--primary-border);
}

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

.pager-label {
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.pager-title {
  font-weight: 600;
  color: var(--foreground);
}

.foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.foot p {
  margin: 0 0 4px;
}

/* ── Страница «такой страницы нет» ─────────────────────────────────────────── */

.lost {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.lost-box {
  max-width: 460px;
  text-align: center;
}

.lost-mark {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: var(--rail-bg);
}

.lost-mark .brand-glyph {
  width: 52px;
  height: 52px;
}

.lost-box h1 {
  margin: 20px 0 8px;
  font-family: var(--doc-display);
  font-size: 1.7rem;
}

/* ── Узкие экраны ──────────────────────────────────────────────────────────── */

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

  .toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
    height: auto;
    padding: 14px 14px 10px;
    border-right: 0;
  }

  .rail-head {
    padding-bottom: 8px;
  }

  .js .rail-toggle {
    display: inline-flex;
  }

  .js .rail-nav {
    display: none;
    padding: 10px 0 12px;
  }

  .js [data-menu='open'] .rail-nav {
    display: block;
  }

  .topbar,
  .columns {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* Сжимается поиск, а не кнопки: шапка с выравниванием вправо иначе
     уезжала бы влево за край экрана. */
  .search {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }

  .js [data-menu='open'] .rail-nav {
    animation: page-enter 0.36s var(--ease-out-soft) backwards;
  }

  .doc h1 {
    font-size: 1.7rem;
  }

  .anchor {
    display: none;
  }

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

@media print {
  .rail,
  .topbar,
  .toc,
  .pager,
  .copy {
    display: none;
  }

  .shell {
    display: block;
  }

  .columns {
    display: block;
    padding: 0;
  }
}

/* ── Каталог отказов: пример под строкой ───────────────────────────────────── */

.cases .case td {
  border-bottom: 0;
}

.cases .case td p {
  margin: 0;
}

.cases .case-action {
  margin-top: 6px;
  color: var(--muted-foreground);
}

.doc .cases .case-code code {
  display: block;
  width: max-content;
  white-space: nowrap;
}

.doc .cases .case-code code + code {
  margin-top: 6px;
}

.cases .case-example td {
  padding: 0 14px 10px;
}

.cases details > summary {
  display: inline-block;
  padding: 2px 0;
  color: var(--primary);
  font-size: 0.86rem;
  cursor: pointer;
  list-style: none;
}

.cases details > summary::-webkit-details-marker {
  display: none;
}

.cases details > summary::before {
  content: '+ ';
  font-family: var(--doc-mono);
}

.cases details[open] > summary::before {
  content: '− ';
}

.cases details .code {
  margin: 8px 0 4px;
  box-shadow: none;
}

/* ── Переключатель языков ──────────────────────────────────────────────────── */

.lang-switch {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border-radius: calc(var(--radius) - 3px);
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.lang-link:hover {
  color: var(--foreground);
  background: var(--muted);
}

.lang-link[aria-current='true'] {
  color: var(--primary);
  background: var(--primary-soft);
}

/* Страница 404 одна на все языки: блок на язык. */
.lost-lang + .lost-lang {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* ── Движение: как у консоли ───────────────────────────────────────────────────
   Просьба владельца 13.11: переходы и загрузка такие же, как у консоли.
   Значения взяты оттуда: появление экрана из web/src/styles/motion.css
   (0.36 с, подъём на 0.75rem, мягкое торможение), нажатие из
   web/src/components/ui/button.tsx (сжатие до 0.97, переход 150 мс),
   полоса хода оттуда же (включается через 0.15 с, быстрый переход её
   не показывает). Знак заставки и его заливка описаны у консоли один раз,
   в web/public/brand-loader.css: сборка кладёт тот файл в эти стили как есть.

   Движется только появление: уходящая страница не анимируется, новая
   проявляется и чуть поднимается. Меню слева и шапка стоят на месте, как
   у консоли. После появления от анимации не остаётся ничего: заполнение
   только backwards, конечный кадр transform: none.

   ЗАСТАВКА только при первом открытии сайта во вкладке: решает
   theme-early.js до первого кадра (атрибут data-splash). Уходит она сама,
   когда знак залит: 0.08 с задержки и 0.9 с заливки по brand-loader.css.
   Скрипт сайта для этого не нужен, поэтому недоехавший скрипт не оставит
   страницу под заставкой. В тот же момент начинает появляться страница. */

:root {
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes content-reveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.page-enter {
  animation: page-enter 0.36s var(--ease-out-soft) backwards;
}

.search-results:not([hidden]),
.cases details[open] > .code {
  animation: content-reveal 0.3s ease-out backwards;
}

#boot-splash {
  display: none;
}

:root[data-splash] #boot-splash {
  display: flex;
  animation: docs-splash-out 0.36s ease 1s forwards;
}

:root[data-splash] #boot-splash .brand-loader {
  animation: docs-splash-mark 0.36s cubic-bezier(0.2, 0.7, 0.2, 1) 1s forwards;
}

:root[data-splash] .page-enter {
  animation-delay: 1s;
}

@keyframes docs-splash-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes docs-splash-mark {
  to {
    transform: scale(1.1);
  }
}

/* Полоса хода: страница заказана и едет (site.js). Окно прокручивается
   целиком, поэтому полоса прибита к верху окна над рабочей областью. */
.nav-progress {
  position: fixed;
  top: 0;
  left: var(--doc-rail);
  right: 0;
  z-index: 30;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.nav-progress::before {
  content: '';
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 38%;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-solid) 35%, var(--rail-accent) 75%, transparent);
  animation: nav-progress-run 1.05s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-play-state: paused;
}

.nav-progress-on {
  opacity: 1;
  transition: opacity 0.2s ease 0.15s;
}

.nav-progress-on::before {
  animation-play-state: running;
}

@keyframes nav-progress-run {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(264%);
  }
}

/* На узком экране меню стоит над страницей, а не слева: полоса во всю ширину. */
@media (max-width: 860px) {
  .nav-progress {
    left: 0;
  }
}

/* Нажатие и наведение плавные, за 150 мс; кнопка под пальцем чуть сжимается. */
.icon-button,
.rail-toggle,
.copy,
.button,
.lang-link {
  transition:
    background-color 0.15s ease-out,
    color 0.15s ease-out,
    border-color 0.15s ease-out,
    box-shadow 0.15s ease-out,
    transform 0.15s ease-out;
}

.icon-button:active,
.rail-toggle:active,
.copy:active,
.button:active,
.lang-link:active {
  transform: scale(0.97);
}

.rail-link,
.toc a,
.search-hit,
.pager-link,
.doc a,
.search-box {
  transition:
    background-color 0.15s ease-out,
    color 0.15s ease-out,
    border-color 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

/* Смена темы идёт без переходов, как у консоли: атрибут ставит site.js
   на два кадра вокруг смены data-theme, иначе всё перетекало бы из палитры
   в палитру. */
:root[data-theme-switching] *,
:root[data-theme-switching] *::before,
:root[data-theme-switching] *::after {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  /* Полоса без бега: ровная линия на всю ширину. */
  .nav-progress::before {
    width: 100%;
    animation: none !important;
  }
}
