/* Сайт UniCloud и страницы сервера (публикации, документация, правовые, статус, жалобы — src/api/site.ts).
   Бренд 2.0: чёрно-белый, шрифты Onest и JetBrains Mono, цвет только у состояний. Токены — docs/brand/tokens.json. */
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-ext-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-ext-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-ext-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-ext-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Onest; src: url(/fonts/onest-cyrillic-ext-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Onest; src: url(/fonts/onest-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; 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: Onest; src: url(/fonts/onest-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; 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: Onest; src: url(/fonts/onest-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; 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: Onest; src: url(/fonts/onest-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; 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: Onest; src: url(/fonts/onest-latin-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; 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: Onest; src: url(/fonts/onest-latin-ext-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; 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: Onest; src: url(/fonts/onest-latin-ext-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; 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: Onest; src: url(/fonts/onest-latin-ext-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; 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: Onest; src: url(/fonts/onest-latin-ext-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; 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: Onest; src: url(/fonts/onest-latin-ext-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; 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: 'JetBrains Mono'; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2713; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2713; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/jetbrains-mono-cyrillic-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/jetbrains-mono-cyrillic-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Noto Sans Arabic'; src: url(/fonts/noto-sans-arabic-arabic-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFC; }

/* Запасной шрифт под размер Onest: пока Onest грузится, строки переносятся так же, и страница не прыгает.
   Только латиница и кириллица: арабское письмо берёт Noto Sans Arabic. */
@font-face { font-family: 'Onest Fallback'; src: local('Arial'), local('Liberation Sans'), local('Helvetica'), local('Helvetica Neue'); size-adjust: 102%; unicode-range: U+0000-024F, U+0400-052F, U+2000-206F; }

/* Токены. Страницы сервера (публикации, документация, правовые) — светлые, тёмные по системе. Рекламные страницы
   (body.mk) собраны из полос двух видов: .dk — всегда тёмная «серверная» (первый экран, конвейер, CLI, финал, подвал),
   .pp — «бумага»: светлая, а в тёмной теме системы тёмная, но на ступень светлее серверной. Компоненты берут цвета
   из переменных, поэтому одна разметка правильно выглядит в любой полосе. */
:root {
  color-scheme: light;
  --ink: #0b0b0c;
  --bg: #ffffff;
  --surface: #f4f4f5;
  --raised: #ffffff;
  --line: #e4e4e7;
  --line-strong: #8a8a93;
  --muted: #5c5c63;
  --faint: #6b6b74;
  --dim: #b5b9bf;
  --led: #d5d8dc;
  --live: #15803d;
  --busy: #8f5506;
  --fail: #c2410c;
  --off: #6b6b74;
  --logo-filter: invert(1);
  --term-bg: #0c0d0f;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sans: Onest, 'Onest Fallback', 'Noto Sans Arabic', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f4f4f5;
    --bg: #0b0b0c;
    --surface: #141416;
    --raised: #1b1b1e;
    --line: #2a2a2e;
    --line-strong: #6b6b74;
    --muted: #a1a1aa;
    --faint: #8a8a93;
    --dim: #4a4e55;
    --led: #2a2d31;
    --live: #4ade80;
    --busy: #facc15;
    --fail: #fb923c;
    --off: #8a8a93;
    --logo-filter: none;
  }
}
/* Серверная: тёмная в любой теме. */
.dk {
  color-scheme: dark;
  --ink: #f3f4f5;
  --bg: #08090a;
  --surface: #111214;
  --raised: #141518;
  --line: #1f2125;
  --line-strong: #5a5e65;
  --muted: #8d929a;
  --faint: #7b8088;
  --dim: #3a3d42;
  --led: #2a2d31;
  --live: #2fd47a;
  --busy: #f5c542;
  --fail: #fb923c;
  --off: #5a5e65;
  --logo-filter: none;
  background: var(--bg);
  color: var(--ink);
}
/* Бумага: светлая; в тёмной теме системы — тёмная, на ступень светлее серверной. */
.pp {
  color-scheme: light;
  --ink: #0b0b0c;
  --bg: #f4f5f6;
  --surface: #e9ebee;
  --raised: #ffffff;
  --line: #dcdfe3;
  --line-strong: #8a8f96;
  --muted: #5b6068;
  --faint: #656a72;
  --dim: #b5b9bf;
  --led: #d5d8dc;
  --live: #15803d;
  --busy: #8f5506;
  --fail: #c2410c;
  --off: #8a8f96;
  --logo-filter: invert(1);
  background: var(--bg);
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  .pp {
    color-scheme: dark;
    --ink: #f3f4f5;
    --bg: #0f1012;
    --surface: #17181b;
    --raised: #141518;
    --line: #24272b;
    --line-strong: #5a5e65;
    --muted: #9a9fa7;
    --faint: #7d828a;
    --dim: #4a4e55;
    --led: #2a2d31;
    --live: #2fd47a;
    --busy: #f5c542;
    --fail: #fb923c;
    --off: #5a5e65;
    --logo-filter: none;
  }
}

* { box-sizing: border-box; }
/* Атрибут hidden сильнее display у компонентов: кнопки, которым нужен скрипт, без него не видны. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.mk { background: #08090a; }
h1, h2, h3, h4, p, ul, ol, blockquote, figure, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 3px; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 64px); margin-inline: auto; }

/* Шапка. Логотип — белые файлы бренда; на светлом фоне они переворачиваются в чёрный. На рекламных страницах
   шапка тёмная и прозрачная над первым экраном, при прокрутке плотнее. */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.mk .top { background: rgba(8, 9, 10, 0.55); border-bottom-color: transparent; transition: background-color 0.2s, border-color 0.2s; }
.mk .top.scrolled { background: rgba(8, 9, 10, 0.88); border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 32px; min-height: 64px; }
.logo { direction: ltr; display: flex; flex: none; align-items: center; min-height: 44px; }
.logo img { display: block; filter: var(--logo-filter); }
.logo .logo-full { width: 103px; height: 28px; }
.logo .logo-mark { display: none; width: 28px; height: 28px; }
.top .wrap > nav { display: flex; gap: 24px; margin-inline-end: auto; font-size: 14px; font-weight: 500; white-space: nowrap; }
.top .wrap > nav a { color: var(--muted); text-decoration: none; transition: color 0.12s; }
.top .wrap > nav a:hover, .top .wrap > nav a[aria-current='page'], .top .nav-menu nav a[aria-current='page'] { color: var(--ink); }
.auth-links { display: flex; flex: none; align-items: center; gap: 12px; margin-inline-start: auto; font-size: 14px; white-space: nowrap; }
.link-login { font-weight: 500; text-decoration: none; padding: 8px 6px; }
.link-login:hover { text-decoration: underline; }
.lang-switch { position: relative; }
.lang-switch summary { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; border-radius: 6px; list-style: none; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.lang-switch summary:hover, .lang-switch[open] summary { color: var(--ink); background: var(--surface); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary svg { flex: none; }
.lang-switch div { position: absolute; z-index: 1; top: calc(100% + 8px); inset-inline-end: 0; display: grid; min-width: 180px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); box-shadow: 0 8px 24px rgba(11, 11, 12, 0.12), 0 1px 2px rgba(11, 11, 12, 0.08); }
.mk .lang-switch div { box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8); }
.lang-switch a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: 6px; font-size: 14px; text-decoration: none; }
.lang-switch a:hover { background: var(--surface); }
.lang-switch a[aria-current='true'] { font-weight: 600; }
/* Меню разделов для узкого экрана (до 960 точек): те же ссылки, что в строке, и «Войти». */
.nav-menu { position: relative; display: none; }
.nav-menu summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 6px; list-style: none; color: var(--ink); cursor: pointer; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover, .nav-menu[open] summary { background: var(--surface); }
.top .nav-menu nav { position: absolute; z-index: 1; top: calc(100% + 8px); inset-inline-end: 0; display: grid; min-width: 220px; gap: 0; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); box-shadow: 0 8px 24px rgba(11, 11, 12, 0.12), 0 1px 2px rgba(11, 11, 12, 0.08); font-size: 15px; }
.mk .nav-menu nav { box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8); }
.top .nav-menu nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 6px; color: var(--ink); }
.top .nav-menu nav a:hover { background: var(--surface); }

/* Кнопки: одна основная на экран, заливка ink. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: 6px; background: var(--ink); color: var(--bg); font: 500 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: opacity 0.12s, background-color 0.12s, border-color 0.12s; }
.btn:hover { opacity: 0.86; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { opacity: 1; background: var(--surface); }
.btn.small { min-height: 36px; padding: 7px 14px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }

.led { display: inline-block; flex: none; width: 12px; height: 4px; border-radius: 999px; background: var(--off); }
.led.live { background: var(--live); }
.led.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--off); }

/* Служебное: текст для экранных дикторов и ссылка «к содержанию» для клавиатуры. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; z-index: 20; top: 8px; inset-inline-start: 8px; padding: 10px 16px; border-radius: 6px; background: var(--ink); color: var(--bg); font-weight: 500; text-decoration: none; transform: translateY(-160%); }
.skip:focus { transform: none; }

/* Общая типографика. display — один раз на странице (h1), заголовки разделов крупные и плотные, подписи моноширинные. */
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font: 500 12px/16px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.mk .eyebrow::before { content: ''; flex: none; width: 22px; height: 1px; background: currentColor; }
h1 { max-width: 8.7em; margin-top: 20px; font: 800 clamp(40px, 5.2vw, 68px)/1.02 var(--sans); letter-spacing: -0.045em; text-wrap: balance; }
h2 { margin-top: 14px; font: 700 clamp(28px, 3.6vw, 44px)/1.1 var(--sans); letter-spacing: -0.035em; text-wrap: balance; }
.mk h2 { max-width: 12.4em; margin-top: 18px; font: 800 clamp(34px, 4.8vw, 64px)/1 var(--sans); letter-spacing: -0.045em; }
h3 { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.015em; }
.lead { max-width: 33.5em; margin-top: 24px; color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.shot { position: relative; z-index: 1; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
/* Снимок панели целиком и в своих пропорциях: ширина по колонке, высота по атрибутам width/height. */
.shot picture { display: block; }
.shot img { width: 100%; height: auto; }

/* Ссылка «подробнее» со стрелкой по направлению письма. */
.more { display: flex; width: fit-content; align-items: center; gap: 8px; margin-top: 24px; font-weight: 500; text-decoration: none; }
.more::after { content: '→'; transition: transform 0.2s; }
[dir='rtl'] .more::after { content: '←'; }
.more:hover::after { transform: translateX(4px); }
[dir='rtl'] .more:hover::after { transform: translateX(-4px); }
.more:hover { text-decoration: underline; }

/* Появление при прокрутке: скрипт прячет только то, что ниже экрана, и показывает, когда блок доходит до него. */
.rv { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--delay, 0s); }
.rv.pending { opacity: 0; transform: translateY(18px); }

/* ---------- Стена стоек: тысячи индикаторов в перспективе (site.js рисует её на canvas). Без скрипта и до первого
   кадра видна та же стена статичным узором из CSS. ---------- */
.wall { position: absolute; inset: -24px; z-index: -2; pointer-events: none; overflow: hidden; transition: transform 0.5s var(--ease); }
.wall canvas { display: block; width: 100%; height: 100%; transform: perspective(1600px) rotateY(-16deg) scale(1.12); transform-origin: 85% 50%; }
[dir='rtl'] .wall canvas { transform: perspective(1600px) rotateY(16deg) scale(1.12); transform-origin: 15% 50%; }
.wall:not(.on)::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1.3px, transparent 1.7px) 0 0 / 16px 16px; -webkit-mask: repeating-linear-gradient(90deg, #000 0 144px, transparent 144px 176px), repeating-linear-gradient(180deg, #000 0 48px, transparent 48px 64px); -webkit-mask-composite: source-in; mask: repeating-linear-gradient(90deg, #000 0 144px, transparent 144px 176px), repeating-linear-gradient(180deg, #000 0 48px, transparent 48px 64px); mask-composite: intersect; transform: perspective(1600px) rotateY(-16deg) scale(1.12); transform-origin: 85% 50%; }
.spot { position: absolute; z-index: -1; top: 0; left: 0; width: 560px; height: 560px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 62%); opacity: 0; transform: translate(-50%, -50%); transition: opacity 0.4s; }
.spot.on { opacity: 1; }

/* ---------- Первый экран ---------- */
.hero { position: relative; isolation: isolate; margin-top: -65px; padding: 137px 0 0; overflow: hidden; }
/* Затемнение: текст читается поверх стены, низ уходит в фон раздела. */
.hero::before, .page-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(8, 9, 10, 0.94) 0%, rgba(8, 9, 10, 0.72) 36%, rgba(8, 9, 10, 0.12) 68%, rgba(8, 9, 10, 0.35) 100%), linear-gradient(180deg, rgba(8, 9, 10, 0.9) 0%, rgba(8, 9, 10, 0) 16%, rgba(8, 9, 10, 0) 70%, #08090a 100%); }
[dir='rtl'] .hero::before, [dir='rtl'] .page-hero::before { background: linear-gradient(270deg, rgba(8, 9, 10, 0.94) 0%, rgba(8, 9, 10, 0.72) 36%, rgba(8, 9, 10, 0.12) 68%, rgba(8, 9, 10, 0.35) 100%), linear-gradient(180deg, rgba(8, 9, 10, 0.9) 0%, rgba(8, 9, 10, 0) 16%, rgba(8, 9, 10, 0) 70%, #08090a 100%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: center; }
.hero-text, .hero-term { transition: transform 0.6s var(--ease); }
.kicker { display: flex; align-items: center; gap: 10px; color: var(--muted); font: 400 13px/1.4 var(--mono); letter-spacing: 0.02em; }
.kicker i { flex: none; width: 12px; height: 4px; border-radius: 999px; background: var(--live); box-shadow: 0 0 0 4px rgba(47, 212, 122, 0.14), 0 0 14px rgba(47, 212, 122, 0.6); }
.hero h1 { max-width: none; margin-top: 22px; font-size: clamp(48px, 7.6vw, 112px); line-height: 0.92; letter-spacing: -0.055em; text-wrap: initial; }
.hero h1 > span { display: block; }
.hero h1 .outline { color: transparent; -webkit-text-stroke: 1.5px rgba(243, 244, 245, 0.6); }
@supports not (-webkit-text-stroke: 1px #fff) { .hero h1 .outline { color: var(--dim); } }
.hero h1 > span:last-child::after { content: ''; display: inline-block; width: 0.09em; height: 0.74em; margin-inline-start: 0.06em; vertical-align: -0.02em; background: var(--ink); animation: caret 1.1s steps(1) infinite; }
.hero .lead { max-width: 560px; margin-top: 28px; color: #b9bdc4; font-size: 18px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; color: var(--muted); font-size: 14px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 10px; }
.hero-facts li::before { content: ''; flex: none; width: 12px; height: 4px; border-radius: 999px; background: var(--ink); }

/* Окно терминала: тёмное и полупрозрачное поверх стены. Все строки в разметке сразу (без скрипта видно всё, место не
   прыгает), скрипт прячет их и печатает по очереди; каждая строка шлёт по стене волну. */
.term-window { margin: 0; border: 1px solid #26292e; border-radius: 10px; background: rgba(12, 13, 15, 0.8); color: #cfd3d8; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.02); overflow: hidden; direction: ltr; text-align: left; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.term-bar { display: flex; align-items: center; gap: 14px; min-height: 40px; padding: 0 8px 0 14px; border-bottom: 1px solid #1f2226; }
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; background: #2a2d31; }
.term-title { color: #8d929a; font: 400 12px/1 var(--mono); }
.term-replay { min-height: 30px; margin-inline-start: auto; padding: 4px 12px; border: 1px solid #33363b; border-radius: 6px; background: transparent; color: #d4d4d8; font: 500 12px/1 var(--mono); cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.term-replay:hover { border-color: #5a5e65; background: #15171a; }
.term-replay:focus-visible { outline-color: #f3f4f5; }
.term-body { margin: 0; padding: 16px 18px 20px; font: 400 13px/1.8 var(--mono); white-space: normal; overflow-wrap: anywhere; }
.term-body .ln { display: block; min-height: 1.8em; white-space: pre-wrap; transition: opacity 0.25s, transform 0.25s; }
.term-body .ln.wait { visibility: hidden; opacity: 0; transform: translateY(4px); }
/* Перевод строки лога на арабский и персидский: текст изолирован и сам выбирает направление, знаки на месте. */
.term-body .ln > span:not(.t):not(.w):not(.u):not(.term-bar-fill), .code .t { unicode-bidi: plaintext; }
.term-body .ln.typing .w::after { content: ''; display: inline-block; width: 8px; height: 1.05em; margin-inline-start: 2px; vertical-align: -0.15em; background: #e4e4e7; animation: caret 0.9s steps(1) infinite; }
.t { color: #8d929a; } .w { color: #ffffff; } .g { color: #2fd47a; } .u { color: #ffffff; text-decoration: underline; text-decoration-color: #5a5e65; text-underline-offset: 3px; }
.term-bar-fill { display: inline-block; width: 96px; height: 4px; margin-inline-start: 8px; vertical-align: middle; border-radius: 999px; background: #2a2d31; overflow: hidden; }
.term-bar-fill u { display: block; width: 100%; height: 100%; border-radius: inherit; background: #e4e4e7; }
.term-body .ln.filling .term-bar-fill u { animation: fill 1.4s ease-out both; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes fill { from { width: 0; } to { width: 100%; } }

/* Цифры под первым экраном: крупные моноширинные, только то, что правда. */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 80px; border-top: 1px solid var(--line); }
.metrics > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; padding: 26px 24px 34px 0; }
.metrics > div + div { padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.metrics dd { color: var(--muted); font: 500 clamp(14px, 1.4vw, 22px)/1 var(--mono); white-space: nowrap; }
.metrics dd b { margin-inline-end: 4px; color: var(--ink); font: 500 clamp(40px, 5vw, 68px)/1 var(--mono); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.metrics dt { max-width: 14.9em; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ---------- Разделы ---------- */
.section { position: relative; padding: 128px 0; }
.section.alt { background: var(--surface); }
.pp + .pp, .seam { border-top: 1px solid var(--line); }
.head { max-width: 760px; }
.split .head h2, .faq .head h2 { max-width: none; font-size: clamp(30px, 3.2vw, 44px); }
.head > p:not(.eyebrow) { max-width: 37.2em; margin-top: 20px; color: var(--muted); font-size: 17px; }

/* Живой макет страницы приложения: консоль в стойке. Релизы — юниты с прорезями, статус — индикатор и слово. */
#demo { padding-top: 96px; }
.app-window { position: relative; margin-top: 56px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, var(--raised), var(--bg)); box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.9); }
.dk .app-window { border-color: #23262a; background: linear-gradient(180deg, #0d0e10, #0a0b0c); }
.app-window::before, .app-window::after, .rack::before, .rack::after { content: ''; position: absolute; top: 12px; bottom: 12px; width: 4px; background: repeating-linear-gradient(180deg, var(--led) 0 2px, transparent 2px 10px); }
.app-window::before, .rack::before { inset-inline-start: -14px; }
.app-window::after, .rack::after { inset-inline-end: -14px; }
.app-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.app-crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 400 13px/1.4 var(--mono); }
.app-crumbs span::after { content: '/'; margin-inline-start: 8px; color: var(--dim); }
.app-crumbs b { color: var(--ink); font: 600 16px/1.2 var(--sans); }
.app-url { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font: 400 13px/20px var(--mono); direction: ltr; }
.app-url svg { width: 14px; height: 14px; color: var(--muted); }
.app-top .btn { margin-inline-start: auto; }
.app-tabs { display: flex; gap: 4px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.app-tabs::-webkit-scrollbar { display: none; }
.app-tabs button { position: relative; flex: none; min-height: 46px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font: 500 14px/1 var(--sans); cursor: pointer; }
.app-tabs button:hover, .app-tabs button[aria-selected='true'] { color: var(--ink); }
.app-tabs button[aria-selected='true']::after { content: ''; position: absolute; inset: auto 12px -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.app-panels { display: grid; }
.app-panel { padding: 20px; }
.app-panel + .app-panel { border-top: 1px solid var(--line); }
.app-window.tabbed .app-panel + .app-panel { border-top: 0; }
.app-panel[hidden] { display: none; }
.app-window.tabbed .app-panels { min-height: 360px; }
.app-panel-title { margin-bottom: 14px; color: var(--muted); font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.app-window.tabbed .app-panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* Юнит стойки: прорези слева, полосатая лицевая панель. */
.release, .env-list > div, .domain-list li, .unit, .stack-row, .cat-item { border: 1px solid var(--line); border-radius: 6px; background: repeating-linear-gradient(90deg, rgba(127, 127, 127, 0.03) 0 3px, transparent 3px 6px), var(--raised); }
.dk .release, .dk .env-list > div, .dk .domain-list li, .dk .unit, .dk .stack-row { border-color: #1c1e22; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 3px, transparent 3px 6px), #0f1012; }
.slot, .release::before { display: block; flex: none; width: 14px; height: 22px; background: repeating-linear-gradient(90deg, var(--led) 0 4px, transparent 4px 5px); border-radius: 2px; opacity: 0.8; }
.releases { display: grid; gap: 6px; }
.release { display: grid; grid-template-columns: 14px 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 66px; padding: 12px 16px; animation: none; transition: border-color 0.2s; }
.release::before { content: ''; }
.release.enter { animation: rise 0.45s var(--ease); }
.rel-num { color: var(--muted); font: 500 14px/1 var(--mono); }
.rel-text { display: grid; gap: 2px; min-width: 0; }
.rel-text b { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rel-text small { overflow: hidden; color: var(--muted); font: 400 12.5px/18px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.rel-state { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap; }
.rel-state::before { content: ''; width: 12px; height: 4px; border-radius: 999px; background: var(--live); box-shadow: 0 0 10px color-mix(in srgb, var(--live) 70%, transparent); }
.release.current { border-color: var(--line-strong); }
.dk .release.current { border-color: #3a3d42; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 3px, transparent 3px 6px), #131417; }
.rel-progress { display: grid; gap: 6px; justify-items: end; color: var(--muted); font-size: 13px; white-space: nowrap; }
.rel-progress span { display: inline-flex; align-items: center; gap: 8px; }
.rel-progress span::before { content: ''; width: 12px; height: 4px; border-radius: 999px; background: var(--busy); animation: blink 1.2s steps(1) infinite; }
.rel-progress i { display: block; width: 120px; height: 4px; border-radius: 999px; background: var(--led); overflow: hidden; }
.rel-progress u { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--busy); transition: width 0.5s ease; }
.app-note { display: flex; gap: 10px; min-height: 48px; margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.app-note::before { content: '›'; color: var(--faint); font-family: var(--mono); }
.app-note.done { color: var(--ink); }
.app-log { margin: 0; padding: 16px 18px; min-height: 230px; border: 1px solid #1c1e22; border-radius: 6px; background: #060708; color: #cfd3d8; font: 400 13px/1.85 var(--mono); white-space: normal; overflow: hidden; direction: ltr; text-align: left; }
.app-log span { display: block; white-space: pre; }
.app-log span.enter { animation: rise 0.35s ease-out; }
.env-list, .domain-list { display: grid; gap: 6px; }
.env-list > div { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); align-items: center; gap: 16px; min-height: 56px; padding: 10px 16px; }
.env-list dt { font: 500 13.5px/1.4 var(--mono); direction: ltr; text-align: start; }
.env-list dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.env-list code { font-size: 13.5px; overflow-wrap: anywhere; direction: ltr; }
.env-list small { color: var(--muted); font-size: 13px; }
.domain-list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; min-height: 56px; padding: 14px 16px; }
.domain-list b { font: 500 14px/1.4 var(--mono); direction: ltr; overflow-wrap: anywhere; }
.domain-list span { color: var(--muted); font-size: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0.25; } }

/* Каталог услуг (scripts/build-site.mjs, src/domain/services.ts) — та же раскладка, что в мастере панели: категории
   слева, услуги выбранной категории юнитами справа, цена у правого края. Без скрипта категории идут списком подряд. */
.catalog { margin-top: 56px; }
.catalog.tabbed { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.cat-tabs { position: relative; display: grid; gap: 2px; }
.cat-tabs[hidden] { display: none; }
.cat-tabs button { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 14px; border: 0; border-inline-start: 2px solid transparent; border-radius: 0 6px 6px 0; background: transparent; color: var(--muted); font: 500 15px/20px var(--sans); text-align: start; white-space: nowrap; cursor: pointer; transition: background-color 0.12s, color 0.12s; }
[dir='rtl'] .cat-tabs button { border-radius: 6px 0 0 6px; }
.cat-tabs button:hover { background: var(--surface); color: var(--ink); }
.cat-tabs button[aria-selected='true'] { border-inline-start-color: var(--ink); background: var(--raised); color: var(--ink); font-weight: 600; }
.cat-tabs small { color: var(--faint); font: 500 12px/1 var(--mono); }
.cat-panels { display: grid; gap: 40px; min-width: 0; }
.catalog.tabbed .cat-panels { gap: 0; }
.cat-group[hidden] { display: none; }
.cat-group h3 { margin-bottom: 14px; font-size: 17px; }
.catalog.tabbed .cat-group h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cat-items { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.cat-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 74px; padding: 14px 18px; background: repeating-linear-gradient(90deg, rgba(127, 127, 127, 0.03) 0 3px, transparent 3px 6px), var(--raised); transition: border-color 0.15s; }
.cat-item:hover { border-color: var(--line-strong); }
.cat-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
.cat-icon svg { display: block; }
.cat-text { display: grid; gap: 2px; min-width: 0; }
.cat-text b { overflow: hidden; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap; }
.cat-text span { overflow: hidden; color: var(--muted); font-size: 14px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.cat-from { display: grid; justify-items: end; text-align: end; font-variant-numeric: tabular-nums; }
.cat-from b { font: 500 14px/20px var(--mono); white-space: nowrap; }
.cat-from small { color: var(--muted); font-size: 12.5px; line-height: 18px; white-space: nowrap; }
.cat-from:empty { display: none; }
.cat-note { color: var(--muted); font-size: 14px; }

/* ---------- Как это работает: конвейер деплоя с бегущим импульсом и возможности юнитами в стойке ---------- */
.pipe { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 72px; }
.pipe::before { content: ''; position: absolute; top: 27px; inset-inline: 0; height: 1px; background: var(--line); }
.step:not(:last-child)::before { content: ''; position: absolute; top: 26px; inset-inline: 56px 0; height: 3px; background: linear-gradient(90deg, transparent, var(--ink), transparent) no-repeat; background-size: 120px 3px; background-position: -120px 0; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8)); animation: hop-0 6s infinite; }
.step:nth-child(2)::before { animation-name: hop-1; }
.step:nth-child(3)::before { animation-name: hop-2; }
[dir='rtl'] .step:not(:last-child)::before { animation-name: hop-0-rtl; }
[dir='rtl'] .step:nth-child(2)::before { animation-name: hop-1-rtl; }
[dir='rtl'] .step:nth-child(3)::before { animation-name: hop-2-rtl; }
@keyframes hop-0 { 0%, 8% { background-position: -120px 0; animation-timing-function: ease-in-out; } 24%, 100% { background-position: calc(100% + 120px) 0; } }
@keyframes hop-0-rtl { 0%, 8% { background-position: calc(100% + 120px) 0; animation-timing-function: ease-in-out; } 24%, 100% { background-position: -120px 0; } }
@keyframes hop-1 { 0%, 36% { background-position: -120px 0; animation-timing-function: ease-in-out; } 52%, 100% { background-position: calc(100% + 120px) 0; } }
@keyframes hop-1-rtl { 0%, 36% { background-position: calc(100% + 120px) 0; animation-timing-function: ease-in-out; } 52%, 100% { background-position: -120px 0; } }
@keyframes hop-2 { 0%, 64% { background-position: -120px 0; animation-timing-function: ease-in-out; } 80%, 100% { background-position: calc(100% + 120px) 0; } }
@keyframes hop-2-rtl { 0%, 64% { background-position: calc(100% + 120px) 0; animation-timing-function: ease-in-out; } 80%, 100% { background-position: -120px 0; } }
.step { position: relative; padding-inline-end: 28px; }
.step:nth-child(2) .step-n { animation-name: step-n-1; } .step:nth-child(2) .step-n::after { animation-name: step-led-1; }
.step:nth-child(3) .step-n { animation-name: step-n-2; } .step:nth-child(3) .step-n::after { animation-name: step-led-2; }
.step:nth-child(4) .step-n { animation-name: step-n-3; } .step:nth-child(4) .step-n::after { animation-name: step-led-3; }
.step-n { position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid #2c2f34; border-radius: 50%; background: var(--bg); color: var(--muted); font: 400 14px/1 var(--mono); animation: step-n-0 6s infinite; }
.step-n::after { content: ''; position: absolute; top: -2px; inset-inline-end: -2px; width: 10px; height: 10px; border: 2px solid var(--bg); border-radius: 50%; background: var(--led); animation: step-led-0 6s infinite; }
@keyframes step-n-0 { 0%, 2% { border-color: #2c2f34; color: var(--muted); } 5%, 95% { border-color: var(--ink); color: var(--ink); } 100% { border-color: #2c2f34; color: var(--muted); } }
@keyframes step-led-0 { 0%, 2% { background: var(--led); box-shadow: none; } 5%, 95% { background: var(--live); box-shadow: 0 0 10px var(--live); } 100% { background: var(--led); box-shadow: none; } }
@keyframes step-n-1 { 0%, 22% { border-color: #2c2f34; color: var(--muted); } 24%, 95% { border-color: var(--ink); color: var(--ink); } 100% { border-color: #2c2f34; color: var(--muted); } }
@keyframes step-led-1 { 0%, 22% { background: var(--led); box-shadow: none; } 24%, 95% { background: var(--live); box-shadow: 0 0 10px var(--live); } 100% { background: var(--led); box-shadow: none; } }
@keyframes step-n-2 { 0%, 50% { border-color: #2c2f34; color: var(--muted); } 52%, 95% { border-color: var(--ink); color: var(--ink); } 100% { border-color: #2c2f34; color: var(--muted); } }
@keyframes step-led-2 { 0%, 50% { background: var(--led); box-shadow: none; } 52%, 95% { background: var(--live); box-shadow: 0 0 10px var(--live); } 100% { background: var(--led); box-shadow: none; } }
@keyframes step-n-3 { 0%, 78% { border-color: #2c2f34; color: var(--muted); } 80%, 95% { border-color: var(--ink); color: var(--ink); } 100% { border-color: #2c2f34; color: var(--muted); } }
@keyframes step-led-3 { 0%, 78% { background: var(--led); box-shadow: none; } 80%, 95% { background: var(--live); box-shadow: 0 0 10px var(--live); } 100% { background: var(--led); box-shadow: none; } }
.step h3 { margin-top: 26px; font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; }
.step p { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.rack { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 88px; padding: 10px; border: 1px solid #23262a; border-radius: 10px; background: linear-gradient(180deg, #0d0e10, #0a0b0c); }
.unit { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px; transition: border-color 0.2s, background-color 0.2s; }
.unit:hover { border-color: #3a3d42; }
.unit:last-child:nth-child(odd) { grid-column: 1 / -1; }
.unit h3 { font-size: 16px; }
.unit p { margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.leds { display: flex; align-items: center; gap: 6px; color: var(--muted); font: 500 11px/1 var(--mono); letter-spacing: 0.04em; direction: ltr; }
.leds i { width: 6px; height: 6px; border-radius: 50%; background: var(--led); }
.leds i.g { background: var(--live); box-shadow: 0 0 8px color-mix(in srgb, var(--live) 80%, transparent); }
.leds i.w { background: #e9eaec; box-shadow: 0 0 6px rgba(255, 255, 255, 0.6); animation: flick 1.3s steps(2) infinite; }
.unit:nth-child(2) .leds i.w { animation-duration: 0.9s; }
.unit:nth-child(3) .leds i.w { animation-duration: 1.7s; }
@keyframes flick { 50% { opacity: 0.2; } }

/* Приложение / База / Сервер: команды uc */
.kinds { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; margin-top: 120px; }
.kinds-text h3, .wide-feature h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; }
.kinds-text p, .wide-feature p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.kinds .segment { margin-top: 28px; }
.kinds-code { display: grid; gap: 16px; }
.kinds-code section[hidden], .agent-code section[hidden] { display: none; }
.kinds-code h4 { font-size: 15px; font-weight: 600; }
.kinds-code p { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.kinds.tabbed .kinds-code h4 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.code { margin: 0; padding: 20px 22px; border: 1px solid #23262a; border-radius: 10px; background: #0c0d0f; color: #e4e4e7; font: 400 13.5px/1.85 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; direction: ltr; text-align: left; }
.code.enter, .kinds-code section.enter, .agent-code section.enter { animation: rise 0.35s ease-out; }
.wide-feature { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: center; margin-top: 120px; }
.wide-feature .shot { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8); }
.dk .shot { border-color: #23262a; }

/* Переключатель: моноширинные вкладки в рамке. */
.segment { display: inline-flex; gap: 2px; margin-top: 40px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.segment button { min-height: 34px; padding: 6px 14px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 500 13px/1.2 var(--mono); cursor: pointer; transition: color 0.12s, background-color 0.12s; }
.segment button:hover { color: var(--ink); }
.segment button[aria-selected='true'] { background: var(--ink); color: var(--bg); }

/* Для кого: четыре колонки с крупными номерами. */
.audience { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; margin-top: 64px; }
.audience li { display: grid; align-content: start; gap: 12px; padding-top: 22px; border-top: 1px solid var(--ink); }
.aud-num { color: var(--muted); font: 500 44px/1 var(--mono); letter-spacing: -0.04em; }
.audience h3 { margin-top: 10px; }
.audience p { color: var(--muted); font-size: 15px; line-height: 1.55; }

/* Надёжность: слои защиты — юниты стойки, подсвечиваются вместе с пунктом списка. */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.layers-list { display: grid; gap: 4px; margin-top: 40px; }
.layers-list li { display: grid; gap: 4px; padding: 16px 18px; border-inline-start: 2px solid var(--line); cursor: default; transition: background-color 0.2s, border-color 0.2s; }
.layers-list li.on { border-inline-start-color: var(--ink); background: var(--raised); }
.layers-list p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.stack { position: relative; display: grid; gap: 6px; align-self: center; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.stack-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; min-height: 68px; padding: 16px 18px; transition: transform 0.3s var(--ease), border-color 0.2s; }
.stack-row::before { content: ''; width: 14px; height: 22px; background: repeating-linear-gradient(90deg, var(--led) 0 4px, transparent 4px 5px); border-radius: 2px; }
.stack-row::after { content: ''; grid-column: 3; grid-row: 1 / span 2; width: 8px; height: 8px; border-radius: 50%; background: var(--led); transition: background-color 0.2s, box-shadow 0.2s; }
.stack-row span { grid-column: 2; font-weight: 600; }
.stack-row small { grid-column: 2; color: var(--muted); font: 400 12.5px/1.4 var(--mono); }
.stack-row.app::after { background: var(--live); box-shadow: 0 0 8px color-mix(in srgb, var(--live) 70%, transparent); }
.stack-row.on { border-color: var(--ink); }
.stack-row.on:not(.app)::after { background: var(--ink); box-shadow: 0 0 8px color-mix(in srgb, var(--ink) 50%, transparent); }
.stack.rv .stack-row { transition-delay: calc(var(--i, 0) * 70ms); }
.stack.rv.pending .stack-row { opacity: 0; transform: translateY(10px); }

/* CLI, API и MCP */
.agent-code { display: grid; gap: 16px; align-self: center; }
.agent-code .segment { justify-self: start; margin: 0; }

/* Короткий блок цен на главной: счётчик минут. Шкала — 60 делений одной минуты, заполняется раз в секунду. */
.price-band { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 64px; align-items: end; }
.price-band > div:first-child p:not(.eyebrow) { max-width: 32.2em; margin-top: 22px; color: var(--muted); font-size: 17px; }
.price-band .btn { margin-top: 28px; }
.price-card { display: grid; gap: 6px; padding: 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.price-card .price-note { order: -1; margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.price-from { margin: 0; color: var(--ink); font: 500 clamp(34px, 3.9vw, 56px)/1.05 var(--mono); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tick { position: relative; height: 28px; margin-top: 20px; background: var(--led); -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(100% / 60 - 2px), transparent calc(100% / 60 - 2px) calc(100% / 60)); mask: repeating-linear-gradient(90deg, #000 0 calc(100% / 60 - 2px), transparent calc(100% / 60 - 2px) calc(100% / 60)); }
.tick i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 68%; background: var(--ink); animation: minute 60s steps(60, jump-none) infinite; animation-delay: -41s; }
@keyframes minute { from { width: calc(100% / 60); } to { width: 100%; } }
.tick-l { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); font: 400 11px/1.4 var(--mono); direction: ltr; }

/* ---------- Страница цен ---------- */
.page-hero { position: relative; isolation: isolate; margin-top: -65px; padding: 177px 0 96px; overflow: hidden; }
.page-hero h1 { max-width: 12em; margin-top: 22px; font-size: clamp(44px, 6.4vw, 92px); line-height: 0.95; letter-spacing: -0.05em; }
.page-hero .lead { max-width: 37.2em; color: #b9bdc4; }
.section.tight { padding-top: 72px; }
/* Выбор тарифа и калькулятор заполняет скрипт: до этого место под них уже занято, и страница не прыгает. */
.picker[data-pending], .calc[data-pending] { visibility: hidden; }
.picker[data-pending] { min-height: 378px; }
.calc[data-pending] { min-height: 261px; }
@media (max-width: 1100px) { .picker[data-pending] { min-height: 361px; } .calc[data-pending] { min-height: 307px; } }
@media (max-width: 960px) { .picker[data-pending] { min-height: 531px; } .calc[data-pending] { min-height: 309px; } }
@media (max-width: 640px) { .picker[data-pending] { min-height: 602px; } .calc[data-pending] { min-height: 569px; } }
.picker { margin-top: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); overflow: hidden; }
.stops { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--bg); }
.stops button { position: relative; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); color: var(--ink); font: 500 13px/1.2 var(--mono); cursor: pointer; transition: border-color 0.12s; }
.stops button:hover { border-color: var(--line-strong); }
.stops button[aria-checked='true'] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.picked { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 36px; }
.picked-price { display: grid; gap: 6px; align-content: start; justify-items: start; }
.picked-name { color: var(--muted); font: 500 13px/1.4 var(--mono); }
.picked-cost { white-space: nowrap; font: 500 clamp(48px, 6vw, 80px)/1 var(--mono); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.picked-cost small { margin-inline-start: 8px; color: var(--muted); font-size: 0.24em; font-weight: 500; letter-spacing: 0; }
.picked-hour { max-width: 27.3em; margin: 6px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.specs { display: grid; gap: 22px; align-content: center; }
.spec { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.spec span { color: var(--muted); font-size: 14px; }
.spec b { font: 500 15px/1.4 var(--mono); font-variant-numeric: tabular-nums; }
/* Шкала тарифа — 20 делений, как индикаторы на юните. */
.spec i { grid-column: 1 / -1; height: 14px; background: var(--led); -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(5% - 2px), transparent calc(5% - 2px) 5%); mask: repeating-linear-gradient(90deg, #000 0 calc(5% - 2px), transparent calc(5% - 2px) 5%); }
.spec u { display: block; height: 100%; background: var(--ink); transition: width 0.25s var(--ease); }
.all-plans { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.all-plans summary { padding: 16px 20px; font-weight: 500; cursor: pointer; }
.table-scroll { overflow-x: auto; padding: 0 20px 16px; }
.all-plans table { width: 100%; border-collapse: collapse; font: 400 14px/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.all-plans th, .all-plans td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); text-align: start; white-space: nowrap; }
.all-plans thead th { border-top: 0; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.all-plans tbody th[colspan] { padding-top: 20px; font: 600 15px/1.4 var(--sans); }
.calc { margin-top: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.calc h3 { font-size: 20px; }
.calc-hint { margin: 6px 0 16px; color: var(--muted); font-size: 15px; }
.calc-rows { display: grid; gap: 6px; }
.calc-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.calc-row label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.calc-row label:has(input[type='checkbox']) { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.calc-row select, .calc-row input:not([type='checkbox']) { min-width: 0; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--raised); color: var(--ink); font: inherit; font-size: 14px; }
.calc-row input[type='checkbox'] { width: 16px; height: 16px; accent-color: var(--ink); }
.calc-row input[type='number'] { width: 90px; }
.calc-row output { margin-inline-start: auto; align-self: center; font: 500 14px/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.calc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.calc-sum { margin-inline-start: auto; color: var(--muted); }
.calc-sum b { color: var(--ink); font: 500 26px/1.2 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* Деньги: три факта с крупными цифрами и сроки при нулевом балансе — конвейером. */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 64px; border-top: 1px solid var(--line); }
.trio article { display: grid; gap: 8px; align-content: start; padding: 26px 24px 0 0; }
.trio article + article { padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.trio .big { color: var(--ink); font: 500 clamp(40px, 4.4vw, 60px)/1 var(--mono); letter-spacing: -0.04em; direction: ltr; text-align: start; }
.trio h3 { margin-top: 10px; }
.trio p, .timeline p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.debt { margin-top: 88px; }
.debt h3 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.025em; }
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.timeline li { display: grid; gap: 8px; align-content: start; }
.timeline b { font: 500 15px/1.4 var(--mono); }
.bar { display: block; height: 4px; margin-bottom: 10px; border-radius: 999px; background: var(--line); }
.bar.done { background: var(--ink); }
.bar.now { background: var(--busy); }
.bar.mid { background: var(--off); }
.bar.end { background: var(--fail); }
#money .shot { margin-top: 72px; }

/* Вопросы: строки с номером, плюс превращается в минус. */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
.faq-list { display: grid; counter-reset: q; }
.faq details { border-bottom: 1px solid var(--line); counter-increment: q; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 20px 0; font-size: 17px; font-weight: 600; list-style: none; cursor: pointer; }
.faq summary::before { content: counter(q, decimal-leading-zero); color: var(--faint); font: 400 13px/1 var(--mono); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font: 400 18px/1 var(--mono); }
.faq details[open] summary::after { content: '−'; color: var(--ink); }
.faq summary:hover { color: var(--ink); }
.faq details p { max-width: 39.7em; padding: 0 0 22px 48px; color: var(--muted); font-size: 16px; }
[dir='rtl'] .faq details p { padding: 0 48px 22px 0; }

/* Финал: та же серверная, стена — статичным узором. */
.closing { position: relative; isolation: isolate; padding: 144px 0; overflow: hidden; text-align: center; }
.closing::before { content: ''; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, 0.11) 1.2px, transparent 1.6px) 0 0 / 16px 16px; -webkit-mask: radial-gradient(ellipse 60% 70% at 50% 50%, transparent 30%, #000 100%); mask: radial-gradient(ellipse 60% 70% at 50% 50%, transparent 30%, #000 100%); }
.closing-inner { display: grid; justify-items: center; }
.closing .kicker { justify-content: center; }
.closing h2 { max-width: 9.9em; margin-top: 22px; font-size: clamp(38px, 5.6vw, 80px); line-height: 0.98; letter-spacing: -0.05em; }
.closing p { max-width: 32.2em; margin-top: 20px; color: var(--muted); font-size: 17px; }
.closing .actions { justify-content: center; }

/* Подвал (src/domain/site-footer.ts): знак и строка слева, три колонки ссылок справа; ниже реквизиты, затем
   полоса с копирайтом и языками. На телефоне знак сверху, колонки в две, полоса — столбиком. */
.foot { padding: 64px 0 32px; border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot-main { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px 64px; }
.foot-brand { display: grid; align-content: start; justify-items: start; gap: 14px; }
.foot-brand .logo { min-height: 0; }
.foot-brand p { max-width: 22em; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
/* Заголовки колонок сильнее заголовков полос (.mk h2): это подписи, а не заголовки разделов. */
.foot .foot-col h2 { max-width: none; margin: 0 0 14px; color: var(--ink); font: 500 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.foot-col ul { display: grid; gap: 10px; }
.foot-col a { display: inline-block; }
/* Реквизиты на языке, на котором их ввели: направление каждой части по её тексту, кавычки не переворачиваются. */
.foot-company > * { unicode-bidi: plaintext; }
.foot-company { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot-company:not([hidden]) + .foot-bottom { margin-top: 20px; }
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-langs a[aria-current='true'] { color: var(--ink); }

/* Страница 404 */
.lost { display: grid; place-items: center; align-content: center; gap: 16px; min-height: 100vh; padding-inline: 16px; text-align: center; overflow-wrap: anywhere; }
.pub-body .lost { min-height: calc(100vh - 160px); }
.lost h1 { max-width: none; margin-top: 12px; font-size: clamp(30px, 5vw, 44px); }
.lost p { color: var(--muted); }
.lost-links { display: flex; gap: 22px; font-size: 15px; }
.lost-links a { color: var(--muted); }

/* Публикации, документация, правовые страницы (src/api/site.ts) */
.pub-body main { min-height: calc(100vh - 140px); }
.pub-hero { padding: 72px 0 32px; }
.pub-hero h1 { max-width: none; margin-top: 12px; font-size: clamp(36px, 5.4vw, 56px); }
.pub-hero .lead { margin: 16px 0 0; }
.pub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 16px; padding: 24px 0 96px; }
.pub-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pub-card:hover { border-color: var(--line-strong); }
.pub-card-cover { display: block; aspect-ratio: 1.91; background: var(--surface); }
.pub-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.pub-cover-blank { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(180deg, var(--surface) 0 22%, var(--bg) 22% 24%); }
.pub-card-text { display: grid; align-content: start; gap: 10px; padding: 20px 22px 24px; min-width: 0; }
.pub-card h2 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pub-card h2 a { text-decoration: none; }
.pub-card h2 a:hover { text-decoration: underline; }
.pub-card p:not(.pub-meta) { color: var(--muted); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pub-meta { color: var(--muted); font-size: 13px; font-weight: 500; }
.pub-empty { grid-column: 1 / -1; max-width: 640px; padding: 40px 0; color: var(--muted); }
.pub-empty h2 { color: var(--ink); font-size: clamp(24px, 3vw, 30px); }
.pub-empty p { margin-top: 12px; }
.pub-empty-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px !important; }
.pub-pager { display: flex; justify-content: center; gap: 12px; padding-bottom: 96px; margin-top: -56px; }
.pub-article { padding: 56px 0 112px; }
.pub-narrow { width: min(760px, 100% - 64px); }
.pub-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px; color: var(--muted); font-size: 15px; text-decoration: none; }
.pub-back::before { content: '←'; }
[dir='rtl'] .pub-back::before { content: '→'; }
.pub-back:hover { color: var(--ink); }
.pub-article h1 { max-width: none; margin-top: 14px; font-size: clamp(32px, 4.6vw, 48px); line-height: 1.12; overflow-wrap: anywhere; }
.pub-article .lead { margin: 20px 0 0; max-width: none; overflow-wrap: anywhere; }
.pub-cover { width: min(1000px, 100% - 64px); margin: 40px auto 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.pub-cover img { width: 100%; max-height: 620px; object-fit: cover; }
.prose { margin-top: 40px; font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.9em; font-size: clamp(24px, 3vw, 30px); line-height: 1.25; }
.prose h3 { margin-top: 1.6em; font-size: 20px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 600; }
.prose blockquote { padding-inline-start: 20px; border-inline-start: 2px solid var(--ink); font-size: 1.04em; line-height: 1.6; }
.prose code { padding: 1px 6px; border-radius: 4px; background: var(--surface); font-size: 0.86em; overflow-wrap: anywhere; }
.prose pre { direction: ltr; text-align: left; overflow-x: auto; padding: 16px 18px; border-radius: 10px; background: #0b0b0c; color: #e4e4e7; font-size: 14px; line-height: 1.6; overflow-wrap: normal; }
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }
.prose hr { height: 1px; border: 0; background: var(--line); margin: 2.2em 0; }
.prose img { border-radius: 10px; }
.table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th { font-weight: 600; background: var(--surface); }
.prose .tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 18px 0; }
.prose .tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.prose .tabs > label { padding: 6px 14px; border: 1px solid var(--line); border-radius: 6px 6px 0 0; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; }
.prose .tabs > input:checked + label { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.prose .tabs > input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.prose .tabs > .tab-panel { display: none; flex-basis: 100%; padding: 4px 0 0; border-top: 1px solid var(--line); }
.prose .tabs > input:nth-of-type(1):checked ~ .tab-panel:nth-of-type(1),
.prose .tabs > input:nth-of-type(2):checked ~ .tab-panel:nth-of-type(2),
.prose .tabs > input:nth-of-type(3):checked ~ .tab-panel:nth-of-type(3),
.prose .tabs > input:nth-of-type(4):checked ~ .tab-panel:nth-of-type(4),
.prose .tabs > input:nth-of-type(5):checked ~ .tab-panel:nth-of-type(5),
.prose .tabs > input:nth-of-type(6):checked ~ .tab-panel:nth-of-type(6) { display: block; }
.legal-draft { margin: 0 0 22px; padding: 14px 18px; border-radius: 10px; background: var(--surface); box-shadow: inset 4px 0 0 var(--busy); font-weight: 500; line-height: 1.5; }
.legal h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 15px; }
.legal-nav a { color: var(--muted); }
.legal-nav a[aria-current='page'] { color: var(--ink); text-decoration: none; font-weight: 600; }
.docs-section { margin-top: 44px; }
.docs-section h2 { font-size: clamp(22px, 3vw, 26px); }
.docs-list { display: grid; gap: 4px; margin-top: 16px; border-radius: 12px; overflow: hidden; }
.docs-list li a { display: block; padding: 16px 20px; background: var(--surface); text-decoration: none; }
.docs-list li a:hover { background: var(--line); }
.docs-list li a span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Статус */
.status-list { display: grid; gap: 12px; padding-bottom: 56px; }
.status-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; }
.status-card header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.status-card h2 { margin: 0; font-size: 18px; }
.status-card dl { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 12px 0 0; }
.status-card dt { color: var(--muted); font-size: 13px; }
.status-card dd { margin: 2px 0 0; font-weight: 600; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 500; }
.status-badge::before { content: ''; width: 12px; height: 4px; border-radius: 999px; background: var(--off); }
.status-text { color: var(--muted); font-size: 14px; }
.status-badge.warn::before { background: var(--busy); }
.status-badge.bad::before { background: var(--fail); }
.status-days { display: flex; gap: 3px; margin-top: 14px; }
.status-day { flex: 1; height: 24px; border-radius: 3px; background: var(--line); }
/* Обычный день — нейтральным цветом: зелёного нет, цвет только у неполадок. */
.status-day.ok { background: var(--line-strong); opacity: 0.45; }
.status-day.warn { background: var(--busy); }
.status-day.bad { background: var(--fail); }
.status-note { color: var(--muted); font-size: 13px; }

/* Сообщить о нарушении (/abuse) */
.abuse-form { display: grid; gap: 18px; margin: 8px 0 72px; }
.abuse-form label { display: grid; gap: 6px; font-weight: 500; }
.abuse-form small { color: var(--muted); font-weight: 400; }
.abuse-form input, .abuse-form select, .abuse-form textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: inherit; font: inherit; }
.abuse-form textarea { min-height: 170px; resize: vertical; }
.abuse-form .btn { justify-self: start; }
.abuse-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.abuse-done { display: grid; gap: 14px; justify-items: start; margin: 8px 0 72px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; }


@media (max-width: 960px) {
  .top .wrap > nav { display: none; }
  .nav-menu { display: block; }
  .split, .faq { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .catalog.tabbed { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cat-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tabs button, [dir='rtl'] .cat-tabs button { flex: none; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
  .cat-tabs button[aria-selected='true'] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
  .cat-tabs button[aria-selected='true'] small { color: inherit; opacity: 0.7; }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .trio article, .trio article + article { padding: 24px 0; border-inline-start: 0; }
  .trio article + article { border-top: 1px solid var(--line); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .picked { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 24px; }
  .hero-grid, .kinds, .wide-feature, .price-band { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-term { max-width: 640px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 64px; }
  .metrics > div:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .metrics > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .pipe { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 48px; }
  .pipe::before { top: 0; bottom: 0; inset-inline: 27px auto; width: 1px; height: auto; }
  .step::before { display: none; }
  .step { min-height: 56px; padding-inline: 80px 0; }
  .step-n { position: absolute; top: 0; inset-inline-start: 0; }
  .step h3 { margin-top: 0; font-size: 19px; }
  .rack { grid-template-columns: minmax(0, 1fr); margin-top: 64px; }
  .rack::before, .rack::after, .app-window::before, .app-window::after { display: none; }
  .audience { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .kinds, .wide-feature { margin-top: 88px; }
  .section { padding: 96px 0; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap, .pub-narrow, .pub-cover { width: calc(100% - 32px); }
  .top .wrap { gap: 8px; }
  .auth-links { gap: 4px; }
  .link-login { display: none; }
  .lang-switch summary { padding: 6px 8px; }
  /* На телефоне список языков раскрывается от начала переключателя: иначе он уходит за край экрана. */
  .lang-switch div { inset-inline-start: 0; inset-inline-end: auto; }
  .hero { padding-top: 105px; }
  .hero::before, [dir='rtl'] .hero::before, .page-hero::before, [dir='rtl'] .page-hero::before { background: linear-gradient(180deg, rgba(8, 9, 10, 0.7) 0%, rgba(8, 9, 10, 0.86) 30%, rgba(8, 9, 10, 0.86) 62%, rgba(8, 9, 10, 0.55) 80%, #08090a 100%); }
  .hero h1 { font-size: clamp(44px, 13.4vw, 64px); }
  .hero .lead { font-size: 16.5px; }
  .hero-grid { gap: 36px; }
  .term-body { padding: 14px 14px 18px; font-size: 12px; }
  .term-bar-fill { width: 56px; }
  .metrics { margin-top: 48px; }
  .metrics > div { padding: 20px 12px 24px 0; }
  .metrics > div + div { padding-inline-start: 14px; }
  .metrics > div:nth-child(3) { padding-inline-start: 0; }
  .metrics dt { font-size: 12.5px; }
  .mk h2 { font-size: clamp(32px, 9.4vw, 44px); }
  .head > p:not(.eyebrow) { font-size: 16px; }
  #demo { padding-top: 64px; }
  .app-window { margin-top: 32px; }
  .app-top { padding: 12px 14px; }
  .app-url { order: 3; }
  .app-panel { padding: 12px; }
  .release { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  .release::before { display: none; }
  .rel-num { grid-column: 1 / -1; font-size: 12.5px; }
  .env-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .unit { grid-template-columns: minmax(0, 1fr) auto; padding: 16px; }
  .unit .slot { display: none; }
  .audience { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .aud-num { font-size: 36px; }
  /* На телефоне — снимок шириной телефона (<picture>): не шире 390 точек, по центру колонки. */
  .shot:has(picture) { width: min(100%, 390px); margin-inline: auto; }
  .code { padding: 16px; font-size: 12.5px; }
  .stack-row { min-height: 60px; padding: 14px; }
  .price-card { padding: 22px; }
  .page-hero { padding: 129px 0 64px; }
  .section { padding: 80px 0; }
  .section.tight { padding-top: 48px; }
  .closing { padding: 104px 0; }
  .cat-items { padding: 6px; }
  .cat-item { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; min-height: 0; padding: 14px; }
  .cat-icon { grid-row: span 2; align-self: start; }
  .cat-text span { white-space: normal; }
  .cat-from, .cat-note { grid-column: 2; justify-self: start; }
  .cat-from { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .segment { display: flex; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segment button { flex: 1 0 auto; padding: 6px 10px; }
  .faq summary { grid-template-columns: 28px minmax(0, 1fr) auto; font-size: 16px; }
  .faq details p, [dir='rtl'] .faq details p { padding-inline: 40px 0; font-size: 15px; }
  .pub-hero { padding: 48px 0 24px; }
  .pub-article { padding: 40px 0 80px; }
  .foot { padding: 48px 0 28px; }
  .foot-main { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .foot-col ul { gap: 2px; }
  /* Пальцу нужна строка повыше: ссылки списком по 36px. */
  .foot-col a { padding: 6px 0; }
  .foot-company { margin-top: 36px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; margin-top: 36px; }
  .foot-langs a { padding: 6px 0; }
}

/* На узком экране вместо надписи остаётся знак. */
@media (max-width: 400px) {
  .logo .logo-full { display: none; }
  .logo .logo-mark { display: block; }
  .lost .logo .logo-full { display: block; }
}

/* Без движения: стена — один статичный кадр (рисует site.js), индикаторы горят ровно, конвейер стоит включённым. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .step-n { border-color: var(--ink); color: var(--ink); }
  .step-n::after { background: var(--live); }
  .tick i { width: 68%; }
}

[dir='rtl'] body { line-height: 1.8; }
[dir='rtl'] h1, [dir='rtl'] h2, [dir='rtl'] h3 { letter-spacing: 0; line-height: 1.3; }
[dir='rtl'] .hero h1 { line-height: 1.15; }
/* Арабское письмо связное: моноширинный шрифт и разрядка его рвут. */
[dir='rtl'] .eyebrow, [dir='rtl'] .kicker, [dir='rtl'] .foot .foot-col h2, [dir='rtl'] .app-panel-title, [dir='rtl'] .segment button, [dir='rtl'] .picked-name, [dir='rtl'] .all-plans thead th, [dir='rtl'] .metrics dd, [dir='rtl'] .term-replay { font-family: var(--sans); letter-spacing: 0; }

/* Печать: всё на белом, стены и анимации убраны, вкладки раскрыты, юниты не разрезаются между страницами. */
@media print {
  .dk, .pp, body.mk { --ink: #0b0b0c; --bg: #ffffff; --surface: #f4f4f5; --raised: #ffffff; --line: #d4d4d8; --muted: #3f3f46; --faint: #52525b; --dim: #a1a1aa; --led: #d4d4d8; color-scheme: light; background: #fff; color: #0b0b0c; }
  .top, .mk .top, .mk .top.scrolled { position: static; backdrop-filter: none; background: #fff; border-bottom-color: #d4d4d8; }
  .app-window, .rack, .dk .app-window, .dk .release, .dk .release.current, .dk .env-list > div, .dk .domain-list li, .dk .unit, .dk .stack-row, .dk .shot { background: #fff !important; border-color: #d4d4d8 !important; }
  .app-window::before, .app-window::after, .rack::before, .rack::after { display: none; }
  .top .logo img { filter: invert(1); }
  .hero, .page-hero { margin-top: 0; padding: 32px 0; }
  .hero::before, .page-hero::before, .closing::before, .wall, .spot, .step::before, .tick { display: none; }
  .hero .lead, .page-hero .lead { color: #3f3f46; }
  .hero h1 .outline { color: #0b0b0c; -webkit-text-stroke: 0; }
  .hero h1 > span:last-child::after { display: none; }
  .section, .closing { padding: 40px 0; }
  .lang-switch, .auth-links { display: none; }
  .cat-group, .cat-item, .shot, .trio article, .timeline li, .unit, .step, .audience li, .code, .app-window, .stack, .faq details { break-inside: avoid; }
  .rv.pending, .stack.rv.pending .stack-row { opacity: 1; transform: none; }
  .term-body .ln.wait { visibility: visible; opacity: 1; transform: none; }
  /* На бумаге вкладки не нажать: все категории списком, как без скрипта. */
  .cat-tabs { display: none !important; }
  .catalog.tabbed { display: block; }
  .catalog.tabbed .cat-panels { gap: 32px; }
  .cat-group[hidden] { display: block !important; }
  .catalog.tabbed .cat-group h3 { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  /* Макет панели и примеры команд — тоже все разделы подряд, без кнопок. */
  .app-panel[hidden], .kinds-code section[hidden], .agent-code section[hidden] { display: block !important; }
  .app-window.tabbed .app-panel-title, .kinds.tabbed .kinds-code h4 { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .app-tabs, .segment, .term-replay, [data-demo], [data-rollback] { display: none !important; }
  .term-window, .code, .app-log { background: #fff; color: #0b0b0c; border-color: #d4d4d8; box-shadow: none; backdrop-filter: none; }
  .t { color: #52525b; } .w, .u { color: #0b0b0c; } .g { color: #15803d; }
  * { animation: none !important; transition: none !important; box-shadow: none !important; }
}
