:root {
  /* Шкала слоёв (UI_NAVIGATION §20.8): содержимое < липкие полосы (5–7) < рейка (10) <
     доки (30–35) < информационное окно (45) < модальные подложки (50–60). */
  --layer-info-window: 45;
  /* Высота верхней строки — одно число на всю систему. Раньше оно стояло
     вчетвером: сама строка 86px и прижатые к ней sticky-элементы 86/100px;
     изменить её значило найти все четыре. Полоса стала уже (DQ-182): при
     86px она съедала треть первого экрана ноутбука. */
  --topbar-height: 64px;
  /* Отступ для всего, к чему ведёт переход. Прокрутка ставит цель к верхнему
     краю окна — то есть ПОД полупрозрачную строку, и первые строки пункта
     читаются сквозь неё. Ссылка на пункт без этого отступа бесполезна. */
  --under-topbar: calc(var(--topbar-height) + 14px);
  /* Пределы строк карточки каталога (DQ-511). Описание пишет автор модуля, и
     длину выбирает он — это его текст. Но лента раскладывается здесь, и одно
     полотно на полтора экрана растягивало ряд, а соседние карточки в три
     строки рядом с ним выглядели обрывками. Полный текст открывается панелью
     модуля, где для него есть место. */
  --catalog-card-description-lines: 4;
  --catalog-card-title-lines: 2;
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #17251f;
  background: #e9e5db;
  font-synthesis: none;
  --ink: #17251f;
  --pine: #14231f;
  --cream: #f6f3eb;
  --line: #d9d3c7;
  --amber: #f1b76d;
  /* Минимальная тап-цель и шаг блока «Правила» сотрудников. */
  --tap-target: 44px;
  --human-rules-gap: 8px;
}

* { box-sizing: border-box; }
body { position: relative; min-width: 320px; min-height: 100vh; min-height: 100dvh; margin: 0; overflow-x: hidden; background: radial-gradient(circle at 75% 0%, #f8f5ec 0, #e9e5db 45%, #d9ded3 100%); }
body::before, body::after { position: fixed; z-index: -1; width: 42vw; height: 42vw; border-radius: 50%; content: ""; filter: blur(2px); pointer-events: none; }
body::before { top: -23vw; right: -16vw; background: radial-gradient(circle, #f2bd7052 0, #f2bd7016 42%, transparent 70%); }
body::after { bottom: -27vw; left: 3vw; background: radial-gradient(circle, #668b7040 0, #668b7008 48%, transparent 70%); }
db-services-app { position: relative; z-index: 1; display: block; }
.app-boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px; overflow: hidden; color: #f8f4e9; background: linear-gradient(135deg, #11241d 0%, #1d392d 52%, #314d3a 100%); }
.app-boot__halo { position: absolute; width: min(68vw, 760px); aspect-ratio: 1; border: 1px solid #f1b76d38; border-radius: 50%; box-shadow: 0 0 0 44px #f1b76d0b, 0 0 0 90px #ffffff05; }
.app-boot__card { position: relative; width: min(480px, 100%); padding: 42px; border: 1px solid #ffffff25; border-radius: 28px; background: #10231c8f; box-shadow: 0 26px 80px #06110c75; text-align: center; backdrop-filter: blur(14px); }
.app-boot__mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border: 1px solid #eebb745f; border-radius: 18px; color: #f4bd77; font-weight: 850; letter-spacing: -.07em; }
.app-boot p { margin: 0; color: #c1cec2; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.app-boot h1 { margin: 10px 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 7vw, 56px); font-weight: 500; letter-spacing: -.055em; }
.app-boot span { display: block; color: #b5c4b7; line-height: 1.6; }
.app-boot i { width: 72px; height: 3px; display: block; margin: 28px auto 0; overflow: hidden; border-radius: 999px; background: #ffffff1c; }
.app-boot i::after { width: 30%; height: 100%; display: block; border-radius: inherit; background: #f1b76d; content: ""; animation: app-boot-progress 1.1s ease-in-out infinite alternate; }
@keyframes app-boot-progress { to { transform: translateX(235%); } }
.offline-screen { position: fixed; inset: 0; z-index: 20; overflow-y: auto; align-items: start; padding-block: 40px; }
.offline-screen__icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border: 1px solid #e57b735f; border-radius: 18px; color: #e5837b; }
.offline-screen__retry { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 12px 24px; border: none; border-radius: 12px; background: var(--amber); color: var(--pine); font-weight: 700; font-size: 15px; cursor: pointer; }
.offline-screen__retry:hover { filter: brightness(1.06); }
.app-boot .offline-screen__note { margin-top: 18px; font-size: 13px; text-transform: none; letter-spacing: normal; font-weight: 500; color: #8ea394; }
.offline-screen__help { margin-top: 26px; padding-top: 20px; border-top: 1px solid #ffffff1f; text-align: left; }
.offline-screen__help-title { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: #d7e0d8; }
.offline-screen__help-cause { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: #9fb0a2; }
.offline-screen__help-steps { margin: 0 0 12px; padding-left: 20px; font-size: 13px; line-height: 1.6; color: #c7d2c8; }
.offline-screen__help-steps li::marker { color: var(--amber); font-weight: 700; }
.offline-screen__help-fallback { margin: 0; font-size: 13px; color: #9fb0a2; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 76px 1fr; transition: grid-template-columns .18s ease; }
.shell.is-sidebar-expanded { grid-template-columns: 232px 1fr; }
/* Исключение из правила DQ-187: рейка занимает окно во всю высоту и сама
   стоит слева от верхней строки, а не под ней. Прижимать её к --under-topbar
   значило бы оторвать от верхнего края. */
.sidebar { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 20px 14px; color: #f7f3e8; background: var(--pine); display: flex; flex-direction: column; box-shadow: 14px 0 40px #14231f1f; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 3px 40px; }
.brand > span { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #839181; border-radius: 13px; color: #f4b768; font-weight: 800; letter-spacing: -.05em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: .04em; }
.brand small { color: #9fac9f; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.brand > div, .nav-item > span, .diagnostic-state { display: none; }
.is-sidebar-expanded .brand > div, .is-sidebar-expanded .nav-item > span, .is-sidebar-expanded .diagnostic-state { display: block; }
.sidebar-toggle { position: absolute; top: 73px; right: -12px; z-index: 2; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #53635a; border-radius: 50%; color: #f4b768; background: var(--pine); }
nav { display: grid; gap: 8px; align-content: start; }
/* DQ-236 (наблюдение Архитектора, DQ-209): при достаточном числе пунктов и
   закреплённых модулей рейка была выше окна, а .sidebar без своей прокрутки
   переполнялся молча — низ рейки (закреплённое) «падал» за нижний край
   экрана. Скроллится только сама рейка, .brand и переключатель на месте. */
.sidebar > nav[data-region="nav"] { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.nav-item { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px; border: 0; border-radius: 12px; background: transparent; color: #aebaae; text-align: left; }
.is-sidebar-expanded .nav-item { justify-content: flex-start; padding: 11px 12px; }
.nav-item i { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #506057; border-radius: 9px; font-style: normal; font-weight: 750; }
.nav-item:hover { color: white; background: #ffffff0a; }
.nav-item.is-active { color: white; background: #f7f1e315; }
.nav-item.is-active i { color: #18261f; border-color: #f1b76d; background: #f1b76d; }
.platform { margin-top: auto; padding: 14px; border: 1px solid #405048; border-radius: 14px; color: #dfe6df; font-size: 12px; }
.platform > span { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #79b47f; box-shadow: 0 0 0 5px #79b47f17; }
.platform small { display: block; margin: 5px 0 0 15px; color: #849188; }
.diagnostic-dock { position: relative; margin-top: auto; }
.diagnostic-trigger { width: 100%; margin-top: 0; padding: 10px 8px; display: block; background: transparent; text-align: left; cursor: pointer; }
.shell:not(.is-sidebar-expanded) .diagnostic-trigger { min-height: 48px; display: grid; place-items: center; padding: 0; }
.shell:not(.is-sidebar-expanded) .diagnostic-trigger > span { margin: 0; }
.shell:not(.is-sidebar-expanded) .diagnostic-state,
.shell:not(.is-sidebar-expanded) .build-identity { display: none; }
.diagnostic-trigger strong { display: none; }
.is-sidebar-expanded .diagnostic-trigger { padding: 14px; }
.is-sidebar-expanded .diagnostic-trigger strong { display: inline; }
.diagnostic-trigger strong { font-weight: 600; }
.diagnostic-dock.has-errors .diagnostic-trigger { border-color: #9c554a; }
.diagnostic-dock.has-errors .diagnostic-trigger { animation: diagnostic-alert 1.15s ease-in-out infinite; }
.diagnostic-dock.has-errors .diagnostic-trigger > span { background: #d86b5c; box-shadow: 0 0 0 5px #d86b5c20; }
.diagnostic-dock.has-warnings .diagnostic-trigger { border-color: #9a7445; }
.diagnostic-dock.has-warnings .diagnostic-trigger > span { background: #e0a454; box-shadow: 0 0 0 5px #e0a45420; }
.build-identity { margin: 5px 0 0 !important; color: #b7c1b8 !important; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px !important; letter-spacing: .01em; white-space: nowrap; }
.diagnostic-panel { position: fixed; z-index: var(--layer-info-window, 45); left: 76px; right: 0; bottom: 0; width: auto; height: var(--diagnostic-height, 33.333vh); max-height: calc(100vh - 80px); max-height: calc(100svh - 80px); overflow: hidden; padding: 18px 24px; border: 1px solid #cfc8bb; border-radius: 18px 18px 0 0; color: var(--ink); background: #f8f5ed; box-shadow: 0 -20px 70px #14231f35; }
.diagnostic-panel.is-sidebar-expanded { left: 232px; }
.diagnostic-panel.is-fullscreen { left: 0; top: 0; height: 100vh; height: 100svh; border-radius: 0; }
.diagnostic-resize-handle { position: absolute; z-index: 2; top: 0; left: 50%; width: 112px; height: 16px; padding: 0; border: 0; transform: translateX(-50%); background: transparent; cursor: ns-resize; touch-action: none; }
.diagnostic-resize-handle span { display: block; width: 56px; height: 4px; margin: 5px auto 0; border-radius: 999px; background: #a9aea6; }
.diagnostic-resize-handle:hover span, .diagnostic-resize-handle:focus-visible span { background: var(--amber); }
.diagnostic-panel.is-fullscreen .diagnostic-resize-handle { display: none; }
.diagnostic-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.diagnostic-panel h3 { margin: 0; font-size: 25px; }
.shell-debug-panel { position: fixed; z-index: 70; right: 16px; bottom: 16px; width: min(280px, calc(100vw - 32px)); padding: 14px 16px; border: 1px solid #cfc8bb; border-radius: 14px; color: var(--ink); background: #f8f5ed; box-shadow: 0 12px 34px #14231f35; font-size: 12px; }
.shell-debug-panel--collapsed { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: #44534b; }
.shell-debug-panel--collapsed svg { width: 18px; height: 18px; }
.shell-debug-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.shell-debug-panel > header strong { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.shell-debug-panel-close { border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.shell-debug-panel-caption { margin: 0 0 10px; color: #5c6a61; line-height: 1.4; }
.shell-debug-route { display: block; margin: 0 0 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; overflow-wrap: anywhere; }
.shell-debug-viewport-toggle { display: flex; gap: 6px; margin-bottom: 10px; }
.shell-debug-viewport-toggle button { flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; color: inherit; cursor: pointer; font-size: 11px; }
.shell-debug-viewport-toggle button.is-on { border-color: #1976d2; background: #1976d2; color: #fff; }
.shell-debug-counter { margin: 0 0 4px; }
.diagnostic-window-actions { display: flex; gap: 7px; }
.diagnostic-window-actions button { width: 34px; height: 34px; border: 1px solid #cbc6ba; border-radius: 10px; color: #59655d; background: #fffdf8; font-size: 19px; }
.diagnostic-workspace { height: calc(100% - 64px); display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 16px; padding-top: 12px; }
.diagnostic-service-menu { display: flex; flex-direction: column; gap: 8px; padding-right: 10px; border-right: 1px solid var(--line); }
.diagnostic-service-menu button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #c9cec4; border-radius: 11px; color: #58675e; background: #fffdf8; font-size: 18px; }
.diagnostic-service-menu button.is-active { color: #fff; border-color: #1d3027; background: #1d3027; }
.diagnostic-service-menu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.diagnostic-content { min-width: 0; overflow: auto; padding-right: 4px; }
.diagnostic-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 10px; margin-top: 14px; }
.diagnostic-item { padding: 15px; border: 1px solid #ddd6ca; border-left-width: 4px; border-radius: 13px; background: #fffdf8; }
.diagnostic-item--interactive, .builder-operation-strip__error { cursor: pointer; }
.diagnostic-item--interactive:hover, .diagnostic-item--interactive:focus-visible { outline: 0; border-color: #547864; box-shadow: 0 0 0 3px #54786422; }
.diagnostic-item--error { border-left-color: #b45d50; }
.diagnostic-item--warning { border-left-color: #c48b42; }
.diagnostic-item--info { border-left-color: #5d9a69; }
.diagnostic-item > div { display: flex; align-items: center; gap: 9px; }
.diagnostic-item > div span { color: #8a5c32; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.diagnostic-item p { margin: 9px 0 7px; color: #546159; font-size: 12px; line-height: 1.55; }
.diagnostic-item small { display: block; color: #86622f; font-size: 11px; line-height: 1.5; }
.diagnostic-clear { margin: 18px 0 2px; color: #506158; line-height: 1.6; }
.diagnostic-error-log > header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin: 2px 0 14px; }
.diagnostic-error-log h4 { margin: 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.diagnostic-error-log header p { margin: 5px 0 0; color: #6b786f; font-size: 11px; line-height: 1.5; }
.diagnostic-error-log > header > span { color: #76827a; font-size: 10px; white-space: nowrap; }
/* Правки по макету docs/interfaces/prototype-v2/shell-v2.html (2026-09-11,
   3-я попытка): компактные строки списком слева + постоянная панель
   деталей справа (.diag-split), вместо колонки крупных карточек и
   всплывающего поверх списка окна деталей. */
.diag-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 8px; }
.diag-tools .registry-filter { margin: 0; }
.diag-tools .registry-search { flex: 1 1 200px; width: auto; margin: 0; }
.diag-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(230px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .diag-split { grid-template-columns: 1fr; } }
.log-list { display: grid; gap: 6px; }
.log-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 8px; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #ddd6ca; border-radius: 10px; background: #fffdf8; font: inherit; text-align: left; cursor: pointer; }
.log-row:hover, .log-row:focus-visible { outline: 0; border-color: #547864; box-shadow: 0 0 0 3px #54786422; }
.log-row.is-on { border-color: var(--pine); background: #f3f0e5; }
.log-at { color: #728078; font-size: 10px; white-space: nowrap; }
.log-what { min-width: 0; }
.log-what b { display: block; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.log-what small { display: block; overflow: hidden; margin-top: 2px; color: #76827a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.log-count { color: #76827a; font-size: 10px; white-space: nowrap; }
.log-kind { width: 8px; height: 8px; border-radius: 50%; background: #b45d50; }
.log-row--warning .log-kind { background: #c48b42; }
.log-row--info .log-kind { background: #5d9a69; }
/* Разбор записи журнала — тот же случай: на top:0 он вставал ровно под
   полосу (DQ-187). */
.log-detail { position: sticky; top: var(--under-topbar); padding: 16px; border: 1px solid #cfc8bb; border-radius: 13px; background: #fffdf8; }
.log-detail > .hint { margin: 0; }
.diagnostic-error-detail > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.diagnostic-error-detail h4 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.diagnostic-error-detail > header button { width: 34px; height: 34px; border: 1px solid #cbc6ba; border-radius: 10px; color: #59655d; background: #fffdf8; font-size: 19px; }
.diagnostic-error-detail dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px 18px; margin: 18px 0; }
.diagnostic-error-detail dl div { min-width: 0; }
.diagnostic-error-detail dt { color: #728078; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.diagnostic-error-detail dd { min-width: 0; margin: 4px 0 0; color: #31453b; overflow-wrap: anywhere; }
.diagnostic-error-detail p { margin: 16px 0 7px; color: #425148; line-height: 1.55; }
.diagnostic-error-detail small { display: block; color: #86622f; line-height: 1.5; }
.diagnostic-error-detail > .secondary { margin-top: 14px; }
@keyframes diagnostic-alert { 0%, 100% { box-shadow: 0 0 0 0 #d86b5c00; } 50% { box-shadow: 0 0 0 5px #d86b5c38; } }
main { min-width: 0; padding: 0 42px 54px; }
/* Всё, к чему может привести переход по ссылке или прокрутка к выбранному,
   знает про верхнюю строку и останавливается ПОД ней, а не за ней (DQ-182).
   Перечислять виды элементов оказалось нельзя: список угадывался, и каждая
   новая цель прокрутки могла в него не попасть (DQ-187). Правило безопасно
   для всех: scroll-margin-top ничего не делает, пока к элементу не ведёт
   переход или прокрутка. */
main * { scroll-margin-top: var(--under-topbar); }
/* Верхняя строка (крошки + действия) зафиксирована на всех расширениях —
   раньше уходила при прокрутке, из-за чего уже прижатые к её высоте
   sticky-элементы повисали над пустым местом. Теперь высота у всех общая:
   --topbar-height. */
.topbar { position: sticky; top: 0; z-index: 7; height: var(--topbar-height); display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #f7f3e8ee; backdrop-filter: blur(4px); color: #667269; font-size: 13px; }
.topbar-context { min-width: 0; display: flex; align-items: center; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #5d9a69; }
.breadcrumbs { min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.breadcrumbs ol { display: flex; align-items: center; gap: 0; min-width: max-content; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { display: flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: "›"; margin: 0 8px; color: #9aa49d; }
.breadcrumbs button { padding: 5px 3px; border: 0; border-radius: 6px; color: #476958; background: transparent; font: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .15s ease, background-color .15s ease, text-decoration-color .15s ease; }
.breadcrumbs button:hover { color: #173f2b; background: #dfe8df; text-decoration-color: currentColor; }
.breadcrumbs button:focus-visible { outline: 3px solid rgb(25 118 210 / 24%); color: #173f2b; }
.breadcrumbs span[aria-current="page"] { color: #4e5f56; font-weight: 700; }
.breadcrumbs span[aria-disabled="true"] { color: #8e9892; }
.refresh, .settings-form button { padding: 9px 14px; border: 1px solid #c5cabe; border-radius: 10px; background: #f8f5ed; color: var(--ink); }
.topbar-actions { flex: 0 0 auto; display: flex; gap: 8px; }
.language-selector { display: flex; align-items: center; gap: 6px; }
.language-selector span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.language-selector select { padding: 8px 10px; border: 1px solid #c5cabe; border-radius: 10px; background: #fff; color: var(--ink); }
.diagnostic-settings { max-width: 720px; padding: 18px; }
.diagnostic-settings h4 { margin: 0 0 12px; font-family: Georgia, serif; font-size: 22px; }
.diagnostic-settings > div, .interface-settings > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; border-top: 1px solid var(--line); }
.diagnostic-settings p, .interface-settings small { color: #6b786f; line-height: 1.55; }
.interface-artifact-stale { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid #a4483c; background: #fbf1ef; color: #7d3125; }
.screen { max-width: 1280px; margin: 0 auto; }
.screen-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 14px 0 28px; }
/* Шапка встроенного экрана: раздел уже назвал себя сверху, поэтому отступ
   здесь меньше и надпись-надзаголовок не повторяется (DQ-183). */
.screen-head--embedded { margin: 6px 0 18px; }
.screen-head-actions { display: flex; align-items: center; gap: 12px; }
/* DQ-517: «Зовнішній API» в шапке карточки модуля — справа, рядом со значком состояния. */
.screen-head > .module-api-link { margin-left: auto; }
.module-create-shortcut { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid #c79859; border-radius: 50%; color: #172b22; background: #f3b861; box-shadow: 0 8px 20px rgb(160 104 39 / 18%); font-size: 28px; line-height: 1; cursor: pointer; }
.module-create-shortcut:hover, .module-create-shortcut:focus-visible { border-color: #805426; outline: 3px solid rgb(243 184 97 / 28%); }
.eyebrow { margin: 0 0 7px; color: #7a897b; font-size: 11px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 4vw, 52px); font-weight: 500; letter-spacing: -.04em; }
h3 { margin: 0 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; }
.hint { color: #718078; font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric, .panel, .run-row, .incident-row, .kpi-feed__item { border: 1px solid var(--line); background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; }
.metric { min-height: 126px; padding: 20px; border-radius: 18px; }
.metric span, .metric small { display: block; color: #728078; }
.metric span { font-size: 12px; }
.metric strong { display: block; margin: 12px 0 6px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.metric small { min-height: 1.2em; font-size: 11px; }
.metric--linked { position: relative; color: inherit; text-align: left; cursor: pointer; transition: transform .16s ease, border-color .16s ease; }
@media (hover: hover) {
  .metric--linked:hover, .metric--linked:focus-visible, .kpi-card:hover, .kpi-card:focus-visible, .module-card--linked:hover, .module-card--linked:focus-visible { transform: translateY(-2px); border-color: #b79162; outline: none; }
}
.metric--linked b { position: absolute; right: 16px; bottom: 12px; color: #9a6a31; font-size: 9px; text-transform: uppercase; }
.split { display: grid; grid-template-columns: 1.5fr .7fr; gap: 18px; }
.panel { padding: 28px; border-radius: 20px; }
.identity-card dl { margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.identity-card dl div { min-width: 0; padding-top: 13px; border-top: 1px solid #ddd8cd; }
dt { margin-bottom: 6px; color: #78857d; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
dd { margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.pulse-card { display: grid; place-items: center; text-align: center; background: #1b2a24; color: #f7f2e7; }
.pulse-card .eyebrow { color: #94a297; }
.pulse-card p:last-child { color: #aab5ad; font-size: 12px; line-height: 1.6; }
.pulse-orbit { width: 132px; height: 132px; margin: 10px; display: grid; place-items: center; border: 1px solid #66766b; border-radius: 50%; box-shadow: inset 0 0 0 15px #ffffff05, 0 0 0 10px #ffffff04; }
.pulse-orbit span { font-family: Georgia, serif; font-size: 33px; color: #f1b76d; }
.storage-identity { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr 2fr 1fr; gap: 18px; }
.storage-identity div { min-width: 0; }
.storage-identity span, .inventory article span { display: block; margin-bottom: 6px; color: #78857d; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.storage-identity strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.inventory { margin-top: 18px; }
.inventory > header { display: flex; align-items: end; justify-content: space-between; margin: 0 2px 12px; }
.inventory h3 { margin: 0; }
.inventory article { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(80px, .5fr)) auto; align-items: center; gap: 16px; margin-bottom: 8px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8d9; }
.inventory article strong, .inventory article small { display: block; }
.inventory article small { margin-top: 5px; color: #849087; font-size: 10px; }
.status { display: inline-flex; align-items: center; max-width: max-content; padding: 6px 9px; border-radius: 999px; background: #dde6dd; color: #47604d; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.status--conflict, .status--error { background: #f2ddd9; color: #8f4237; }
.status--readonly { background: #ece2d1; color: #8c673b; }
.status--active, .status--ready, .status--ok, .status--available, .status--stable, .status--supported, .status--unavailable { background: #dcebdd; color: #35633e; }
.status--warning, .status--development, .status--candidate, .status--planned, .status--unverified { background: #f2e6cf; color: #865f2d; }
.status--blocked, .status--absent, .status--disabled { background: #eadfdd; color: #7e4f48; }
.status--not_configured { background: #fff0c7; color: #735515; }
.run-list, .incident-list { display: grid; gap: 10px; }
.run-row { display: grid; grid-template-columns: 150px repeat(3, minmax(120px, 1fr)) 90px 155px; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 15px; }
.run-row strong, .run-row small { display: block; }
.run-row small { margin-top: 5px; color: #79857e; font-size: 10px; }
.phase { position: relative; height: 34px; overflow: hidden; border-radius: 8px; background: #e9e6dd; }
.phase span { --share: 4%; position: absolute; inset: 0 auto 0 0; width: 100%; display: flex; align-items: center; padding: 0 9px; white-space: nowrap; color: #46544c; background: linear-gradient(90deg, #cdd6c5 var(--share), transparent var(--share)); font-size: 10px; }
/* Доля фазы: класс вместо inline style="--share" (CSP style-src 'self'). Шаг 5%. */
.phase--s5 { --share: 5%; } .phase--s10 { --share: 10%; } .phase--s15 { --share: 15%; }
.phase--s20 { --share: 20%; } .phase--s25 { --share: 25%; } .phase--s30 { --share: 30%; }
.phase--s35 { --share: 35%; } .phase--s40 { --share: 40%; } .phase--s45 { --share: 45%; }
.phase--s50 { --share: 50%; } .phase--s55 { --share: 55%; } .phase--s60 { --share: 60%; }
.phase--s65 { --share: 65%; } .phase--s70 { --share: 70%; } .phase--s75 { --share: 75%; }
.phase--s80 { --share: 80%; } .phase--s85 { --share: 85%; } .phase--s90 { --share: 90%; }
.phase--s95 { --share: 95%; } .phase--s100 { --share: 100%; }
.run-rate strong { font-family: Georgia, serif; font-size: 21px; }
.incident-row { display: grid; grid-template-columns: 54px 1fr auto; align-items: start; gap: 16px; padding: 18px; border-radius: 15px; }
.severity { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #f2ddd9; color: #9d473b; font-size: 9px; font-weight: 800; }
.incident-row p { margin: 6px 0; color: #5f6d65; font-size: 13px; }
.incident-row small { color: #89948d; }
.retention { max-width: 720px; }
.retention > div { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.retention span { color: #6e7c73; }
.note { margin: 20px -6px -6px; padding: 16px; border-radius: 12px; background: #f0ece1; color: #667269; font-size: 12px; line-height: 1.6; }
.settings-form { max-width: 820px; }
.settings-form label { display: block; margin-bottom: 8px; color: #6d796f; font-size: 12px; }
.settings-form > div { display: flex; gap: 8px; }
.settings-form input { flex: 1; min-width: 0; padding: 12px 13px; border: 1px solid #cdd0c6; border-radius: 10px; background: #f8f6ef; }
.settings-form p, .architecture-note p { color: #68756d; line-height: 1.7; }
.architecture-note { max-width: 820px; margin-top: 16px; }
.screen-intro { max-width: 900px; margin: -12px 0 26px; color: #637168; line-height: 1.7; }
.hero-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 18px; margin-bottom: 18px; }
.ecosystem-hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); }
.ecosystem-head > div > p:not(.eyebrow) { max-width: 670px; margin: 11px 0 0; color: #69766e; line-height: 1.6; }
.launch-card { background: linear-gradient(145deg, #1b2a24, #263a30); color: #f8f3e9; }
.ecosystem-launch-card { position: relative; overflow: hidden; }
.ecosystem-launch-card::after { position: absolute; top: -70px; right: -50px; width: 210px; height: 210px; border: 1px solid #f0b76d28; border-radius: 50%; box-shadow: 0 0 0 27px #f0b76d0b, 0 0 0 58px #ffffff05; content: ""; pointer-events: none; }
.ecosystem-launch-card__top, .clientgate-overview__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ecosystem-launch-card__top > span { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #f0b76d56; border-radius: 50%; color: #f0b76d; font-size: 24px; }
.launch-card h3 { font-size: 30px; }
.launch-card > p { color: #b8c3bb; line-height: 1.7; }
.gate-access-prompt { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: #b8c3bb; line-height: 1.6; }
.help-popover { position: relative; flex: 0 0 auto; }
.help-popover summary { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #718178; border-radius: 50%; color: #f1b76d; cursor: pointer; font-size: 11px; font-weight: 800; list-style: none; }
.help-popover summary::-webkit-details-marker { display: none; }
.help-popover p { position: absolute; z-index: 5; left: 30px; top: -14px; width: min(360px, 55vw); margin: 0; padding: 13px 15px; border: 1px solid #53655b; border-radius: 12px; color: #d8e0da; background: #10201a; box-shadow: 0 15px 38px #0006; font-size: 11px; line-height: 1.55; }
.gate-access-action { width: 100%; margin: 0 0 4px; padding: 11px 13px; border: 1px solid #697d71; border-radius: 10px; color: #f4bd77; background: #ffffff08; text-align: left; font-weight: 700; }
.gate-access-action:hover, .gate-access-action:focus-visible { border-color: #f1b76d; outline: none; background: #ffffff0e; }
.clientgate-overview { position: relative; overflow: hidden; display: flex; min-height: 280px; flex-direction: column; border-color: #b6c8b8; background: linear-gradient(155deg, #fdfbf5, #edf2eb); }
.clientgate-overview::after { position: absolute; right: -40px; bottom: -52px; width: 165px; height: 165px; border: 1px solid #4a76523d; border-radius: 50%; box-shadow: 0 0 0 24px #4a76520c, 0 0 0 50px #4a765206; content: ""; pointer-events: none; }
.clientgate-overview h3 { margin: 20px 0 10px; font-size: clamp(25px, 2.6vw, 34px); }
.clientgate-overview > p { max-width: 340px; margin: 0; color: #607166; line-height: 1.65; }
.clientgate-overview footer { position: relative; z-index: 1; margin-top: auto; padding-top: 22px; }
.clientgate-overview button { padding: 10px 14px; border: 1px solid #244635; border-radius: 10px; color: #fff; background: #214032; font-weight: 750; }
.clientgate-overview button:hover:not(:disabled), .clientgate-overview button:focus-visible { border-color: #bc7f32; outline: 3px solid #d89c4e2e; background: #315b45; }
.clientgate-overview button:disabled { cursor: wait; opacity: .58; }
.ecosystem-start-path { grid-column: 1 / -1; }
.linked-panel { cursor: pointer; transition: transform .16s ease; }
@media (hover: hover) {
  .linked-panel:hover, .linked-panel:focus-visible { transform: translateY(-2px); outline: 2px solid #d99a4e; outline-offset: 3px; }
}
.fact-row { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-top: 1px solid #ffffff17; font-size: 12px; }
.fact-row span { color: #9caaa0; }
.fact-row strong { text-align: right; }
.start-path ol { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: path; }
.start-path li { position: relative; padding: 2px 0 22px 44px; counter-increment: path; }
.start-path li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 29px; bottom: 3px; border-left: 1px solid #c7cfc4; }
.start-path li::before { content: counter(path); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #674414; background: #f1b76d; font-size: 11px; font-weight: 800; }
.start-path li button { width: 100%; margin: -8px 0 0 -10px; padding: 8px 10px; border: 0; border-radius: 10px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.start-path li button:hover, .start-path li button:focus-visible { outline: 2px solid #d99a4e; outline-offset: 2px; background: #f5ead9; }
.start-path li strong, .start-path li span { display: block; }
.start-path li span { margin-top: 4px; color: #77847c; font-size: 12px; }
.diagnostic-command { display: block; overflow-x: auto; margin-top: 10px; padding: 10px 12px; border-radius: 8px; color: #f5dfbd; background: #10201a; white-space: nowrap; user-select: all; }
.check-list { margin-top: 24px; }
.check-list > header { display: flex; align-items: end; justify-content: space-between; margin: 0 2px 12px; }
.check-list h3 { margin: 0; }
.check-group { margin-top: 18px; }
.check-group h4 { margin: 0 2px 8px; color: #435349; font-size: 13px; }
.check-row { display: grid; grid-template-columns: 105px 1fr auto; gap: 16px; align-items: start; margin-bottom: 8px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8d9; }
.check-row strong, .check-row p, .check-row small { display: block; }
.check-row p { margin: 5px 0; color: #637168; font-size: 12px; }
.check-row small { color: #91662f; line-height: 1.5; }
.check-row button { margin-top: 10px; padding: 8px 12px; border: 0; border-radius: 9px; color: #fff; background: #35633e; cursor: pointer; font-weight: 700; }
.check-row button:disabled { cursor: wait; opacity: .55; }
.check-row > span { color: #7f8a82; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.module-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; }
.module-card > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.module-card-state { display: flex; align-items: center; gap: 8px; }
.module-size { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #c9cec4; border-radius: 9px; color: #72562f; background: #f4efe2; font-size: 16px; }
.module-card h3 { margin: 0; font-size: 23px; }
.module-card > p { display: -webkit-box; min-height: 44px; overflow: hidden; color: #657269; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.network-port-link { color: inherit; text-decoration: underline; text-decoration-color: #b79162; text-underline-offset: 3px; }
.network-port-link:hover, .network-port-link:focus-visible { color: #8c673b; outline: none; }
.network-port-off { color: #8c8a80; font-weight: 600; }
.module-id { margin: 0 0 5px; color: #879188; font: 700 9px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .07em; text-transform: uppercase; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 13px 0; }
.tag-row span { padding: 4px 7px; border-radius: 7px; color: #55645b; background: #e8ece4; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.module-card details { padding: 10px 0; border-top: 1px solid #e0dbd0; color: #637168; font-size: 12px; }
.module-card summary { cursor: pointer; font-weight: 700; color: #4f5d55; }
.detail-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0 0; }
.detail-row > span { overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, Consolas, monospace; font-size: 10px; }
.setting-ref { display: grid; gap: 4px; padding: 10px 0 0; }
.setting-ref code { color: #8a5f2b; font-size: 10px; }
.setting-ref small { line-height: 1.45; }
.module-card footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 15px -4px -4px; padding: 12px; border-radius: 10px; color: #6e7b73; background: #f3f0e8; font-size: 10px; }
.sandbox-launch-action { padding: 6px 10px; border: 1px solid #f1b76d; border-radius: 7px; color: #8a5f2b; background: #fff9ef; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; cursor: pointer; }
.sandbox-launch-action:hover, .sandbox-launch-action:focus-visible { border-color: #dfa254; background: #fff2dc; outline: none; }
.filter-section { margin-bottom: 34px; display: grid; gap: 14px; }
.module-search { max-width: 720px; display: flex; align-items: center; gap: 10px; }
.module-search input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid #cdd0c6; border-radius: 10px; color: var(--ink); background: #fffdf8d9; }
.module-search button, .table-action { padding: 9px 12px; border: 1px solid #c5cabe; border-radius: 9px; color: #25372d; background: #f8f5ed; }
.filter-toggles { display: flex; flex-wrap: wrap; gap: 9px; }
.module-filter { cursor: pointer; opacity: .58; transition: opacity .16s ease, box-shadow .16s ease; }
.module-filter input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.module-filter > span { width: 12px; height: 12px; margin-right: 6px; border: 1px solid currentColor; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 3px transparent; }
.module-filter.is-selected { opacity: 1; box-shadow: 0 0 0 2px #87663824; }
.module-filter.is-selected > span { background: currentColor; box-shadow: inset 0 0 0 3px #fff8; }
.passport-facts { display: flex; justify-content: space-between; gap: 18px; color: #6f7c73; }
.capability-passport { margin: 18px 0; }
.capability-passport > div { display: grid; grid-template-columns: 150px minmax(180px, .7fr) 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.capability-passport span, .capability-passport small { color: #7b877f; font-size: 10px; }
.capability-passport p { margin: 0; color: #5f6d65; font-size: 12px; }
.task-hub-registry { margin-top: 20px; overflow: hidden; }
.task-hub-registry > header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.task-hub-registry > header h3, .task-hub-registry > header p { margin: 0; }
.task-hub-registry > header p { margin-top: 6px; color: #68756d; font-size: 12px; }
.task-hub-table { min-width: 780px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.task-hub-row { width: 100%; box-sizing: border-box; display: grid; grid-template-columns: minmax(210px, 1.3fr) minmax(190px, 1fr) minmax(110px, .6fr) minmax(110px, .6fr) minmax(110px, .6fr) minmax(105px, .5fr); gap: 14px; align-items: center; padding: 14px 16px; border: 0; border-top: 1px solid var(--line); color: var(--ink); background: #fffdf8; text-align: left; font: inherit; }
button.task-hub-row { cursor: pointer; }
button.task-hub-row:hover, button.task-hub-row:focus-visible { position: relative; z-index: 1; outline: 2px solid #b79162; outline-offset: -2px; background: #f8f4e9; }
.task-hub-row--head { border-top: 0; color: #77847c; background: #f1efe7; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.task-hub-module { display: grid; gap: 4px; }
.task-hub-module code, .task-hub-row > code { color: #835c2d; font-size: 10px; overflow-wrap: anywhere; }
.task-hub-module small { color: #68756d; line-height: 1.4; }
.task-hub-history { display: grid; gap: 3px; }
.task-hub-history small { color: #77847c; }
.task-hub-row .tag-row { margin: 0; }
.module-card--linked { cursor: pointer; transition: transform .16s ease, border-color .16s ease; }
.child-modules { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0; padding: 11px; border-radius: 10px; background: #edf0e9; }
.child-modules span { width: 100%; color: #78857c; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.child-modules strong { padding: 5px 8px; border: 1px solid #cfd6cc; border-radius: 8px; font-size: 10px; }
.launch-mode-list { display: grid; gap: 10px; }
.launch-mode-list > article { display: grid; grid-template-columns: 1fr 170px; gap: 22px; align-items: center; padding: 20px 22px; border: 1px solid var(--line); border-radius: 17px; background: #fffdf8d9; }
.launch-mode-list h3 { margin: 0; font-size: 22px; }
.launch-mode-list p:not(.module-id) { margin: 7px 0 0; color: #66736b; }
.launch-mode-list article > div:last-child { display: grid; justify-items: end; gap: 7px; }
.launch-mode-list small { color: #849087; font-size: 10px; }
.guard-note { margin-top: 18px; max-width: 900px; }
.guard-note p { color: #68756d; line-height: 1.7; }
.access-panel { max-width: 900px; margin: 18px 0; }
.access-panel--error { border-color: #b45d50; background: #fff3ef; box-shadow: 0 0 0 4px #b45d5020, 0 18px 45px #6d2c2020; }
.client-gate-bootstrap { text-align: center; }
.client-gate-spinner { display: grid; place-items: center; min-height: 96px; }
.client-gate-spinner span { width: 52px; height: 52px; border: 5px solid #d8ddd5; border-top-color: var(--amber); border-radius: 50%; animation: client-gate-spin .9s linear infinite; }
.client-gate-install-status { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: #68756d; }
.client-gate-install-status .client-gate-spinner { min-height: 34px; min-width: 34px; }
.client-gate-install-status .client-gate-spinner span { width: 24px; height: 24px; border-width: 3px; }
.client-gate-install-status p { margin: 0; line-height: 1.45; }
@keyframes client-gate-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .client-gate-spinner span { animation-duration: 2.4s; } }
.access-error { margin: 0 0 16px; padding: 11px 13px; border-left: 4px solid #b45d50; border-radius: 8px; color: #843a30 !important; background: #f9dfd9; font-weight: 650; }
.access-panel > p { color: #68756d; line-height: 1.7; }
.access-panel--login { max-width: 620px; }
.auth-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 20px; }
.auth-form label { display: grid; gap: 7px; color: #657269; font-size: 11px; }
.auth-form input { min-width: 0; padding: 12px 13px; border: 2px solid #cdd0c6; border-radius: 10px; outline: 3px solid transparent; outline-offset: 1px; background: #fbf9f2; transition: border-color .15s ease, outline-color .15s ease, background-color .15s ease; }
.auth-form input:focus { border-color: #66766d; outline-color: #66766d24; }
.auth-form input.is-valid { border-color: #4f9461; outline-color: #4f946125; background: #f3fbf4; }
.auth-form input.is-invalid { border-color: #bd584d; outline-color: #bd584d2b; background: #fff5f2; }
.auth-form input.is-valid:focus { outline-color: #4f946142; }
.auth-form input.is-invalid:focus { outline-color: #bd584d42; }
.password-feedback { min-height: 16px; color: #758179; font-size: 10px; line-height: 1.35; }
.password-feedback.is-valid { color: #357746; }
.password-feedback.is-valid::before { content: "✓ "; font-weight: 900; }
.password-feedback.is-invalid { color: #a54137; }
.password-feedback.is-invalid::before { content: "! "; font-weight: 900; }
.auth-form button, .access-recovery button { padding: 12px 18px; border: 1px solid #21352b; border-radius: 10px; color: #fff; background: #1d3027; }
.auth-form button:disabled { cursor: not-allowed; border-color: #aeb6b0; color: #777f79; background: #dfe2dc; }
.builder-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.module-builder-form { display: grid; gap: 14px; margin-top: 18px; }
.module-builder-form label { display: grid; gap: 7px; color: #657269; font-size: 12px; }
.module-builder-form input, .module-builder-form textarea { width: 100%; box-sizing: border-box; padding: 12px 13px; border: 1px solid #cdd0c6; border-radius: 10px; color: #1d3027; background: #fbf9f2; font: inherit; }
.module-builder-form textarea { resize: vertical; }
.module-builder-form button { justify-self: start; padding: 12px 18px; border: 1px solid #21352b; border-radius: 10px; color: #fff; background: #1d3027; }
.module-builder-form button:disabled { cursor: wait; opacity: .65; }
.prototype-auto-update-runtime { display: grid; grid-template-columns: minmax(150px, .45fr) minmax(0, 1fr); gap: 8px 12px; padding: 12px; border: 1px solid #dedbd1; border-radius: 10px; background: #f8f6ef; }
.prototype-auto-update-runtime span { color: #657269; font-size: 12px; }
.prototype-development-settings__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.module-builder-form .prototype-development-settings__actions button { margin: 0; }
.prototype-development-settings__actions .secondary { color: #1d3027; background: #f7f5ed; }
.settings-zone { margin-top: 16px; padding: 15px; border: 1px solid #d8d8cf; border-radius: 13px; background: #fbfaf5; }
.settings-zone > h4 { margin: 0 0 10px; color: #657269; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.settings-zone--closed { border-color: #c9d0cc; background: #f5f6f3; }
.settings-public-status { margin: 0; padding: 10px 12px; border-radius: 9px; color: #315d43; background: #eaf4ed; font-size: 12px; font-weight: 700; }
.settings-zone-locked { display: grid; gap: 5px; padding: 12px; border: 1px dashed #aeb7b1; border-radius: 10px; color: #58665e; background: #eef0ed; }
.settings-zone-locked::before { content: "🔒"; grid-row: 1 / span 2; margin-right: 4px; }
.settings-zone-locked strong, .settings-zone-locked p { grid-column: 2; margin: 0; }
.settings-zone-locked p { font-size: 12px; line-height: 1.5; }
.switch-control { position: relative; display: grid !important; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 11px !important; width: fit-content; max-width: 100%; cursor: pointer; color: #44534b !important; font-size: 12px; line-height: 1.45; }
.switch-control input[type="checkbox"] { position: absolute; width: 1px !important; height: 1px; margin: 0; padding: 0 !important; overflow: hidden; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 48px; height: 28px; box-sizing: border-box; border: 2px solid #8f9993; border-radius: 999px; background: #b9bfbb; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(24 41 33 / 35%); transition: transform .18s ease; }
.switch-control input[type="checkbox"]:checked + .switch-track { border-color: #1268bd; background: #1976d2; }
.switch-control input[type="checkbox"]:checked + .switch-track::after { transform: translateX(20px); }
.switch-control input[type="checkbox"]:focus-visible + .switch-track { box-shadow: 0 0 0 4px rgb(25 118 210 / 24%); }
.switch-control input[type="checkbox"]:disabled + .switch-track { opacity: .55; }
.switch-control:has(input:disabled) { cursor: not-allowed; opacity: .72; }
.switch-label { min-width: 0; }
.builder-safety, .builder-message { margin-top: 14px; color: #657269; font-size: 12px; }
.builder-message { padding: 10px 12px; border-radius: 9px; color: #357746; background: #eef8f0; }
.prototype-list { max-height: calc(100vh - 280px); max-height: calc(100svh - 280px); overflow: auto; }
.prototype-list > h3 { margin-top: 0; }
.prototype-list code, .prototype-list small { color: #657269; overflow-wrap: anywhere; }
.prototype-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; gap: 12px; padding: 0; list-style: none; }
.prototype-development-card { display: flex; min-width: 0; }
.prototype-development-card__open { display: grid; grid-template-rows: auto minmax(4.4em, 1fr) auto auto; gap: 14px; width: 100%; min-height: 268px; padding: 16px; border: 1px solid #d9d7ce; border-radius: 14px; color: #1d3027; background: #fbfaf5; box-shadow: 0 5px 18px rgb(35 51 43 / 5%); text-align: left; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
@media (hover: hover) {
  .prototype-development-card__open:hover { border-color: #8fa89b; box-shadow: 0 10px 24px rgb(35 51 43 / 10%); transform: translateY(-2px); }
}
.prototype-development-card__open:focus-visible { outline: 3px solid rgb(25 118 210 / 28%); outline-offset: 2px; border-color: #1976d2; }
.prototype-development-card__open > header, .prototype-development-card__open > header > div { display: flex; gap: 9px; }
.prototype-development-card__open > header { align-items: flex-start; justify-content: space-between; }
.prototype-development-card__open > header > div { min-width: 0; align-items: flex-start; flex-direction: column; gap: 3px; }
.prototype-development-card__open > header strong { font-size: 16px; overflow-wrap: anywhere; }
.prototype-development-card__open > p { display: -webkit-box; min-height: 4.4em; margin: 0; overflow: hidden; color: #657269; line-height: 1.48; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.prototype-development-card__open dl, .prototype-detail dl { display: grid; gap: 7px; margin: 0; }
.prototype-development-card__open dl > div, .prototype-detail dl > div { display: grid; grid-template-columns: minmax(112px, .42fr) minmax(0, 1fr); gap: 8px; }
.prototype-development-card__open dt, .prototype-detail dt { color: #7c887f; font-size: 12px; }
.prototype-development-card__open dd, .prototype-detail dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.prototype-development-card__cta { display: flex; align-items: center; justify-content: space-between; padding-top: 11px; border-top: 1px solid #e1dfd6; color: #315c47; font-weight: 800; }
.prototype-development-card__cta i { font-size: 19px; font-style: normal; transition: transform .18s ease; }
@media (hover: hover) {
  .prototype-development-card__open:hover .prototype-development-card__cta i { transform: translateX(3px); }
}
.prototype-detail { display: grid; gap: 18px; }
.prototype-detail-back { justify-self: start; padding: 8px 11px; border: 1px solid #bcc5bf; border-radius: 9px; color: #315c47; background: #f7f5ed; font-weight: 800; }
.prototype-detail-back:hover { border-color: #70877a; background: #eef2ed; }
.prototype-detail-back:focus-visible, .prototype-actions button:focus-visible { outline: 3px solid rgb(25 118 210 / 25%); outline-offset: 2px; }
.prototype-detail > header, .prototype-detail > header > div, .prototype-actions { display: flex; align-items: center; gap: 10px; }
.prototype-detail > header { align-items: flex-start; justify-content: space-between; }
.prototype-detail > header > div { align-items: flex-start; flex-direction: column; gap: 4px; }
.prototype-detail > header h3 { margin: 0; font-size: clamp(24px, 3vw, 38px); }
.prototype-detail > header h3:focus { outline: none; }
.prototype-detail-description { padding: 16px; border: 1px solid #dedbd1; border-radius: 12px; background: #f8f6ef; }
.prototype-detail-description h4 { margin: 0 0 9px; color: #657269; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.prototype-detail-description p { margin: 0; color: #425349; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.prototype-detail details { padding-top: 11px; border-top: 1px solid #e1dfd6; }
.prototype-detail summary { cursor: pointer; color: #315c47; font-weight: 700; }
.prototype-source-tree { display: grid; gap: 4px; max-height: 210px; margin-top: 10px; padding: 10px; overflow: auto; border-radius: 8px; background: #f3f1e9; }
.prototype-actions { flex-wrap: wrap; padding-top: 4px; }
.prototype-actions button, .builder-dialog-actions button { padding: 9px 12px; border: 1px solid #21352b; border-radius: 9px; color: #fff; background: #1d3027; font-weight: 700; }
.prototype-actions button.secondary, .builder-dialog-actions button.secondary, .access-recovery button.secondary { color: #1d3027; background: #f7f5ed; }
.prototype-actions button:disabled, .builder-dialog-actions button:disabled { cursor: wait; opacity: .65; }
.status--handoff-workspace_created { background: #ece2d1; color: #8c673b; }
.status--handoff-bootstrap_push_required, .status--handoff-developer_access_required { background: #f2e6cf; color: #865f2d; }
.status--handoff-developer_access_verified, .status--handoff-development { background: #dcebdd; color: #35633e; }
.workspace-developer-access { margin-top: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #f7f5ed; }
.workspace-developer-access > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.workspace-developer-access h4 { margin: 0; font-size: 15px; }
.workspace-access-intro { margin: 0 0 14px; color: #657269; font-size: 12px; line-height: 1.5; }
.workspace-developer-access > button { margin-bottom: 14px; padding: 9px 12px; border: 1px solid #21352b; border-radius: 9px; color: #fff; background: #1d3027; font-weight: 700; }
.workspace-developer-access > button:disabled { cursor: wait; opacity: .65; }
.workspace-conflict { margin: 0 0 16px; padding: 12px 14px; border: 1px dashed #cbb989; border-radius: 10px; background: #fbf3df; }
.workspace-conflict strong { display: block; margin-bottom: 4px; color: #7a5b1f; }
.workspace-conflict p { margin: 0 0 10px; color: #6b5a34; font-size: 12px; line-height: 1.5; }
.workspace-conflict button { padding: 9px 12px; border: 1px solid #21352b; border-radius: 9px; color: #1d3027; background: #f7f5ed; font-weight: 700; }
.workspace-conflict button:disabled { cursor: wait; opacity: .65; }
.workspace-access-actions { display: flex; gap: 10px; margin-top: 2px; }
.module-builder-form button.secondary { color: #1d3027; background: #f7f5ed; }
.workspace-access-status { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; font-size: 12px; line-height: 1.5; background: #ece7d8; color: #5c6a5f; }
.workspace-access-status--required { color: #865f2d; background: #f2e6cf; }
.workspace-access-status--verified, .workspace-access-status--development { color: #35633e; background: #dcebdd; }
.builder-operation-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid #d6d1c6; border-radius: 11px; background: #f8f5ed; }
.builder-operation-strip > strong { margin-right: 4px; font-size: 12px; }
.builder-operation-strip > span { display: inline-flex; align-items: center; gap: 7px; }
.builder-operation-strip__error { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; }
.builder-operation-strip__error:focus-visible { outline: 2px solid #547864; outline-offset: 3px; border-radius: 5px; }
.builder-operation-strip code { color: #657269; font-size: 10px; }
.builder-operation-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; color: #75582e; background: #fff1d7; font-size: 10px; font-weight: 800; }
.builder-operation-status i { width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-style: normal; }
.builder-operation-status.is-running i, .builder-operation-status.is-queued i { animation: builder-operation-spin 1s linear infinite; }
.builder-operation-status.is-succeeded { color: #28683a; background: #e4f3e7; }
.builder-operation-status.is-failed { color: #9c4137; background: #f8e1dd; }
@keyframes builder-operation-spin { to { transform: rotate(360deg); } }
.module-builder-create-dock { position: fixed; z-index: 35; left: 76px; right: 0; bottom: 0; height: var(--builder-create-height, 620px); max-height: calc(100vh - 80px); max-height: calc(100svh - 80px); overflow: hidden; padding: 18px 24px; border: 1px solid #cfc8bb; border-radius: 18px 18px 0 0; color: var(--ink); background: #f8f5ed; box-shadow: 0 -20px 70px #14231f35; }
.is-sidebar-expanded .module-builder-create-dock { left: 232px; }
.module-builder-create-dock.is-fullscreen { left: 0; top: 0; height: 100vh; height: 100svh; max-height: none; border-radius: 0; }
.module-builder-create-resize { position: absolute; z-index: 2; top: 0; left: 50%; width: 112px; height: 16px; padding: 0; border: 0; transform: translateX(-50%); background: transparent; cursor: ns-resize; touch-action: none; }
.module-builder-create-resize span { display: block; width: 56px; height: 4px; margin: 5px auto 0; border-radius: 999px; background: #a9aea6; }
.module-builder-create-resize:hover span, .module-builder-create-resize:focus-visible span { background: var(--amber); }
.module-builder-create-dock.is-fullscreen .module-builder-create-resize { display: none; }
.module-builder-create-dock > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.module-builder-create-dock > header h3 { margin: 0; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.module-builder-create-dock > header p:not(.eyebrow) { margin: 5px 0 0; color: #68756d; font-size: 12px; }
.module-builder-create-content { height: calc(100% - 84px); overflow: auto; padding: 0 4px 18px 0; }
.module-builder-create-content .module-builder-form { max-width: 980px; }
.builder-modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(10 27 20 / 58%); }

/* Окно вопроса и сообщения системы (DQ-199). Раньше здесь спрашивал браузер
   своим окном — чужим шрифтом, чужими клавишами, с заголовком «127.0.0.1
   повідомляє». Это окно наше и живёт в общей стилистике.
   Опасное действие отличается ЦВЕТОМ: человек должен узнать его до того, как
   прочтёт текст. */
.system-dialog { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; }
.system-dialog__veil { position: absolute; inset: 0; background: rgb(10 27 20 / 58%); }
.system-dialog__card { position: relative; width: min(460px, 100%); max-height: calc(100svh - 40px); overflow: auto; padding: 22px 24px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8; box-shadow: 0 24px 70px #14231f35; }
.system-dialog__title { margin: 0 0 10px; color: var(--ink); font-size: 17px; }
.system-dialog__text { margin: 0 0 20px; color: #425148; font-size: 14px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.system-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.system-dialog__button { min-height: 44px; padding: 10px 18px; border: 1px solid #c5cabe; border-radius: 10px; background: #f8f5ed; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.system-dialog__button--confirm { border-color: #476958; background: #476958; color: #f7f3e8; }
.system-dialog__button:focus-visible { outline: 3px solid rgb(25 118 210 / 24%); }
@media (hover: hover) {
  .system-dialog__button--cancel:hover { border-color: #476958; }
  .system-dialog__button--confirm:hover { background: #173f2b; }
}
/* Опасный вид: тёплая рамка, тёплая полоса сверху и красная клавиша согласия.
   Те же размеры и то же расположение — меняется только цвет, чтобы разница
   читалась мгновенно и не требовала чтения. */
.system-dialog--danger .system-dialog__card { border-color: #ddb6ae; border-top: 4px solid #9b3b2f; }
.system-dialog--danger .system-dialog__title { color: #8f4237; }
.system-dialog--danger .system-dialog__button--confirm { border-color: #9b3b2f; background: #9b3b2f; }
@media (hover: hover) { .system-dialog--danger .system-dialog__button--confirm:hover { background: #8f4237; } }
@media (max-width: 520px) {
  .system-dialog__actions { flex-direction: column-reverse; }
  .system-dialog__button { width: 100%; }
}
.builder-git-dialog { width: min(620px, 100%); box-sizing: border-box; box-shadow: 0 24px 80px rgb(10 27 20 / 30%); }
.builder-git-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.builder-git-dialog > header h3 { margin: 4px 0 0; }
.builder-git-dialog > header > button { width: 38px; height: 38px; border: 1px solid #ccd0c6; border-radius: 10px; background: #fff; font-size: 22px; }
.builder-git-dialog form { display: grid; gap: 14px; margin-top: 18px; }
.builder-git-dialog label { display: grid; gap: 7px; color: #657269; font-size: 12px; }
.builder-git-dialog input { width: 100%; box-sizing: border-box; padding: 12px 13px; border: 1px solid #cdd0c6; border-radius: 10px; color: #1d3027; background: #fbf9f2; font: inherit; }
.builder-git-dialog form > p { margin: 0; color: #657269; font-size: 12px; }
.builder-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.auth-form--change { grid-template-columns: repeat(3, 1fr) auto; }
.auth-form--login { grid-template-columns: 1fr auto; max-width: 620px; }
.form-error { margin: 12px 0; padding: 12px; border-radius: 10px; color: #8e493e; background: #f7e7e3; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kpi-card { min-height: 190px; padding: 21px; display: grid; align-content: space-between; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fffdf8d9; text-align: left; box-shadow: 0 14px 36px #3040380b; transition: transform .16s ease, border-color .16s ease; }
.kpi-card header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.kpi-card header > span { font-family: Georgia, serif; font-size: 20px; }
.kpi-card > strong { margin: 18px 0 6px; font-family: Georgia, serif; font-size: 33px; font-weight: 500; }
.kpi-card p { margin: 0; color: #69766e; line-height: 1.5; }
.kpi-card small { margin-top: 16px; color: #98662f; font-weight: 800; }
.module-tabs { display: flex; gap: 8px; margin: 15px 0 24px; }
.module-tabs button { padding: 9px 13px; border: 1px solid #cbd0c7; border-radius: 10px; color: #657269; background: #f7f4ec; }
.module-tabs button.is-active { color: #fff; border-color: #1d3027; background: #1d3027; }
.sandbox-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 8px; border: 1px solid #d8d5cb; border-radius: 14px; background: #f8f5ed; }
.sandbox-tabs button { padding: 10px 13px; border: 1px solid transparent; border-radius: 9px; color: #657269; background: transparent; font-weight: 750; text-align: left; }
.sandbox-tabs button.is-active { border-color: #9eb7a9; color: #183329; background: #eaf2ea; }
.sandbox-creation-area { display: grid; gap: 18px; max-width: 900px; }
.sandbox-prototype-package { margin: 0; }
.gate-explanation, .module-status-panel { max-width: 900px; }
.gate-explanation p, .module-status-panel p { color: #68756d; line-height: 1.7; }
.module-development-panel { max-width: 900px; margin-top: 18px; }
.module-development-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.module-development-panel > header h3 { margin: 4px 0 0; }
.module-development-panel > p { color: #68756d; line-height: 1.6; }
.module-development-panel dl { display: grid; gap: 8px; margin: 18px 0; }
.module-development-panel dl > div { display: grid; grid-template-columns: minmax(150px, .35fr) minmax(0, 1fr); gap: 12px; }
.module-development-panel dt { color: #7c887f; font-size: 12px; }
.module-development-panel dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.module-development-panel code { color: #835c2d; }
.module-development-panel .module-development-reason { padding: 10px 12px; border-radius: 9px; background: #f3f1e9; }
.module-development-panel .module-development-restart { color: #8a5d29; background: #fff0d3; }
.module-development-panel footer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.module-development-panel footer button { padding: 10px 14px; border: 1px solid #21352b; border-radius: 9px; color: #fff; background: #1d3027; font-weight: 700; }
.module-development-panel footer button.secondary { color: #1d3027; background: #f7f5ed; }
.module-development-panel footer button:disabled { cursor: not-allowed; opacity: .55; }
.developments-notice { max-width: 900px; color: #68756d; line-height: 1.6; }
.developments-notice--error { color: #8a332b; border-color: #d8a79f; background: #fff4f2; }
.developments-subjects { margin-bottom: 18px; }
.developments-list, .developments-incidents { max-width: 1180px; margin-top: 22px; }
.developments-list > h3, .developments-incidents > h3 { margin: 0 0 12px; font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.developments-list > ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.developments-project { display: grid; gap: 15px; min-width: 0; }
.developments-project > header, .developments-cycle > header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.developments-project h3, .developments-cycle h4, .developments-evidence h5 { margin: 0; }
.developments-project h3 { margin-top: 3px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.developments-project .eyebrow { margin: 0; }
.developments-project code { overflow-wrap: anywhere; color: #835c2d; }
.developments-cycle { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.developments-cycle h4 { font-size: 15px; }
.developments-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; margin: 0; }
.developments-facts > div { min-width: 0; }
.developments-facts dt { color: #7c887f; font-size: 11px; }
.developments-facts dd { min-width: 0; margin: 3px 0 0; overflow-wrap: anywhere; }
.developments-facts--workspace { padding: 11px 12px; border-radius: 10px; background: #f5f3ec; }
.developments-facts .status { margin-right: 5px; }
.developments-empty-fact { margin: 0; color: #68756d; font-size: 13px; line-height: 1.5; }
.developments-evidence { display: grid; gap: 8px; }
.developments-evidence h5 { color: #657269; font-size: 12px; }
.developments-evidence ul, .developments-incidents > ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.developments-evidence li, .developments-incidents li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.developments-evidence small, .developments-incidents small { grid-column: 1 / -1; color: #7c887f; overflow-wrap: anywhere; }
.developments-help { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 2px; padding: 0; border: 1px solid #b7bdb5; border-radius: 50%; background: transparent; color: #657269; font: inherit; font-size: 10px; font-weight: 700; line-height: 1; cursor: help; vertical-align: middle; }
.developments-help:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
button.developments-help { cursor: pointer; }
.help-disclosure { position: relative; display: inline-flex; margin-left: 2px; vertical-align: middle; }
.help-disclosure > summary { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid #b7bdb5; border-radius: 50%; color: #657269; font-size: 10px; font-weight: 700; line-height: 1; cursor: pointer; list-style: none; }
.help-disclosure > summary::-webkit-details-marker { display: none; }
.help-disclosure > summary::marker { content: ""; }
.help-disclosure > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.help-disclosure__bubble { display: none; }
/* DQ-257: пузырь не наследует верхний регистр и разрядку подписи; у правого
   края экрана/карточки оболочка ставит data-align="end", у нижнего — data-side="top" */
.help-disclosure[open] > .help-disclosure__bubble { display: block; position: absolute; z-index: 20; top: 100%; left: 0; margin-top: 4px; padding: 10px 12px; width: min(320px, 86vw); border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; box-shadow: 0 10px 30px #14231f33; font-size: 12px; font-weight: 400; line-height: 1.45; letter-spacing: normal; text-transform: none; text-align: left; color: #425148; white-space: pre-line; }
.help-disclosure[open][data-align="end"] > .help-disclosure__bubble { left: auto; right: 0; }
.help-disclosure[open][data-side="top"] > .help-disclosure__bubble { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 4px; }
.developments-track small { display: block; margin-top: 2px; color: #7c887f; font-size: 10px; overflow-wrap: anywhere; }
.developments-incidents li { grid-template-columns: minmax(0, 1fr) auto; }
.settings-map { display: grid; gap: 8px; margin-bottom: 18px; }
.settings-map article { display: grid; grid-template-columns: 1fr minmax(220px, .65fr); gap: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8d9; }
.settings-map article > div { display: grid; gap: 4px; align-content: start; }
.settings-map article > div:last-child { justify-items: end; }
.settings-map span, .settings-map small { color: #7a867e; font-size: 10px; }
.settings-map code { color: #835c2d; font-size: 11px; }

/* Провідник конфігурації (read-only) */
.settings-stat-strip { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 16px; color: #6b786f; font-size: 12px; }
.settings-stat-strip b { color: var(--ink); font-weight: 700; }
.settings-explorer { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
/* Боковой список разделов настроек прижимается к верхней строке, а не к
   краю окна: на top:16px он уезжал под полосу и первый экран «Налаштувань»
   читался наполовину — заголовок панели был срезан (DQ-187). */
.settings-rail { position: sticky; top: var(--under-topbar); display: grid; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fffdf8d9; }
.settings-search { width: 100%; padding: 9px 12px; border: 1px solid #cdd0c6; border-radius: 10px; background: #f8f6ef; }
.settings-rail__group { display: grid; gap: 3px; }
.settings-rail__group > p { margin: 0 0 4px; padding: 0 8px; color: #8b9890; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.settings-rail__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); background: transparent; text-align: left; font-size: 13px; }
.settings-rail__item:hover, .settings-rail__item:focus-visible { border-color: #d9d3c7; background: #f6f3eb; outline: none; }
.settings-rail__item.is-active { border-color: #b79162; background: #f3ead9; font-weight: 600; }
.settings-rail__item > b { flex: none; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #ece6d8; color: #6b786f; font-size: 10px; font-weight: 700; text-align: center; }
.settings-rail__item .status { flex: none; }
.settings-main { min-width: 0; display: grid; gap: 16px; }
.settings-section { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8d9; }
.settings-section > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 8px; }
.settings-section > header h3 { margin: 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.settings-section > header .eyebrow { flex-basis: 100%; margin: 0; }
.settings-section > p { margin: 0 0 16px; color: #68756d; line-height: 1.6; }
.settings-section .panel { padding: 18px; }
.settings-fields { display: grid; gap: 8px; }
.settings-field { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8f6ef8f; }
.settings-field__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.settings-field__head strong { font-size: 13px; }
.settings-field__path { padding: 2px 8px; border: 1px solid #e0dccf; border-radius: 7px; background: #fff; color: #835c2d; font-size: 11px; }
.settings-field__path code { color: inherit; }
.settings-field__path:hover, .settings-field__path:focus-visible { border-color: #b79162; outline: none; }
.settings-field__path[data-copied="true"] { border-color: #6f9a72; color: #3f6b42; }
.settings-field__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.settings-badge { padding: 1px 8px; border: 1px solid #dfe2d6; border-radius: 999px; background: #fff; color: #6b786f; font-size: 10px; }
.settings-field__default { color: #7d8981; font-size: 11px; }
.settings-empty { color: #7d8981; }
.settings-api-panel__field { display: flex; gap: 8px; margin-bottom: 8px; }
.settings-api-panel__field input { flex: 1; min-width: 0; padding: 12px 13px; border: 1px solid #cdd0c6; border-radius: 10px; background: #f8f6ef; }
.settings-api-panel__facts { display: grid; gap: 6px; margin: 12px 0; }
.settings-api-panel__facts > div { display: flex; gap: 10px; }
.settings-api-panel__facts dt { color: #7a867e; font-size: 12px; }
.settings-api-panel__facts dd { margin: 0; font-weight: 600; }
.architecture-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 12px; align-items: center; }
.architecture-flow article, .architecture-flow button { min-height: 140px; padding: 20px; display: grid; align-content: center; justify-items: center; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fffdf8d9; text-align: center; }
.architecture-flow button { transition: transform .16s ease, border-color .16s ease; }
@media (hover: hover) {
  .architecture-flow button:hover, .architecture-flow button:focus-visible { transform: translateY(-2px); border-color: #b79162; outline: none; }
}
.architecture-flow article span, .architecture-flow button span { width: 28px; height: 28px; margin-bottom: 12px; display: grid; place-items: center; border-radius: 50%; background: #f1b76d; font-size: 10px; font-weight: 800; }
.architecture-flow article small, .architecture-flow button small { margin-top: 6px; color: #7d8981; }
.architecture-flow i { color: #9a7651; font-size: 25px; font-style: normal; }
.architecture-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.architecture-branches p { color: #68756d; line-height: 1.7; }
.empty { padding: 34px; border: 1px dashed #bcc3b8; border-radius: 18px; color: #657168; text-align: center; }
.empty strong { color: var(--ink); font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.loader { min-height: 380px; display: grid; place-items: center; align-content: center; color: #78847c; }
.loader span { width: 34px; height: 34px; border: 2px solid #c7cec4; border-top-color: #d88b35; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .storage-identity { grid-template-columns: 1fr 1fr; }
  .storage-path { grid-column: 1 / -1; }
  .inventory article { grid-template-columns: 1fr repeat(3, minmax(75px, .4fr)); }
  .inventory article .status { display: none; }
  .run-row { grid-template-columns: 120px 1fr 1fr; }
  .run-row .phase:nth-of-type(3), .run-row .status { display: none; }
  .module-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .architecture-flow { grid-template-columns: 1fr; }
  .architecture-flow i { transform: rotate(90deg); justify-self: center; }
  .task-hub-registry { overflow-x: auto; }
}

@media (max-width: 720px) {
  .shell { display: block; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; z-index: 10; inset: auto 0 0; width: auto; height: auto; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); display: block; }
  .brand, .platform, .sidebar-toggle { display: none; }
  .diagnostic-dock { position: fixed; z-index: 20; right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); margin: 0; }
  .diagnostic-dock .platform { width: 172px; display: block; padding: 10px 12px; background: var(--pine); box-shadow: 0 10px 35px #14231f40; }
  .diagnostic-panel { position: fixed; left: 12px; right: 12px; bottom: calc(140px + env(safe-area-inset-bottom)); width: auto; height: min(var(--diagnostic-height, 38vh), calc(100vh - 175px)); height: min(var(--diagnostic-height, 38vh), calc(100svh - 175px)); max-height: calc(100vh - 175px); max-height: calc(100svh - 175px); }
  .diagnostic-panel.is-fullscreen { left: 0; right: 0; bottom: 0; height: 100vh; height: 100svh; max-height: none; }
  .module-builder-create-dock { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); height: min(var(--builder-create-height, 52vh), calc(100vh - 110px)); height: min(var(--builder-create-height, 52vh), calc(100svh - 110px)); max-height: calc(100vh - 110px); max-height: calc(100svh - 110px); }
  .module-builder-create-dock.is-fullscreen { left: 0; right: 0; bottom: 0; height: 100vh; height: 100svh; max-height: none; }
  nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .nav-item { min-width: 64px; }
  .nav-item { display: grid; justify-items: center; gap: 3px; padding: 4px; font-size: 9px; }
  .nav-item i { width: 27px; height: 27px; }
  main { padding: 0 15px 30px; }
  .topbar { height: 65px; gap: 10px; }
  .breadcrumbs { max-width: calc(100vw - 150px); }
  .breadcrumbs li + li::before { margin: 0 5px; }
  .breadcrumbs button { padding-inline: 1px; }
  .screen-head { align-items: start; }
  h2 { font-size: 34px; }
  .metrics, .split { grid-template-columns: 1fr; }
  .metric { min-height: 100px; }
  .identity-card dl { grid-template-columns: 1fr; }
  .storage-identity { grid-template-columns: 1fr; }
  .storage-path { grid-column: auto; }
  .inventory article { grid-template-columns: 1fr 1fr 1fr; }
  .inventory article > div:first-child { grid-column: 1 / -1; }
  .run-row { grid-template-columns: 1fr 1fr; }
  .run-row .phase { display: none; }
  .incident-row { grid-template-columns: 44px 1fr; }
  .incident-row .status { grid-column: 2; }
  .hero-grid, .architecture-branches { display: grid; grid-template-columns: 1fr; }
  .check-row { grid-template-columns: 90px 1fr; }
  .check-row > span { grid-column: 2; }
  .launch-mode-list > article, .settings-map article { grid-template-columns: 1fr; }
  .launch-mode-list article > div:last-child, .settings-map article > div:last-child { justify-items: start; }
  .auth-form, .auth-form--change, .kpi-grid, .builder-layout { grid-template-columns: 1fr; }
  .settings-explorer { grid-template-columns: 1fr; }
  .settings-rail { position: static; }
  .prototype-list { max-height: none; }
  .prototype-card-grid { grid-template-columns: 1fr; }
  .prototype-development-card__open { min-height: 0; }
  .prototype-detail dl > div { grid-template-columns: 1fr; gap: 2px; }
  .auth-form--login { grid-template-columns: 1fr; }
  .module-tabs, .sandbox-tabs { overflow-x: auto; }
  .developments-facts { grid-template-columns: 1fr; }
  .capability-passport > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .diagnostic-dock.has-errors .diagnostic-trigger { animation: none; }
  .builder-operation-status.is-running i, .builder-operation-status.is-queued i { animation: none; }
}

/* Экран клиентов */
.clients-table-scroll { overflow-x: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 16px; background: #fffdf8d9; }
.clients-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.clients-table thead th { padding: 12px 16px; border-bottom: 1px solid var(--line); color: #78867d; font-size: 10px; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.clients-table tbody tr { border-bottom: 1px solid #edeae0; transition: background .12s ease; }
.clients-table tbody tr:last-child { border-bottom: 0; }
.clients-table tbody tr:hover { background: #f4f0e6; }
.clients-table td { padding: 13px 16px; vertical-align: middle; }
.clients-table td strong, .clients-table td small { display: block; }
.clients-table td small + small { margin-top: 5px; }
.clients-table td code { color: #835c2d; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.clients-table td small { color: #6d7b72; font-size: 11px; }
.empty-clients { margin-top: 16px; text-align: center; }
.empty-clients strong { font-family: Georgia, serif; font-size: 24px; }
.empty-clients p { color: #6d7b72; }
.client-downloads { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.client-downloads button { font-size: 13px; }

/* Супервизор ClientGate */
.supervisor-status { font-size: 11px; margin-top: 4px; }
.supervisor-status.is-running { color: #2e6647; }
.supervisor-status.is-paused { color: #835c2d; }

.client-downloads .button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid #bdc5ba; border-radius: 10px; color: #25372d; background: #eef1e9; text-decoration: none; font-weight: 700; }
.install-icon { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #8a947f; border-radius: 7px; color: #835c2d; font-size: 13px; }
.client-download-note { margin-top: 8px; color: #6d7b72; font-size: 12px; }

/* Опасная зона: разрушающие действия. Классы вместо inline style (CSP style-src 'self'). */
.system-control-buttons { display: flex; gap: 12px; margin-top: 16px; }
.button--danger { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: none; border-radius: 8px; font-size: 15px; font-weight: 700; color: #fff; background: #d94c4c; cursor: pointer; }
.button--danger:hover { background: #c53f3f; }
.button--danger:disabled { opacity: .5; cursor: not-allowed; }
.button--danger.button--warn { background: #d98e4c; }
.button--danger.button--warn:hover { background: #c87e3d; }
.button--gap-left { margin-left: 8px; }

/* Мелкие утилиты вместо inline style в screens.js */
.module-group { margin-bottom: 28px; }
.module-group-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; }
.panel--stack { margin-bottom: 18px; }

/* Продуктовые настройки: переключатель + подсказка под «?» (техника скрыта). */
.settings-product { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8f6ef8f; }
.settings-product__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.settings-product__head strong { font-size: 15px; }
.settings-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.settings-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.settings-toggle__track { width: 44px; height: 24px; border-radius: 999px; background: #c9cfc4; position: relative; transition: background .15s; }
.settings-toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px #0003; }
.settings-toggle input:checked + .settings-toggle__track { background: #2f7a4f; }
.settings-toggle input:checked + .settings-toggle__track::after { left: 23px; }
.settings-toggle input:focus-visible + .settings-toggle__track { outline: 2px solid #2f7a4f; outline-offset: 2px; }
.settings-toggle.is-busy { opacity: .6; pointer-events: none; }
.settings-outcome { display: grid; gap: 4px; font-size: 13px; }
.settings-outcome__row { display: flex; gap: 8px; align-items: baseline; }
.settings-outcome__row b { min-width: 150px; font-weight: 600; }
.settings-outcome .is-ok { color: #2f7a4f; }
.settings-outcome .is-fail { color: #b95645; }
.settings-outcome__note { color: #7a4a1a; }
.settings-field__locked { font-size: 12px; color: #6b786f; }
.settings-saved { color: #2f7a4f; font-size: 13px; margin: 0 0 8px; }
.client-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table-action--warn { border-color: #d9b46a; color: #8c673b; }
.table-action--danger { border-color: #d99a8f; color: #9a3f33; }
.table-action--danger:hover, .table-action--danger:focus-visible { background: #f8e6e2; }
.settings-field__editor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.settings-field__editor input, .settings-field__editor select { min-height: 34px; padding: 6px 10px; border: 1px solid #cfd5c9; border-radius: 9px; background: #fff; color: #25372d; }
.settings-field__editor input:focus-visible, .settings-field__editor select:focus-visible { border-color: #b79162; outline: 2px solid #eadbc0; outline-offset: 0; }
.settings-field__editor--short input { width: 9ch; }
.settings-field__editor--choice select { min-width: 12ch; }
.settings-field__editor--medium input { width: min(100%, 36ch); }
.settings-field__editor--wide input { flex: 1 1 100%; min-width: 0; }
.settings-field__save { padding: 7px 14px; border: 1px solid #35633e; border-radius: 9px; background: #35633e; color: #f4f7f1; font-weight: 700; box-shadow: 0 6px 14px #35633e2b; }
.settings-field__save:hover, .settings-field__save:focus-visible { background: #2a5032; border-color: #2a5032; outline: none; }
.settings-field--system { background: #f3f0e8; }
.settings-badge--system { background: #ece2d1; color: #8c673b; }
.settings-field__readonly { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.settings-field__readonly code { padding: 5px 9px; border: 1px dashed #d9cfbb; border-radius: 8px; background: #fbf9f3; color: #4f5d55; }
.settings-field__readonly small { color: #8c673b; font-size: 12px; }
.quality-view { display: grid; gap: 12px; }
.quality-verdict { padding: 10px 14px; border-radius: 10px; font-size: 15px; }
.quality-verdict--good { background: #dcebdd; color: #35633e; }
.quality-verdict--fair { background: #f2e6cf; color: #865f2d; }
.quality-verdict--poor { background: #f2ddd9; color: #8f4237; }
.quality-verdict--unknown { background: #ece2d1; color: #8c673b; }
.quality-metrics { display: grid; gap: 10px; margin: 0; }
.quality-metrics div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e7e2d4; }
.quality-metrics dt { color: #657269; font-weight: 700; }
.quality-metrics dd { margin: 0; text-align: right; }
.quality-speed-status { margin: 0; }

/* ---------- раздел «Мониторинг» ---------- */
/* Цвета маршрутов: чьего хода ждёт пункт. Инлайновых style= в разметке нет —
   позиции точек карты переносятся из data-x/data-y в CSSOM после render(). */
.monitoring-view { --mon-arch: #a85c1b; --mon-arch-bg: #f7eadc; --mon-ai: #1c6b58; --mon-ai-bg: #dfede8; --mon-field: #3a5a94; --mon-field-bg: #e1e8f3; --mon-permit: #6b3f8c; --mon-permit-bg: #ede4f3; --mon-out: #8c949c; --mon-out-bg: #e5e7ea; }
.monitoring-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px; margin: -8px 0 10px; color: #637168; font-size: 13px; }
.monitoring-summary b { color: var(--ink); font-weight: 700; }
.monitoring-alarm { margin: 0 0 14px; padding: 12px 14px; border-left: 4px solid #a4483c; background: #fbf1ef; }
.monitoring-alarm.is-warning { border-left-color: #b8863b; background: #fbf6ec; }
.monitoring-alarm h3 { margin: 0 0 4px; font-size: 15px; }
.monitoring-alarm p { margin: 0 0 8px; color: #6b786f; font-size: 13px; }
.monitoring-alarm ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.monitoring-alarm li { display: grid; gap: 2px; font-size: 13px; }
.monitoring-alarm li span { color: #6b786f; }
/* Окно записи открывается кнопкой «+» и не занимает верх вкладки постоянно;
   мысль пишется многострочно — одной строкой её не уложить. */
.history-add { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--cream); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.history-add.is-active { background: #1d3027; color: #fff; border-color: #1d3027; }
.history-record header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.history-record__close { padding: 3px 10px; border: 1px solid var(--line); background: var(--cream); font: inherit; font-size: 12px; cursor: pointer; }
.history-record textarea { width: 100%; padding: 10px; border: 1px solid var(--line); font: inherit; line-height: 1.5; resize: vertical; }
.history-record > small { color: #6b786f; font-size: 12px; }
.history-record { display: grid; gap: 10px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); background: var(--cream); }
.history-record label { display: grid; gap: 4px; font-size: 13px; }
.history-record input { padding: 8px 10px; border: 1px solid var(--line); font: inherit; }
.history-record details summary { cursor: pointer; color: #6b786f; font-size: 13px; }
.history-record details label { margin-top: 8px; }
.history-record__message { margin: 0; color: #4c7a54; font-size: 13px; }
.history-cards { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.history-card { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid #8a9a8f; background: var(--cream); }
.history-card--cancelled { border-left-color: #a4483c; }
.history-card--deferred { border-left-color: #b8863b; }
.history-card--integrated, .history-card--published { border-left-color: #4c7a54; }
.history-card.is-selected { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
/* Дата — отдельной колонкой справа: в подвале карточки она тонула среди
   подтверждений и читалась плохо (замечание архитектора). */
.history-card__open { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 6px 18px; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.history-card__body { display: grid; gap: 6px; min-width: 0; }
.history-card__date { color: #6b786f; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.history-filters { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; }
.history-search { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; font-size: 13px; }
.history-search input { flex: 1; padding: 7px 10px; border: 1px solid var(--line); font: inherit; }
.history-periods { display: flex; gap: 0; }
.history-periods button { padding: 6px 12px; border: 1px solid var(--line); background: var(--cream); font: inherit; font-size: 13px; cursor: pointer; }
.history-periods button + button { border-left: 0; }
.history-periods button.is-active { background: #1d3027; color: #fff; border-color: #1d3027; }
.history-filters small { color: #6b786f; font-size: 12px; }
.history-steps { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b786f; }
.history-steps button { padding: 4px 9px; border: 1px solid var(--line); background: var(--cream); font: inherit; cursor: pointer; }
.history-steps button[disabled] { opacity: .4; cursor: default; }
.history-steps b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.monitoring-closed-link { margin: -4px 0 10px; color: #6b786f; font-size: 13px; }
.monitoring-closed-link--below { margin: 10px 0 0; }
.monitoring-closed-link button { padding: 3px 10px; border: 1px solid var(--line); background: var(--cream); font: inherit; font-size: 13px; cursor: pointer; }
.history-card__open:hover header b { text-decoration: underline; }
.history-subhead { margin: 14px 0 6px; font-size: 13px; color: #6b786f; }
.history-evidence, .history-journal { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.history-evidence li, .history-journal li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.history-evidence li small, .history-journal li small { color: #8a9a8f; font-size: 12px; }
.history-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.history-card .history-state { color: #6b786f; font-size: 12px; text-transform: lowercase; }
.history-card .history-id { color: #8a9a8f; font-size: 12px; }
.history-card p { margin: 0; font-size: 13px; }
.history-card .history-reason { color: #7d3125; }
.history-card footer { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #6b786f; font-size: 12px; }
.monitoring-summary small { margin-left: auto; color: #8c949c; font-size: 12px; }
.monitoring-source { max-width: 900px; margin: 0 0 22px; color: #637168; font-size: 13px; line-height: 1.6; }
.monitoring-source code { font-size: 12px; }
.monitoring-block { margin-bottom: 30px; }
.monitoring-block h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.monitoring-block__hint { max-width: 900px; margin: 0 0 12px; color: #637168; font-size: 13px; line-height: 1.6; }
.monitoring-notice { max-width: 760px; }
.monitoring-notice p { margin: 0; line-height: 1.6; }
.monitoring-notice--error { border-color: #b7605d; }

.monitoring-mapshell { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: 1fr 30px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; overflow: hidden; }
.monitoring-ylab, .monitoring-xlab { display: flex; align-items: center; justify-content: center; color: #7a897b; font-size: 11px; }
.monitoring-ylab { writing-mode: vertical-rl; transform: rotate(180deg); }
.monitoring-xlab { grid-column: 2; }
.monitoring-map { position: relative; height: 420px; margin: 12px 16px 6px 6px; background-image: linear-gradient(to right, #e3e6e0 1px, transparent 1px), linear-gradient(to bottom, #e3e6e0 1px, transparent 1px); background-size: 10% 100%, 100% 10%; background-position: -1px 0, 0 -1px; }
.monitoring-quad { position: absolute; max-width: 15ch; color: #9aa39a; font-size: 11px; pointer-events: none; }
.monitoring-quad--tr { top: 6px; right: 8px; text-align: right; }
.monitoring-quad--tl { top: 6px; left: 8px; }
.monitoring-quad--br { right: 8px; bottom: 6px; text-align: right; }
.monitoring-quad--bl { bottom: 6px; left: 8px; }
.monitoring-dot { position: absolute; width: 23px; height: 23px; margin: -11.5px 0 0 -11.5px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1.5px solid var(--mon-out); border-radius: 50%; color: var(--ink); background: #fff; font: 600 9px/1 ui-monospace, Menlo, monospace; cursor: pointer; transition: transform .12s ease, opacity .12s ease; }
@media (hover: hover) {
  .monitoring-dot:hover, .monitoring-dot:focus-visible { z-index: 5; transform: scale(1.22); outline: none; }
}
.monitoring-dot:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.monitoring-dot.is-selected { z-index: 6; transform: scale(1.22); color: #fff; border-color: var(--ink); background: var(--ink); }
.monitoring-dot.is-dim { opacity: .28; }
.monitoring-dot--arch { border-color: var(--mon-arch); background: var(--mon-arch-bg); }
.monitoring-dot--ai { border-color: var(--mon-ai); background: var(--mon-ai-bg); }
.monitoring-dot--field { border-color: var(--mon-field); background: var(--mon-field-bg); }
.monitoring-dot--permit { border-color: var(--mon-permit); background: var(--mon-permit-bg); }
.monitoring-dot--out { color: var(--mon-out); border-color: var(--mon-out); background: var(--mon-out-bg); }

.monitoring-lanes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.monitoring-lane { padding: 14px 16px 16px; border: 1px solid var(--line); border-top: 3px solid var(--mon-out); border-radius: 16px; background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; }
.monitoring-lane--arch { border-top-color: var(--mon-arch); }
.monitoring-lane--ai { border-top-color: var(--mon-ai); }
.monitoring-lane--field { border-top-color: var(--mon-field); }
.monitoring-lane--permit { border-top-color: var(--mon-permit); }
.monitoring-lane h4 { margin: 0 0 2px; font-size: 14px; font-weight: 700; }
.monitoring-lane__why { margin: 0 0 10px; color: #637168; font-size: 12px; line-height: 1.5; }
.monitoring-lane ul { margin: 0; padding: 0; list-style: none; }
.monitoring-lane__list { max-height: 460px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.monitoring-lane li { border-top: 1px solid #e3e6e0; }
.monitoring-lane li:first-child { border-top: 0; }
.monitoring-row { width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.monitoring-row:hover, .monitoring-row:focus-visible { color: #1c6b58; outline: none; }
.monitoring-row.is-selected { margin: 0 -6px; padding-left: 6px; padding-right: 6px; border-radius: 8px; background: #ece9df; }
.monitoring-lane--arch .monitoring-row:hover { color: var(--mon-arch); }
.monitoring-lane--field .monitoring-row:hover { color: var(--mon-field); }
.monitoring-lane--permit .monitoring-row:hover { color: var(--mon-permit); }
.monitoring-row__id { flex: 0 0 52px; color: #7a897b; font: 500 12px/1.4 ui-monospace, Menlo, monospace; }
.monitoring-row__title { flex: 1; }
.monitoring-row__score { flex: 0 0 auto; color: #9aa39a; font-size: 11px; font-variant-numeric: tabular-nums; }

.monitoring-detail { min-height: 160px; }
.monitoring-detail__empty { max-width: 56ch; margin: 0; color: #637168; }
.monitoring-detail__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.monitoring-detail__id { font: 600 15px/1.3 ui-monospace, Menlo, monospace; }
.monitoring-detail__where { margin-left: auto; color: #9aa39a; font-size: 12px; }
.monitoring-badge { padding: 2px 8px; border: 1px solid var(--mon-out); border-radius: 4px; background: var(--mon-out-bg); color: var(--mon-out); font-size: 11px; }
.monitoring-badge--arch { color: var(--mon-arch); border-color: var(--mon-arch); background: var(--mon-arch-bg); }
.monitoring-badge--ai { color: var(--mon-ai); border-color: var(--mon-ai); background: var(--mon-ai-bg); }
.monitoring-badge--field { color: var(--mon-field); border-color: var(--mon-field); background: var(--mon-field-bg); }
.monitoring-badge--permit { color: var(--mon-permit); border-color: var(--mon-permit); background: var(--mon-permit-bg); }
.monitoring-detail__title { max-width: 90ch; margin: 12px 0 14px; line-height: 1.6; }
.monitoring-detail__meta { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 14px; color: #637168; font-size: 13px; }
.monitoring-detail__meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.monitoring-detail__note { margin: 0; color: #637168; font-size: 13px; line-height: 1.6; }
.monitoring-chain h5 { margin: 6px 0 6px; color: #637168; font-size: 12px; font-weight: 700; }
.monitoring-chain ul { margin: 0 0 12px; padding: 0; list-style: none; }
.monitoring-chain li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 3px 0; font-size: 13px; }
.monitoring-chain li span { color: #637168; }
.monitoring-chain__none { margin: 0 0 12px; color: #9aa39a; font-size: 13px; }
.monitoring-chain__link { padding: 0; border: 0; border-bottom: 1px solid #cbd0c7; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.monitoring-chain__link:hover, .monitoring-chain__link:focus-visible { border-bottom-color: var(--ink); outline: none; }
.monitoring-chain__link code { margin-right: 4px; color: #7a897b; font-size: 12px; }

.monitoring-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; }
.monitoring-table { width: 100%; border-collapse: collapse; }
.monitoring-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); color: #637168; font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; }
.monitoring-table td { padding: 8px 12px; border-bottom: 1px solid #e3e6e0; font-size: 13px; vertical-align: top; }
.monitoring-table tr:last-child td { border-bottom: 0; }
.monitoring-trow { cursor: pointer; }
.monitoring-trow:hover td, .monitoring-trow:focus-visible td { background: #f4f2ea; }
.monitoring-trow:focus-visible { outline: none; }
.monitoring-trow.is-selected td { background: #ece9df; }
.monitoring-td-id { width: 66px; font: 500 12px/1.4 ui-monospace, Menlo, monospace; white-space: nowrap; }
.monitoring-td-num { width: 62px; text-align: center; font-variant-numeric: tabular-nums; }
.monitoring-td-route { width: 130px; font-size: 12px; white-space: nowrap; }
.monitoring-rdot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--mon-out); vertical-align: middle; }
.monitoring-rdot--arch { background: var(--mon-arch); }
.monitoring-rdot--ai { background: var(--mon-ai); }
.monitoring-rdot--field { background: var(--mon-field); }
.monitoring-rdot--permit { background: var(--mon-permit); }

.monitoring-subhead { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 4px 0 18px; }
.monitoring-subhead h3 { margin: 0; font-size: 20px; }
.monitoring-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.monitoring-card h4 { margin: 0 0 8px; font-size: 14px; }
.monitoring-card p { margin: 0; color: #637168; line-height: 1.65; }
/* DQ-554: приборы server_monitoring — без новых цветов: линия берёт цвет текста, уровни — готовые .status--* */
.resource-gauges { margin-bottom: 22px; }
.resource-gauge header { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.resource-gauge > strong { display: block; margin: 10px 0 6px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; color: var(--ink); }
.resource-gauge__line { display: block; width: 100%; height: 30px; }
.resource-gauge__line polyline { fill: none; stroke: var(--pine); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.resource-breaches { margin: 6px 0 16px; padding-left: 20px; }
.resource-slow { width: 100%; border-collapse: collapse; }
.resource-slow th, .resource-slow td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }

@media (max-width: 1080px) { .monitoring-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .monitoring-lanes, .monitoring-cards { grid-template-columns: 1fr; }
  .monitoring-map { height: 340px; }
  .monitoring-quad { display: none; }
}
@media (prefers-reduced-motion: reduce) { .monitoring-dot { transition: none; } }

/* мониторинг: редактор оценок и отметки изменений (DQ-087) */
.monitoring-mark { display: inline-block; margin-left: 3px; font-size: 11px; font-style: normal; font-weight: 700; vertical-align: baseline; cursor: help; }
.monitoring-mark--up { color: #1c6b58; }
.monitoring-mark--down { color: #a85c1b; }
.monitoring-mark--flat { color: #8c949c; }
.monitoring-mark--status { color: #6b3f8c; }
.monitoring-edit { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid #e3e6e0; border-radius: 12px; background: #f7f4ec; }
.monitoring-edit h5 { margin: 0 0 8px; color: #637168; font-size: 12px; font-weight: 700; }
.monitoring-edit__row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.monitoring-edit__field { display: flex; flex-direction: column; gap: 3px; color: #637168; font-size: 12px; }
.monitoring-edit__field input, .monitoring-edit__field select { min-width: 92px; padding: 5px 7px; border: 1px solid #cbd0c7; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.monitoring-edit__field input:disabled, .monitoring-edit__field select:disabled { color: #8c949c; background: #eeece6; cursor: not-allowed; }
.monitoring-edit__note { margin: 10px 0 0; color: #637168; font-size: 12px; line-height: 1.5; }
.monitoring-edit__note--ok { color: #1c6b58; }
.monitoring-edit__note--warn { color: #a85c1b; }
.monitoring-edit__note--error { color: #9b2c2c; }
.monitoring-edit__note--muted { color: #8c949c; }
.monitoring-changes { margin: 0 0 12px; padding: 0; list-style: none; }
.monitoring-changes li { padding: 3px 0; color: #637168; font-size: 12px; font-variant-numeric: tabular-nums; }

/* мониторинг: режим подписей, справка по шкале, документы в панели */
.monitoring-display { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: #657269; font-size: 12px; }
.monitoring-display button { padding: 6px 10px; border: 1px solid #cbd0c7; border-radius: 10px; color: #657269; background: #f7f4ec; font-size: 12px; }
.monitoring-display button.is-active { color: #fff; border-color: #1d3027; background: #1d3027; }
.monitoring-block__hint--note { margin-top: 8px; color: #a85c1b; }
.monitoring-detail__source { margin: -6px 0 12px; color: #637168; font-size: 13px; line-height: 1.6; }
.monitoring-detail__source b { margin-right: 4px; color: var(--ink); font-weight: 700; }
.monitoring-doclink { padding: 0 2px; border: 0; border-bottom: 1px dashed #9a6a31; background: none; color: #9a6a31; font: inherit; font-size: inherit; cursor: pointer; }
.monitoring-doclink:hover, .monitoring-doclink:focus-visible { border-bottom-style: solid; outline: none; }
/* Номер пункта в тексте — ссылка на сам пункт. Выглядит как ссылка, а не как
   кнопка: по ней переходят, а не запускают действие (DQ-182). */
.monitoring-itemlink { padding: 0 2px; border-bottom: 1px dashed #476958; color: #476958; font: inherit; font-size: inherit; text-decoration: none; cursor: pointer; }
.monitoring-itemlink:focus-visible { border-bottom-style: solid; outline: 3px solid rgb(25 118 210 / 24%); }
@media (hover: hover) { .monitoring-itemlink:hover { border-bottom-style: solid; color: #173f2b; } }
/* Кнопка «ссылка» у пункта — обычная кнопка системы, а не квадратик: тот же
   вид, что у «обновить», и палец в неё попадает (44px, ТЗ-01). */
.monitoring-detail__link { min-height: 44px; padding: 9px 14px; border: 1px solid #c5cabe; border-radius: 10px; background: #f8f5ed; color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.monitoring-detail__link[data-copied="true"] { border-color: #476958; color: #476958; }
@media (hover: hover) { .monitoring-detail__link:hover { border-color: #476958; } }
.monitoring-doc { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; overflow: hidden; }
.monitoring-doc header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #e3e6e0; background: #f7f4ec; font-size: 12px; color: #637168; }
.monitoring-doc header strong { font: 600 12px/1.4 ui-monospace, Menlo, monospace; color: var(--ink); }
.monitoring-doc__close { margin-left: auto; padding: 4px 10px; border: 1px solid #cbd0c7; border-radius: 8px; background: #fff; color: #657269; font-size: 12px; cursor: pointer; }
.monitoring-doc pre { max-height: 520px; margin: 0; padding: 14px 16px; overflow: auto; font: 12.5px/1.6 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.monitoring-doc--error p { margin: 0; padding: 12px 14px; color: #9b2c2c; }

/* Неизвестный маршрут: объяснение и ближайшие разрешённые разделы
   (docs/UI_NAVIGATION_AND_FAST_PATHS.md §3). */
.route-unknown { max-width: 640px; }
.route-unknown__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ── Шаги 5–6 UI-навигации: SVG-пиктограммы, закреплённое, палитра, нижняя панель ── */
.nav-item i svg { width: 17px; height: 17px; display: block; }
.nav-item[data-bottom-only] { display: none; }
.nav-pinned { margin-top: 10px; padding-top: 10px; border-top: 1px solid #ffffff14; }
.nav-pinned > p { margin: 0 0 4px; padding: 0 9px; color: #7f8c83; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
/* DQ-236 (наблюдение Архитектора, DQ-209): у обычных пунктов рейки рамку
   несёт только значок — самой карточки не видно на тёмном фоне рейки, и
   закреплённое сливается с фоном. Закреплённая карточка — рамка на всю
   кнопку, тем же цветом, что уже обводит значок. */
.nav-pinned .nav-item { border: 1px solid #506057; }
.nav-pinned .nav-item i { font-size: 11px; letter-spacing: .04em; }
.nav-pinned .nav-item--more i { border-style: dashed; }
.shell:not(.is-sidebar-expanded) .nav-pinned > p { display: none; }
.topbar-search { display: inline-flex; align-items: center; gap: 8px; margin-right: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf8; color: #4f5d55; font: inherit; font-size: 12.5px; cursor: pointer; }
.topbar-search svg { width: 15px; height: 15px; }
.topbar-icon-button { padding: 8px; }
.topbar-search kbd { padding: 1px 6px; border: 1px solid #d9d3c6; border-radius: 6px; background: #f3f0e8; font: inherit; font-size: 10.5px; color: #6e7b73; }
.palette-backdrop { position: fixed; inset: 0; z-index: 60; display: none; background: #14231f66; }
.palette-backdrop.is-open { display: block; }
.palette { width: min(640px, calc(100vw - 24px)); margin: 12vh auto 0; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8; box-shadow: 0 30px 80px #14231f4d; overflow: hidden; }
.palette input { width: 100%; box-sizing: border-box; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; font-size: 16px; outline: none; }
.palette-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette-group { padding: 10px 12px 4px; color: #7f8c83; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.palette-item { width: 100%; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.palette-item i { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #4f5d55; }
.palette-item i svg { width: 14px; height: 14px; }
.palette-item strong { display: block; font-size: 14px; }
.palette-item small { display: block; color: #6e7b73; font-size: 11.5px; }
.palette-item em { font-style: normal; color: #8a958d; font-size: 11px; }
.palette-item mark { padding: 0; background: #f1b76d66; color: inherit; }
.palette-item.is-cursor, .palette-item:hover { background: #f3f0e8; }
.palette-item.is-cursor i { border-color: var(--amber); background: var(--amber); color: var(--pine); }
.palette-keys { padding: 8px 14px; border-top: 1px solid var(--line); color: #7f8c83; font-size: 11px; }
.palette-empty { padding: 18px 14px; color: #6e7b73; }
.help-backdrop { position: fixed; inset: 0; z-index: 60; display: none; background: #14231fb3; backdrop-filter: blur(2px); }
.help-backdrop.is-open { display: block; }
/* DQ-445: окно справки было прибито к нижнему краю — отступ задавался только
   сверху (`16vh auto 0`), а высота ничем не ограничивалась, и длинная статья
   росла вниз до самого края. Теперь отступ одинаковый сверху и снизу, высота
   ограничена, содержимое прокручивается внутри, а шапка остаётся на месте.
   `dvh` с парным `vh` — правило интерфейса про высоту окна. */
/* Отступ окна справки от краёв экрана: одно число на все его виды. */
:root { --help-window-gap: clamp(16px, 6dvh, 88px); }
.topic-help-panel { position: relative; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 2 * var(--help-window-gap)); max-height: calc(100dvh - 2 * var(--help-window-gap)); margin: var(--help-window-gap) auto; padding: 20px; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8; box-shadow: 0 30px 80px #14231f66; }
.topic-help-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.topic-help-panel h3 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.topic-help-panel__close { width: 30px; height: 30px; border: 1px solid #cbc6ba; border-radius: 9px; color: #59655d; background: #fffdf8; font-size: 17px; cursor: pointer; }
.topic-help-panel p { margin: 16px 0 0; color: #425148; line-height: 1.55; }
.topic-help-panel__heading { margin: 22px 0 0; font-size: 15px; font-weight: 700; }
.topic-help-panel p.topic-help-panel__act { border-top: 0; padding-top: 0; }
.topic-help-panel p.topic-help-panel__note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: #6b786f; font-size: 12.5px; line-height: 1.5; }
.topic-help-panel__route { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.topic-help-panel__route code { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* DQ-208: «Про програму» — окреме вікно в тому самому .help-backdrop, розмір
   і тінь як у .topic-help-panel, вміст (kv-таблиця, дії) свій. */
.about-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100svh - 80px); overflow: auto; margin: 12vh auto 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8; box-shadow: 0 30px 80px #14231f66; }
.about-dialog > header { display: flex; align-items: center; gap: 14px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.about-dialog__mark { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: #f4b768; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; font-weight: 700; }
.about-dialog__heading { flex: 1 1 auto; }
.about-dialog__heading > div { font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.about-dialog__heading p { margin: 3px 0 0; color: #9fac9f; font-size: 10.5px; letter-spacing: 1.1px; }
.about-dialog__kv { margin-top: 8px; }
.about-dialog__group-label { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: #8a958d; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; }
.about-dialog__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 6px 0; font-size: 13px; }
.about-dialog__row > span:first-child { color: #5f6672; }
.about-dialog__note { margin: 14px 0 0; color: #6b786f; font-size: 12.5px; line-height: 1.5; }
.about-dialog__third-party .about-dialog__row { border-bottom: 1px solid var(--line); }
.about-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.about-dialog__button { min-height: 40px; padding: 0 16px; border: 1px solid #c5cabe; border-radius: 10px; background: #f8f5ed; color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.about-dialog__button--primary { margin-left: auto; border-color: #476958; background: #476958; color: #f7f3e8; }
.about-dialog__button[data-copied="true"] { border-color: #476958; color: #476958; }
.module-card-pin { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: #8a958d; cursor: pointer; }
.module-card-pin svg { width: 15px; height: 15px; }
.module-card-pin.is-pinned { color: var(--pine); border-color: var(--amber); background: var(--amber); }
.module-card-pin.is-pinned svg { fill: currentColor; }
.module-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e0dbd0; }
.module-quick button { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; color: #4f5d55; font: inherit; font-size: 11.5px; cursor: pointer; }
.module-quick button:hover { border-color: var(--pine); color: var(--pine); }
@media (max-width: 720px) {
  .nav-item[data-bottom-only] { display: grid; }
  .nav-item:not([data-bottom]) { display: none; }
  .nav-pinned { display: none; }
  nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
  .nav-item i svg { width: 18px; height: 18px; }
  .topbar-search span { display: none; }
  .topbar-search kbd { display: none; }
  .palette { margin-top: 6vh; }
  /* Плавающий значок диагностической панели (дев-инструмент) перекрывает
     нижнюю панель разделов и всплывающие подсказки на узком экране —
     на реальной мобильной раскладке ему тут нет места. */
  .shell-debug-panel { display: none; }
  /* Карточка «Web» (док диагностики) на узком экране переезжает в нижнюю
     панель разделов пунктом «Web» (router.js, id: "diagnostics") — та же
     кнопка toggle-diagnostics, тот же общий счётчик. Отдельная плавающая
     карточка сайдбара здесь лишняя и перекрывала нижнюю панель. Само
     информационное окно диагностики (.diagnostic-panel) не трогается —
     оно открывается независимо от того, откуда нажали. */
  .diagnostic-dock { display: none; }
}

/* ── Шаг 8: мост UCore ↔ модуль уровня 2 ── */
.embedded-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.embedded-area { position: relative; padding: 10px; border: 1px dashed #c9c2b4; border-radius: 18px; background: #fffdf8; }
.embedded-area__label { margin: 0 0 8px 4px; color: #8a958d; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.embedded-frame { display: block; width: 100%; height: 480px; border: 0; border-radius: 12px; background: #f7f3e8; }
/* DQ-204 (И-8, CR-14): отчёт public_diagnostic занимает панель, а не окно 300×150 браузера по умолчанию. */
.ext-block__actions { display: inline-flex; gap: 8px; align-items: center; }
/* DQ-218: вкладка «Вид» — документ модуля в окне оболочки во всю ширину. */
.viewbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid #cbd0c7; border-radius: 12px 12px 0 0; background: #f7f4ec; }
.viewbar__title { font-weight: 600; }
.viewbar__meta { color: #8a958d; font-size: 11px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.viewbar__actions { margin-left: auto; display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.viewbar .seg { display: inline-flex; border: 1px solid #cbd0c7; border-radius: 8px; overflow: hidden; }
.viewbar .seg button { padding: 4px 9px; border: 0; border-radius: 0; background: #fffdf8; color: #657269; font-size: 11px; }
.viewbar .seg button.on { background: #1d3027; color: #fff; font-weight: 600; }
.ext-view__window { border: 1px solid #cbd0c7; border-top: 0; border-radius: 0 0 12px 12px; overflow: hidden; background: #fff; }
.ext-view__tag { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 10px; border-bottom: 1px dashed #c9c2b4; background: #fffdf8; color: #8a958d; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.ext-view__tag b { margin-left: auto; font-weight: 500; letter-spacing: .04em; }
/* до первого сообщения документа — потолок окна просмотра; после (DQ-228, ТЗ §4.2)
   высота атрибутом ровно по содержимому до max_height_px, дальше прокрутка внутри */
.ext-view__frame { display: block; width: 100%; min-height: 240px; max-height: calc(100vh - 260px); max-height: calc(100svh - 260px); border: 0; background: #f7f3e8; }
.ext-view__frame[data-sized] { max-height: none; }
.ext-view__warning { margin: 0; padding: 8px 12px; border: 1px solid #9a7445; border-top: 0; background: #e0a45420; color: #7c5a26; font-size: 12px; }
.ext-view__link { margin: 8px 0 0; overflow-wrap: anywhere; }
/* DQ-243: схема ответа блока на «Блоках данных» — свёрнутый список полей. */
.ext-schema { margin: 8px 0 0; border: 1px solid #cbd0c7; border-radius: 10px; background: #fffdf8; }
.ext-schema summary { padding: 6px 10px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.ext-schema summary small { color: #8a958d; font-weight: 500; }
.ext-schema__fields { margin: 0; padding: 4px 10px 8px; list-style: none; display: grid; gap: 4px; }
.ext-schema__field { display: grid; grid-template-columns: auto auto auto 1fr; gap: 2px 10px; align-items: baseline; font-size: 12px; }
.ext-schema__field small { color: #657269; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.ext-schema__field em { color: #8a958d; font-size: 11px; font-style: normal; }
.ext-schema__field span { grid-column: 1 / -1; color: #657269; font-size: 11.5px; }
.ext-schema__field[data-depth="1"] { padding-left: 16px; }
.ext-schema__field[data-depth="2"] { padding-left: 32px; }
.ext-schema__field[data-depth="3"] { padding-left: 48px; }
.ext-schema__field[data-depth="4"], .ext-schema__field[data-depth="5"], .ext-schema__field[data-depth="6"] { padding-left: 64px; }
.ext-schema__none { margin-top: 6px; }
.ext-block__warning { margin-top: 8px; border-top: 1px solid #9a7445; border-radius: 8px; }
/* DQ-220: вариант 1 — оболочка рисует модуль из блоков своими компонентами. */
.shell-view__switch { margin: 0 0 10px; }
.shell-view__switch .seg { display: inline-flex; border: 1px solid #cbd0c7; border-radius: 8px; overflow: hidden; }
.shell-view__switch .seg button { padding: 5px 11px; border: 0; border-radius: 0; background: #fffdf8; color: #657269; font-size: 12px; }
.shell-view__switch .seg button.on { background: #1d3027; color: #fff; font-weight: 600; }
.shell-view__body { padding: 14px; border: 1px solid #cbd0c7; border-top: 0; border-radius: 0 0 12px 12px; background: #fffdf8; }
.shell-view__tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.shell-view__tile { min-height: 96px; padding: 14px 16px; }
.shell-view__tile strong { font-size: 24px; margin: 8px 0 4px; overflow-wrap: anywhere; }
.shell-view__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.shell-view__card { padding: 14px 16px; border-radius: 14px; }
.shell-view__card h4 { margin: 0 0 8px; color: #8a958d; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.shell-view__pairs { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 12px; }
.shell-view__pairs dt { color: #728078; overflow-wrap: anywhere; }
.shell-view__pairs dd { margin: 0; text-align: right; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.shell-view__pairs .shell-view__pairs { text-align: left; }
.shell-view__list { margin: 0; padding-left: 16px; font-size: 11px; }
.shell-view__stamp { display: block; margin-top: 8px; color: #8a958d; font-size: 10px; }
.shell-view__note { margin: 10px 0 0; }
/* DQ-223: опции модуля из паспорта на «Обзоре». */
.module-options h3 { margin: 0 0 10px; font-size: 14px; }
.module-options__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.module-options__list li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; font-size: 12.5px; }
.module-options__list small { color: #728078; font-size: 11px; }
.module-options__list span { grid-column: 1 / -1; color: #657269; font-size: 12px; }
/* DQ-235: локали модуля — цвета из палитры `.status--warning` / `.status`, без новых */
.locale-missing { display: inline-flex; align-items: center; max-width: max-content; padding: 3px 7px; border-radius: 999px; background: #f2e6cf; color: #865f2d; font-size: 10px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.module-locales__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 6px; font-size: 12.5px; }
.module-locales__ok { color: #47604d; font-size: 12px; font-weight: 600; }
.ext-view__warning--locale { border-top: 1px solid #9a7445; margin-bottom: 8px; }
.ext-view__error { margin-top: 12px; }
.ext-report { display: block; width: 100%; height: 72vh; height: 72svh; min-height: 480px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7f3e8; }
.ext-block.is-fullscreen { position: fixed; z-index: var(--layer-info-window, 45); inset: 0; margin: 0; border-radius: 0; overflow: auto; background: #f8f5ed; }
.ext-block.is-fullscreen .ext-report { height: calc(100vh - 150px); height: calc(100svh - 150px); min-height: 0; }
.embedded-area__waiting { margin: 8px 4px 0; }
.bridge-log { position: sticky; top: var(--under-topbar); padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; }
.bridge-log h4 { margin: 0 0 4px; }
.bridge-log ol { margin: 10px 0 0; padding: 0; list-style: none; max-height: 420px; overflow-y: auto; }
.bridge-log__item { display: grid; grid-template-columns: 14px auto 1fr; gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px solid #efeae0; font-size: 12px; }
.bridge-log__item--up span { color: #3b5f3e; }
.bridge-log__item--down span { color: #7c5a26; }
.bridge-log__item small { color: #6e7b73; overflow-wrap: anywhere; }
.bridge-confirm { border-color: var(--amber); }
.bridge-confirm__actions { display: flex; gap: 8px; margin-top: 10px; }
@media (max-width: 1080px) { .embedded-layout { grid-template-columns: 1fr; } .bridge-log { position: static; } }

/* ── Шаг 9: карточка-мост уровня 3 ── */
.external-bridge__status { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.external-bridge__dot { width: 10px; height: 10px; border-radius: 50%; background: #c9c2b4; }
.external-bridge--checking .external-bridge__dot { background: #d6b46a; animation: external-pulse 1.2s ease-in-out infinite; }
.external-bridge--ready .external-bridge__dot { background: #4f8a55; }
.external-bridge--unavailable .external-bridge__dot { background: #b8574a; }
.external-bridge__actions { margin-top: 12px; }
.external-bridge__rules { margin: 8px 0 0; padding-left: 18px; color: #4f5d55; line-height: 1.6; }
@keyframes external-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .external-bridge--checking .external-bridge__dot { animation: none; } }

/* ── Шаг 10: две группы разделов настроек и перекрёстные ссылки ── */
.module-links { display: flex; justify-content: flex-end; margin: 0 0 -8px; }
.module-links__settings { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; color: #4f5d55; font: inherit; font-size: 12px; cursor: pointer; }
.module-links__settings:hover { border-color: var(--pine); color: var(--pine); }
.settings-section--module > header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.settings-field--module > p { margin: 4px 0 8px; color: #657269; }

/* ── Шаг 12: библиотека блоков (§16) ── */
.block-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.block-layout__side { position: sticky; top: var(--under-topbar); display: grid; gap: 14px; }
.block-layout__main > .block + .block { margin-top: 16px; }
.block--status-decision > header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.block--status-decision h3 { margin: 0; }
.block-decision { margin: 10px 0; }
.block-signs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.block-sign { padding: 8px 10px; border: 1px solid #e0dbd0; border-radius: 10px; font-size: 12px; }
.block-sign span { display: block; color: #728078; }
.block-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.block-safety { margin-top: 10px; }
.block--report-card > header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.block-report__time { color: #728078; white-space: nowrap; }
.block-report__line { color: #4f5d55; }
.registry-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.registry-chip { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; color: #4f5d55; font: inherit; font-size: 12px; cursor: pointer; }
.registry-chip b { font-weight: 600; margin-left: 4px; color: #728078; }
.registry-chip.is-selected { border-color: var(--pine); background: var(--pine); color: #f7f3e8; }
.registry-chip.is-selected b { color: #f1b76d; }
.registry-search { width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fffdf8; }
.registry-row[hidden] { display: none; }
.block--toolbox h3 { margin: 12px 0 6px; font-size: 14px; }
.block--toolbox h3:first-child { margin-top: 0; }
.block-command { gap: 8px; }
.block-command code { overflow-wrap: anywhere; }
.block--onboarding-steps summary { cursor: pointer; list-style: none; }
.block--onboarding-steps summary h3 { display: inline; margin: 0; font-size: 15px; }
.block--onboarding-steps summary::before { content: "▸ "; color: #728078; }
.block--onboarding-steps[open] summary::before { content: "▾ "; }
.block-steps { margin-top: 10px; }
@media (max-width: 1080px) { .block-layout { grid-template-columns: 1fr; } .block-layout__side { position: static; } .inventory .registry-row { grid-template-columns: 1fr 1fr; } }

/* ── Шаг 13: включение модулей и показ на KPI (§17) ── */
.module-manage { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.module-manage__switch { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; color: #4f5d55; font: inherit; font-size: 11.5px; cursor: pointer; }
.module-manage__switch.is-on { border-color: var(--pine); background: var(--pine); color: #f7f3e8; }
.module-manage__switch.is-off { border-color: #b8574a; color: #7c3826; }
.module-disabled-banner { border-color: #d8b4a8; background: #f3ded7; }
.module-disabled-banner h3 { margin: 0 0 6px; }
.kpi-shown { display: flex; gap: 8px; align-items: center; margin: -6px 0 12px; }
.link-button { padding: 0; border: 0; background: none; color: var(--pine); font: inherit; text-decoration: underline; cursor: pointer; }
.settings-modules { display: grid; gap: 8px; }
.settings-module-row { display: grid; grid-template-columns: minmax(0, 2fr) auto auto auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf8; }
.settings-module-row.is-off { opacity: .75; }
.settings-module-row small { display: block; }
@media (max-width: 720px) { .settings-module-row { grid-template-columns: 1fr 1fr; } }

/* ── Шаг 14: бейджи внимания из единого реестра (§18) ── */
.nav-item i { position: relative; }
.nav-badge { position: absolute; top: -7px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; font: 700 9.5px/16px system-ui, sans-serif; text-align: center; color: #fff; cursor: pointer; }
.nav-badge--attention { background: #b8862b; }
.nav-badge--error { background: #b8574a; }
.card-badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; font: 700 10.5px/18px system-ui, sans-serif; text-align: center; color: #fff; cursor: pointer; }
.card-badge--attention { background: #b8862b; }
.card-badge--error { background: #b8574a; }

/* ── Шаг 15: каталог модулей (§22) ── */
.service-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin: 0 0 14px; padding: 8px 14px; border: 1px solid #b7cbb5; border-radius: 10px; background: #e2ecdd; color: #3b5f3e; font-size: 12.5px; }
.service-bar--down { border-color: #d8b4a8; background: #f3ded7; color: #7c3826; }
.service-bar .num { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
/* DQ-268: «Іде зараз» по макету-исходнику — тонкая сворачиваемая строка.
   Свёрнуто: «Іде зараз · N операцій · розгорнути»; раскрыто — строки общей
   строки операции .op-row (DQ-269, ниже), та же строка в «Розробках». */
.catalog-running-block { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; overflow: hidden; }
.catalog-running-head { display: flex; align-items: baseline; gap: 6px; padding: 8px 14px; list-style: none; cursor: pointer; user-select: none; font-size: 13px; }
.catalog-running-head::-webkit-details-marker { display: none; }
.catalog-running-head:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
.catalog-running-head__title { font-weight: 600; }
.catalog-running-head__count, .catalog-running-head__expand, .catalog-running-head__collapse { color: #7c887f; font-size: 12.5px; }
.catalog-running-head__collapse { display: none; margin-left: auto; }
.catalog-running-block[open] > .catalog-running-head { border-bottom: 1px solid #efeae0; }
.catalog-running-block[open] .catalog-running-head__expand { display: none; }
.catalog-running-block[open] .catalog-running-head__collapse { display: inline; }
.catalog-running-block > .catalog-stale { margin: 0; padding: 6px 14px; }
.catalog-stale { color: #7c3826; font-size: 12px; }
.catalog-filter { position: sticky; top: var(--topbar-height); z-index: 5; background: #f7f3e8ee; backdrop-filter: blur(4px); }
/* DQ-268: отступ под строкой отбора — первая группа карточек не прилипает. */
.catalog-filter { margin-bottom: 16px; padding-bottom: 8px; }
.catalog-tokens { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.catalog-token { padding: 4px 10px; border: 1px solid var(--pine); border-radius: 999px; background: var(--pine); color: #f7f3e8; font: inherit; font-size: 11.5px; cursor: pointer; }
.catalog-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.catalog-domains { position: relative; }
.catalog-domains summary { list-style: none; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; font-size: 12px; cursor: pointer; }
.catalog-domains > div { position: absolute; z-index: 6; margin-top: 6px; min-width: 240px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf8; box-shadow: 0 14px 36px #3040381f; display: grid; gap: 4px; }
.catalog-domain { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.catalog-domain b { margin-left: auto; color: #728078; font-weight: 600; }
.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.catalog-layout.has-panel { grid-template-columns: minmax(0, 1fr) 440px; }
.catalog-grid { grid-template-columns: repeat(auto-fill, minmax(316px, 1fr)); }
.catalog-card { display: flex; flex-direction: column; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; }
.catalog-grid > .catalog-card:last-child { margin-bottom: 0; }
/* Описание занимает свободное место, поэтому полоса действий и подвал
   стоят у соседей на одной линии, а не пляшут по длине текста. */
.catalog-card > .catalog-description { flex: 1 1 auto; }
.catalog-card > footer.catalog-meta { margin-top: auto; }
.catalog-card > header { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: start; }
.catalog-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #f3f0e8; color: var(--pine); font-weight: 750; font-size: 13px; letter-spacing: .04em; }
.catalog-icon svg { width: 20px; height: 20px; }
.catalog-head .module-id { display: flex; align-items: center; gap: 8px; margin: 0; }
.catalog-title { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.catalog-title h3 { margin: 2px 0 0; font-size: 19px; }
.catalog-size { display: inline-flex; gap: 2px; }
.catalog-size i { width: 12px; height: 12px; border: 1.5px solid #6e7b73; border-radius: 3px; }
.catalog-size--small i { border-style: dashed; }
.catalog-size--small i + i { width: 6px; height: 6px; margin: 3px 0 0 -8px; border-style: solid; background: #6e7b73; }
/* Обрезка описания: запасное правило по высоте идёт первым — браузер без
   line-clamp показал бы полотно целиком, и именно это и случилось. */
.catalog-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--catalog-card-description-lines); max-height: calc(1.5em * var(--catalog-card-description-lines)); width: 100%; margin: 10px 0 0; padding: 0; border: 0; background: none; color: #657269; line-height: 1.5; text-align: left; font: inherit; cursor: pointer; overflow: hidden; }
.catalog-description::after { content: ""; }
/* Заголовок модуля тоже не тянет карточку вверх. */
.catalog-title h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--catalog-card-title-lines); max-height: calc(1.25em * var(--catalog-card-title-lines)); overflow: hidden; }
.catalog-running { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: #3b5f3e; font-size: 12px; }
.catalog-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e0dbd0; color: #728078; font-size: 11px; }
.catalog-panel { position: sticky; top: var(--under-topbar); z-index: 6; max-height: calc(100svh - var(--under-topbar) - 24px); overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8; box-shadow: 0 14px 36px #3040381f; }
/* DQ-341: домен и теги модуля правятся в самой панели */
.catalog-panel__meta { display: grid; gap: 8px; margin: 12px 0 0; }
.catalog-panel__meta select, .catalog-panel__meta input { width: 100%; }
.catalog-tags summary { cursor: pointer; }
.catalog-refresh-note { margin-left: 8px; }
.catalog-panel > header { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: start; }
.catalog-panel > header h3 { margin: 4px 0 0; }
.catalog-panel__close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: #fffdf8; font-size: 16px; cursor: pointer; }
.catalog-panel__title { margin: 0 0 8px; }
.catalog-panel__version { margin: 10px 0 0; font-size: 14px; }
.catalog-panel__version--open { margin-top: 4px; color: #7c5a26; font-size: 13px; }
.catalog-panel__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 12px 0; }
.catalog-panel__facts dt { color: #728078; font-size: 11px; }
.catalog-panel__facts dd { margin: 0; font-weight: 600; }
/* DQ-341: панель не должна наезжать на список. Её колонка 440px плюс минимум
   карточки 316px и зазор требуют около 790px ширины содержимого; узкий макет
   включался только на 720px, и в промежутке карточки выезжали под непрозрачную
   панель. Порог поднят, и панель получила свою прокрутку, как шторка
   «Розробок», — иначе на длинном содержимом она переставала держаться. */
@media (max-width: 900px) {
  .catalog-layout.has-panel { grid-template-columns: 1fr; }
  .catalog-panel { position: static; max-height: none; }
  .catalog-filter { position: static; }
}

/* ── Шаг 16: центр диагностики (§20) ── */
.diagnostic-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.diagnostic-item__actions button[data-copied] { border-color: #4f8a55; }
/* Панель налаштувань — за макетом docs/interfaces/prototype-v2/shell-v2.html
   (2026-09-11): перемикач-пігулка замість голого чекбокса, підпис-пояснення
   під назвою кожного рядка, кнопка повернення висоти замість голого числа. */
.diagnostic-settings > .qset { border-top: 0; padding: 0; display: block; }
.qset-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.qset-row:first-child { border-top: 0; }
.qset-row strong { display: block; font-size: 13px; }
.qset-row small { display: block; margin-top: 2px; color: #7b877f; font-size: 11px; }
.switch { flex: none; width: 46px; height: 26px; padding: 3px; border: 0; border-radius: 999px; background: #cfcabd; cursor: pointer; transition: background-color .18s ease; }
.switch i { display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #14231f33; transition: transform .18s ease; }
.switch.is-on { background: #35633e; }
.switch.is-on i { transform: translateX(20px); }
.qset-select { padding: 8px 10px; border: 1px solid #c5cabe; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
.diag-switch { display: inline-flex; align-items: center; gap: 6px; }
.diag-local { margin-left: 8px; font-style: normal; color: #7c5a26; font-size: 10.5px; }
.diag--no-tech .diag-tech { display: none; }
.log-row[hidden] { display: none; }
.diag-tools .hint { margin-left: auto; }

/* ── Шаг 17: ассистент команды ИИ (§19) ── */
.topbar-assistant { position: relative; }
.topbar-assistant .nav-badge { position: absolute; top: -6px; right: -6px; }
.assistant-region { display: none; }
.assistant-region.is-open { display: block; }
.shell.has-assistant main { padding-right: 396px; }
.assistant-dock { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: 380px; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; border-left: 1px solid var(--line); background: #fffdf8; box-shadow: -14px 0 40px #14231f1f; overflow-y: auto; }
.assistant-dock > header { display: flex; justify-content: space-between; align-items: start; }
.assistant-dock > header h3 { margin: 2px 0 0; }
.assistant-staff { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-staff__item { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; }
.assistant-staff__item.is-off { opacity: .55; text-decoration: line-through; }
.assistant-channels { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.assistant-channels button { padding: 6px 10px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: 12.5px; cursor: pointer; }
.assistant-channels button.is-active { border-bottom-color: var(--pine); font-weight: 600; }
.assistant-channels button.is-off em { font-style: normal; color: #8a958d; font-size: 10.5px; }
.assistant-threads { display: flex; flex-wrap: wrap; gap: 4px; }
.assistant-thread { padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; font: inherit; font-size: 11px; cursor: pointer; }
.assistant-thread.is-active { border-color: var(--pine); }
.assistant-thread b { color: #b8862b; }
.assistant-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.assistant-msg { padding: 8px 10px; border-radius: 12px; background: #f3f0e8; }
.assistant-msg--human { background: #e2ecdd; align-self: flex-end; max-width: 90%; }
.assistant-msg header { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #4f5d55; font-weight: 600; }
.assistant-msg header small { font-weight: 400; color: #7c5a26; }
.assistant-msg p { margin: 4px 0 0; }
.assistant-ctx { color: #728078; font-size: 10.5px; }
.assistant-action { border-color: var(--amber); }
.assistant-context { display: grid; gap: 4px; padding: 8px 10px; border: 1px dashed #c9c2b4; border-radius: 10px; font-size: 11.5px; }
.assistant-context.is-off { opacity: .6; }
.assistant-context button { justify-self: start; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; font: inherit; font-size: 11px; cursor: pointer; }
.assistant-form { display: grid; gap: 6px; }
.assistant-form textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
@media (max-width: 720px) {
  .shell.has-assistant main { padding-right: 15px; }
  .assistant-dock { width: auto; left: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .assistant-form { position: sticky; bottom: 0; padding-bottom: env(safe-area-inset-bottom); background: #fffdf8; }
  .assistant-staff { flex-wrap: nowrap; overflow-x: auto; }
}

/* ── §14: подсказки видимым текстом на узком экране ── */
.catalog-badge-reason, .diagnostic-dock .badge-sources { display: none; }
@media (max-width: 720px) {
  .catalog-badge-reason { display: block; grid-column: 1 / -1; color: #657269; font-size: 11px; }
  .diagnostic-dock .badge-sources { display: block; color: #aebaae; font-size: 10px; }
  .diagnostic-dock .platform { width: 220px; }
}

/* ── §11.2–11.7: карточки, карта и журнал настроек ── */
.settings-fields--cards { display: grid; gap: 12px; }
.settings-card { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; }
.settings-card--readonly { background: #f6f3ec; }
.settings-card--toggle { border-color: #d9dfd3; }
.settings-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.settings-card__head strong { font-size: 14px; }
.settings-card__explain { margin: 0; color: #5a675f; font-size: 13px; line-height: 1.45; }
.settings-card__control { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.settings-card__control .settings-field__editor { margin: 0; }
.settings-card__value code { padding: 5px 9px; border: 1px dashed #d9cfbb; border-radius: 8px; background: #fbf9f3; color: #4f5d55; }
.settings-card__value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.settings-card__reason { margin: 0; color: #8c673b; font-size: 12px; }
.settings-card__foot { padding-top: 6px; border-top: 1px dashed #e4e1d6; }
.settings-effect { font-size: 11px; color: #6b786f; }
.settings-effect--connection { color: #9a6b1f; }
.settings-effect--danger { color: #9b3b2f; font-weight: 700; }
.settings-badge--draft { background: #fbeccc; color: #8a5a11; }
.settings-tech { font-size: 12px; }
.settings-tech summary { color: #7d8981; cursor: pointer; }
.settings-tech__body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 6px; }
.settings-switch { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid #cfd5c9; border-radius: 999px; background: #fff; color: #25372d; font-weight: 600; cursor: pointer; }
.settings-switch__knob { display: block; width: 30px; height: 30px; border-radius: 50%; background: #c6cdc1; transition: background .12s ease, transform .12s ease; }
.settings-switch.is-on { border-color: #35633e; }
.settings-switch.is-on .settings-switch__knob { background: #35633e; }
.settings-switch:focus-visible { outline: 2px solid #eadbc0; outline-offset: 1px; }
.settings-revert { padding: 6px 12px; border: 1px solid #b79162; border-radius: 9px; background: #fff; color: #835c2d; font-size: 12px; }
.settings-revert--default { border-style: dashed; }
.settings-revert:hover, .settings-revert:focus-visible { background: #f7efe2; outline: none; }
.settings-changes { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.settings-changes h4 { margin: 0 0 8px; font-size: 13px; }
.settings-changes__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.settings-changes__list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; font-size: 12px; }
.settings-changes__list time { color: #7d8981; white-space: nowrap; }
.settings-changes__list small { color: #7d8981; }
.settings-changes__more { margin-top: 8px; padding: 4px 10px; border: 1px solid #dfe2d6; border-radius: 8px; background: #fff; font-size: 12px; }
.settings-drafts { margin-top: 14px; padding: 10px 12px; border: 1px dashed #d9b46b; border-radius: 10px; background: #fff8e8; font-size: 12px; }
.settings-drafts ul { columns: 2; margin: 8px 0; padding-left: 18px; }
.settings-mapshell { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: 1fr 30px auto; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; overflow: hidden; }
.settings-map { position: relative; height: 300px; margin: 14px 16px 6px 6px; background-image: linear-gradient(to right, #e3e6e0 1px, transparent 1px), linear-gradient(to bottom, #e3e6e0 1px, transparent 1px); background-size: 25% 100%, 100% 25%; background-position: -1px 0, 0 -1px; }
.settings-map__axis-y { display: flex; align-items: center; justify-content: center; }
.settings-map__axis-y span { writing-mode: vertical-rl; transform: rotate(180deg); color: #7d8981; font-size: 11px; }
.settings-map__axis-x { display: flex; align-items: center; justify-content: center; color: #7d8981; font-size: 11px; }
.settings-map__corner { position: absolute; padding: 2px 8px; border-radius: 999px; background: #fff; color: #7d8981; font-size: 10px; pointer-events: none; }
.settings-map__corner--tl { top: 6px; left: 6px; }
.settings-map__corner--br { right: 6px; bottom: 6px; }
.settings-map__legend { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 6px 16px 10px; color: #6b786f; font-size: 11px; }
.settings-map__legend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 50%; vertical-align: middle; }
.settings-map__legend b { display: inline-block; padding: 0 4px; border-radius: 6px; background: #f2b35a; color: #3b2a08; font-size: 10px; }
.settings-dot { position: absolute; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0; border: 2px solid #35633e; border-radius: 50%; background: #fff; cursor: pointer; transition: transform .12s ease; }
.settings-dot--core, .settings-map__legend .settings-dot--core { border-color: #35633e; background: #dfeadf; }
.settings-dot--module, .settings-map__legend .settings-dot--module { border-color: #2f5f8f; background: #dde8f3; }
.settings-dot--danger, .settings-map__legend .settings-dot--danger { border-color: #9b3b2f; background: #f6dcd7; }
.settings-dot b { position: absolute; top: -8px; right: -8px; min-width: 14px; padding: 0 3px; border-radius: 7px; background: #f2b35a; color: #3b2a08; font-size: 9px; line-height: 14px; text-align: center; }
.settings-dot__name { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: #4f5d55; font-size: 10px; }
@media (hover: hover) {
  .settings-dot:hover, .settings-dot:focus-visible { z-index: 5; transform: scale(1.18); outline: none; }
}
.settings-dot:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
@media (max-width: 720px) {
  .settings-map { height: 240px; }
  .settings-dot__name { display: none; }
  .settings-changes__list li { grid-template-columns: 1fr; gap: 2px; }
}
.settings-card--unsupported { border-style: dashed; }
.settings-card__default-note { margin: 0; }
.settings-dot--crowded .settings-dot__name { display: none; }
.settings-dot--crowded:hover .settings-dot__name, .settings-dot--crowded:focus-visible .settings-dot__name { display: block; z-index: 6; padding: 1px 6px; border-radius: 6px; background: #fff; box-shadow: 0 2px 8px #3040382b; }

/* «Розробки» — представления, дорожки сред, ось «чей ход» и карточки задач (PAI-D03 §18). */
.developments-views { margin: -8px 0 18px; }
.developments-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.developments-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #4d5a52; font: inherit; font-size: 13px; cursor: pointer; }
.developments-chip span { min-width: 18px; padding: 0 6px; border-radius: 999px; background: #ece8dd; color: #5c5240; font-size: 11px; text-align: center; }
.developments-chip.is-active { border-color: #8c673b; background: #f5efe2; color: #5c4522; }
.developments-group { margin-top: 20px; }
.developments-group > h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0 0 12px; font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.developments-group > h3 span { padding: 1px 8px; border-radius: 999px; background: #ece8dd; color: #5c5240; font-family: inherit; font-size: 12px; }
.developments-group > h3 small { color: #7c887f; font-family: system-ui, sans-serif; font-size: 12px; }
.developments-group > ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.developments-group--mine > h3 span { background: #f2e6cf; color: #865f2d; }
.developments-tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.developments-track { display: grid; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #faf8f3; }
.developments-track b { color: #7c887f; font-size: 11px; font-weight: 500; }
.developments-track > span { font-family: ui-monospace, monospace; font-size: 13px; color: #2f3a33; }
.developments-track i { font-style: normal; font-size: 11px; color: #68756d; overflow-wrap: anywhere; }
.developments-track--verified { border-color: #b9d3bd; background: #f1f7f2; }
.developments-track--conflict { border-color: #d8a79f; background: #fff4f2; }
.developments-sync { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.developments-sync-result { font-style: normal; font-size: 11px; overflow-wrap: anywhere; }
.developments-sync-result.is-synced { color: #4c7a54; }
.developments-sync-result.is-diverged { color: #a4483c; }
.developments-sync-result.is-unavailable { color: #68756d; }
.developments-release { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.channel-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 14px; }
.channel-summary p { flex-basis: 100%; margin: 4px 0 0; color: #68756d; font-size: 12px; }
.channel-cards { display: grid; gap: 14px; }
.channel-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.channel-card > header h3 { margin: 0; font-size: 15px; }
.channel-card > header code { font-size: 12px; color: #68756d; }
.channel-card__versions { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.channel-card__pill { flex: 1; padding: 8px 12px; border-radius: 10px; background: #faf8f3; border: 1px solid var(--line); }
.channel-card__pill--parent { background: #f1f7f2; border-color: #b9d3bd; }
.channel-card__pill small { display: block; color: #7c887f; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
.channel-card__pill strong { font-family: ui-monospace, monospace; font-size: 14px; }
.channel-card__arrow { color: #7c887f; }
.channel-card__reason { margin: 0 0 12px; color: #4d5a52; font-size: 13px; }
.channel-action { padding: 7px 14px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.channel-action:disabled { cursor: not-allowed; opacity: .55; }
.channel-action--accept { border: 1px solid var(--pine); background: var(--pine); color: #fff; }
.channel-action--defer { border: 1px solid var(--line); background: #fff; color: #4d5a52; }
.channel-action--pin { border: 1px dashed #8c9186; background: transparent; color: #68756d; }
.channel-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.developments-turn { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; color: #4d5a52; }
.developments-turn i { width: 7px; height: 7px; border-radius: 50%; background: #9aa69e; }
.developments-turn--mine { border-color: #8c673b; color: #5c4522; }
.developments-turn--mine i { background: #b7822f; }
.developments-inline { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.developments-inline li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.developments-inline small { color: #7c887f; }
.developments-task { display: grid; gap: 12px; min-width: 0; }
.developments-task > header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.developments-task h3 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.developments-task code { overflow-wrap: anywhere; color: #835c2d; }
.developments-task__description { margin: 0; color: #68756d; font-size: 13px; line-height: 1.5; }
.developments-task--off { opacity: 0.88; }
.developments-action { justify-self: start; padding: 7px 14px; border: 1px solid #8c673b; border-radius: 8px; background: #f5efe2; color: #5c4522; font: inherit; font-size: 13px; cursor: pointer; }
.developments-action:disabled { cursor: not-allowed; opacity: 0.55; }
/* Дорога из экрана модуля в «Розробки» — ссылка, а не кнопка, но выглядит и
   нажимается так же, включая палец (44px, ТЗ-01) (DQ-183). */
a.developments-action { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.developments-queue-head { display: grid; gap: 8px; }
.developments-queue-head .monitoring-display { margin-top: 4px; }
.developments-list > ul, .developments-group > ul { min-width: 0; }
@media (max-width: 720px) {
  .developments-tracks { grid-template-columns: 1fr; }
}

/* «Розробки» — формы, план, следующий шаг, «стан зараз», согласование (PAI-D04–D06). */
.developments-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.developments-action.is-active { background: #5c4522; color: #fff; }
.developments-action--quiet { border-color: var(--line); background: #fff; color: #4d5a52; }
.developments-message { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #f1f7f2; color: #2f5b3a; font-size: 13px; }
.developments-form { display: grid; gap: 14px; margin-bottom: 18px; }
.developments-form > header h3 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.developments-form > header p { margin: 0; color: #68756d; font-size: 13px; line-height: 1.5; }
.developments-form__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 14px; }
.developments-form__fields label { display: grid; gap: 4px; font-size: 12px; color: #7c887f; }
.developments-form__fields input, .developments-form__fields textarea { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; color: #2f3a33; background: #fff; }
.developments-form__check { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 8px; }
.developments-form__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.developments-plan { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.developments-plan h4 { margin: 0; font-size: 15px; }
.developments-steps { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: 13px; }
.developments-steps li span { color: #4d5a52; }
.developments-steps li small { color: #7c887f; }
.developments-steps li.is-now b { color: #5c4522; }
.developments-conflicts { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.developments-next { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f5efe2; }
.developments-next dt { color: #7c887f; font-size: 11px; }
.developments-next dd { margin: 3px 0 0; }
.developments-next small { color: #7c887f; }
/* DQ-261: «Прийнято за 7 днів», «поза розробкою», окно «Нова версія існуючого» */
.developments-accepted { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.developments-accepted > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: #425148; }
.developments-accepted > summary span { padding: 0 7px; border-radius: 8px; background: #eef2ed; font-size: 11px; }
.developments-accepted ul { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.developments-accepted__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.developments-accepted__row small { color: #7c887f; }
.developments-outside { margin: 8px 0 0; color: #7c887f; font-size: 12px; }
.developments-create-modes { margin: 8px 0; }
.developments-version__search { display: grid; gap: 4px; font-size: 12px; color: #7c887f; }
.developments-version__search input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.developments-version__list { display: grid; gap: 4px; max-height: 40vh; max-height: 40svh; overflow-y: auto; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.developments-version__list label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.developments-version__list label:hover { background: #f5efe2; }
.developments-version__list small { color: #7c887f; }
.developments-now { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; }
.developments-now--running { background: #e1ecf7; color: #2c4a72; }
.developments-now--error { background: #f2ddd9; color: #8f4237; }
.developments-project__badges { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; }
.developments-history summary { cursor: pointer; color: #68756d; font-size: 13px; }
.developments-history ul { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.developments-history small { color: #7c887f; }
.developments-reconcile { display: grid; gap: 12px; }
.developments-reconcile__table td { vertical-align: top; }
.developments-reconcile-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }

/* Приём (PAI-D04A): степпер протокола, формы шагов, приёмная зона. */
.intake-stepper { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.intake-stepper li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border: 1px solid var(--line); border-radius: 999px; color: #7c887f; background: #fff; }
.intake-stepper li span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #ece8dd; color: #5c5240; font-size: 11px; }
.intake-stepper li.is-done { color: #2f5b3a; border-color: #b9d3bd; }
.intake-stepper li.is-done span { background: #cfe5d3; color: #2f5b3a; }
.intake-stepper li.is-current { color: #5c4522; border-color: #8c673b; background: #f5efe2; }
.intake-stepper li.is-current span { background: #b7822f; color: #fff; }
.intake-stepper li.is-rejected { color: #8f4237; border-color: #d8a79f; background: #fff4f2; }
.intake-case { display: grid; gap: 12px; min-width: 0; }
.intake-case > header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.intake-case h3 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.intake-case code { overflow-wrap: anywhere; color: #835c2d; }
.intake-block h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; }
.intake-case__actions { display: grid; gap: 10px; }
.intake-form { display: grid; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f5f3ec; }
.intake-form fieldset { display: grid; gap: 6px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.intake-form legend { padding: 0 4px; color: #7c887f; font-size: 12px; }
.intake-form label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.intake-form label > span:first-child { color: #7c887f; font-size: 12px; }
.intake-form input[type="text"], .intake-form input:not([type]) { flex: 1; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.intake-option b { min-width: 16px; color: #5c4522; }
.intake-criteria label { font-size: 12px; }
.intake-candidate small { color: #7c887f; }
.intake-inbox { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.intake-inbox li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.intake-inbox small { color: #7c887f; }

/* Внешние каталоги модулей и паспорт platform_task. */
.external-catalogs { display: grid; gap: 10px; margin-bottom: 16px; }
.external-catalogs h3 { margin: 0 0 4px; font-size: 15px; }
.external-catalogs p { margin: 0; color: #68756d; font-size: 13px; line-height: 1.5; }
.external-catalogs ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.external-catalogs li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.task-passport { display: grid; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f5f3ec; }
.task-passport__capabilities { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 14px; }
.task-passport__capabilities dt { color: #7c887f; font-size: 11px; }
.task-passport__capabilities dd { margin: 3px 0 0; }
.developments-task__kind { margin: 0; }

/* Крок 1 полиці: три щільності картки (H2), монограма (F1), бічна панель (C2). */
.mono-fb { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid #8c673b; border-radius: 9px; color: #5c4522; font: 600 12px/1 ui-monospace, monospace; letter-spacing: 0.04em; opacity: 0.85; flex: none; }
/* DQ-268: в «Розробках» вместо букв — пиктограмма модуля. */
.mono-fb--glyph svg { display: block; width: 20px; height: 20px; }
.dn-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #ece8dd; color: #5c5240; font-size: 10px; letter-spacing: 0.02em; }
.dn-badge.attn { background: #f2e6cf; color: #865f2d; }
.dn-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
/* DQ-262: карточка шире, строка ниже — список остаётся читаемым рядом с листом. */
.dn-layout.has-sheet { grid-template-columns: minmax(0, 1fr) minmax(480px, 720px); }
.dn-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dn-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; gap: 0; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.dn-row:hover, .dn-row:focus-within { border-color: #8c673b; }
.dn-row.is-selected { border-color: #8c673b; background: #f5efe2; }
.dn-row__id { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.dn-row__id:empty { display: none; }
.dn-row__view code { color: #835c2d; font-size: 12px; overflow-wrap: anywhere; }
.dn-row__name { display: grid; min-width: 0; font-size: 13px; line-height: 1.3; }
.dn-row__name small { color: #7c887f; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-row__stage { display: flex; align-items: center; gap: 6px; }
.dn-row__stage code { color: #2f3a33; font-size: 12px; }
.dn-row__turn { display: flex; align-items: center; gap: 6px; }
.dn-row__cta { color: #8c673b; font-size: 12px; white-space: nowrap; }
.dn-line { font-size: 13px; }
.dn-line code { color: #835c2d; }
.dn-line em { font-style: normal; color: #7c887f; }
/* Лист центра диагностики (DQ-187). */
.dn-sheet { position: sticky; top: var(--under-topbar); max-height: calc(100vh - var(--under-topbar) - 12px); max-height: calc(100svh - var(--under-topbar) - 12px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: #fbfaf6; box-shadow: 0 10px 30px rgba(40, 45, 42, 0.08); }
/* Исключение из правила DQ-187: шапка прилипает к верху СВОЕЙ прокрутки
   (.dn-sheet ниже по дереву и сам прокручивается), а не к окну. */
.dn-sheet__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfaf6; }
.dn-sheet__head h3 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.dn-sheet__head code { color: #835c2d; font-size: 12px; }
.dn-sheet__head > div { flex: 1; min-width: 0; }
.dn-sheet__close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.dn-sheet__body { margin: 0; padding: 12px; list-style: none; }
.dn-sheet__body > li > .panel { box-shadow: none; }
.dn-empty { display: grid; gap: 8px; justify-items: start; padding: 22px; border: 1px dashed #c9c2b0; border-radius: 14px; }
@media (max-width: 1100px) {
  .dn-layout.has-sheet { grid-template-columns: minmax(0, 1fr); }
  .dn-sheet { position: static; max-height: none; }
  .dn-row__cta { display: none; }
}

/* Крок 2 полиці: метрики трьома плитками (C3), чип «без руху» (D2). */
.developments-metrics { margin: 0 0 14px; }
.developments-now--idle { background: #ece8dd; color: #5c5240; }

/* DQ-159 (И-4): признаки схемы — принадлежность и стадия кода. Пара читается
   как факт, а не как оценка, поэтому подпись основания идёт рядом (в карточке
   строкой, в списке — подсказкой title). Своих цветов признаки не заводят:
   палитра заморожена проверкой §6.11 соседнего вопроса, поэтому берутся уже
   существующие пары статусов — иначе признак расширял бы палитру ради себя. */
.developments-traits { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.developments-trait { display: inline-flex; flex-direction: column; padding: 2px 8px; border-radius: 6px; font-size: 11px; line-height: 1.35; }
.developments-trait small { font-size: 10px; opacity: 0.8; }
.developments-trait--internal { background: #dcebdd; color: #35633e; }
.developments-trait--external { background: #ece2d1; color: #8c673b; }
.developments-trait--ready { background: #e1ecf7; color: #2c4a72; }
.developments-trait--raw { background: #f2e6cf; color: #865f2d; }
/* DQ-262: стадия цикла словами (без капса .status) и строка закрепления в канале;
   цвета — уже существующие пары. */
.developments-stage { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: #dde6dd; color: #47604d; font-size: 11px; line-height: 1.35; white-space: nowrap; }
.developments-channel-pin { margin: 0 0 10px; color: #2c4a72; font-size: 12px; }
.developments-chip[aria-disabled="true"] { opacity: 0.55; }

/* Крок 3 полиці: рядок фільтра з токенами (D1) і випадайки (D3). */
.dn-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.dn-filter__field { display: flex; flex: 1 1 320px; align-items: center; gap: 8px; min-width: 0; }
.dn-filter__field b { color: #7c887f; font-size: 12px; font-weight: 500; }
.dn-filter__field input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: 13px/1.4 ui-monospace, monospace; color: #2f3a33; background: #faf8f3; }
.dn-filter__count { color: #7c887f; font-size: 12px; white-space: nowrap; }
.dn-filter__help { flex-basis: 100%; color: #9aa69e; font-size: 11px; font-family: ui-monospace, monospace; }
.dn-menu { position: relative; }
.dn-menu > summary { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; cursor: pointer; list-style: none; }
.dn-menu > summary::-webkit-details-marker { display: none; }
.dn-menu > summary span { padding: 0 6px; border-radius: 999px; background: #f5efe2; color: #5c4522; font-size: 11px; }
.dn-menu[open] > summary { border-color: #8c673b; }
.dn-menu__list { position: absolute; z-index: 7; top: calc(100% + 6px); left: 0; display: grid; gap: 6px; min-width: 200px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(40, 45, 42, 0.1); }
.dn-menu__list label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
[data-developments-query-copy][data-copied="true"] { background: #f1f7f2; color: #2f5b3a; }

/* Крок 4 полиці: банер «дані могли застаріти» (B2) і рядок операції з поступом (B3). */
.dn-source { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #68756d; font-size: 12px; }
.dn-source code { color: #835c2d; }
.dn-source__read { margin-left: auto; font-family: ui-monospace, monospace; }
.dn-source.is-stale { border-color: #d9b46a; background: #fdf6e3; color: #6d5324; }
.dn-source.is-stale .dn-source__read { color: #865f2d; font-weight: 600; }
.dn-ops { margin: 0 0 14px; }
.dn-ops > h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-family: Georgia, serif; font-size: 17px; font-weight: 500; }
.dn-ops > h3 span { padding: 1px 8px; border-radius: 999px; background: #e1ecf7; color: #2c4a72; font-family: inherit; font-size: 12px; }
.dn-ops > h3 small { color: #7c887f; font-family: system-ui, sans-serif; font-size: 12px; }
@keyframes dn-op-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
/* DQ-269: одна строка операции — «Іде зараз» каталога и «Операції» «Розробок»
   (common.js operationRow). В одну линию: пиктограмма | МОДУЛЬ | название +
   серое пояснение | полоса | время. Полоса: настоящий процент (data-width →
   CSSOM), бегущая — только без шагов, очередь — серая полная, отказ — красная
   полная. Цвета — прежние цвета обеих реализаций, новых нет. */
.op-row { width: 100%; display: grid; grid-template-columns: 20px 148px minmax(0, 1fr) 96px 56px; gap: 12px; align-items: center; padding: 7px 14px; border: 0; border-top: 1px solid #efeae0; background: transparent; color: inherit; font: inherit; text-align: left; }
button.op-row { cursor: pointer; }
.catalog-running-list > .op-row:first-child, .op-list > .op-row:first-child { border-top: 0; }
button.op-row:hover { background: #f3f0e8; }
button.op-row:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
.op-row__glyph { width: 20px; height: 20px; color: #5c4522; opacity: 0.7; }
.op-row__glyph svg { display: block; width: 20px; height: 20px; }
.op-row__mod { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.02em; color: #728078; }
.op-row__what { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.op-row__what strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 500; }
.op-row__what small { overflow: hidden; text-overflow: ellipsis; color: #7c887f; font-size: 12px; }
.op-row__what small.op-row__error { color: #843a30; }
.op-row__time { font: 12px/1.2 ui-monospace, Menlo, Consolas, monospace; color: #7c887f; text-align: right; white-space: nowrap; }
.op-bar { position: relative; height: 4px; border-radius: 999px; background: #ece8dd; overflow: hidden; }
.op-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: #4f8a55; transition: width 0.3s ease; }
.op-bar--idle i { width: 40%; background: #b7822f; animation: dn-op-slide 1.4s ease-in-out infinite; }
.op-bar--queued i { width: 100%; background: #c9c2b0; }
.op-bar--failed i { width: 100%; background: #c9756a; }
@media (prefers-reduced-motion: reduce) { .op-bar--idle i { animation: none; width: 100%; } .op-bar i { transition: none; } }
/* «Розробки»: секция «Операції» — обёртка .dn-ops, строки — те же .op-row. */
.dn-ops .op-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; overflow: hidden; }
@media (max-width: 720px) {
  .op-row { grid-template-columns: 20px minmax(0, 1fr) 56px; grid-template-areas: "glyph mod time" "what what what" "bar bar bar"; row-gap: 5px; }
  .op-row__glyph { grid-area: glyph; }
  .op-row__mod { grid-area: mod; }
  .op-row__what { grid-area: what; white-space: normal; flex-wrap: wrap; }
  .op-row > .op-bar { grid-area: bar; }
  .op-row__time { grid-area: time; }
}

/* Крок 5 полиці: підтвердження через наслідок (G5); блок підпису дозволу модуля упразднено (DQ-581). */
.dn-confirm { display: grid; gap: 10px; margin: 0 0 16px; padding: 14px 16px; border: 1.5px solid #8c673b; border-radius: 14px; background: #fbf6ea; box-shadow: 0 10px 30px rgba(40, 45, 42, 0.08); }
.dn-confirm h4 { margin: 0; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.dn-confirm__consequence { margin: 0; color: #4d3a1e; font-size: 14px; line-height: 1.55; }
.dn-confirm__input { display: grid; gap: 4px; font-size: 12px; color: #7c887f; }
.dn-confirm__input input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.developments-action--danger { border-color: #8f4237; background: #f2ddd9; color: #8f4237; }

/* Крок 6 полиці: швидкі дії з паспорта (E1) і журнал змін розділу (E3). */
.dn-quick { display: grid; gap: 6px; }
.dn-quick dt { color: #7c887f; font-size: 11px; }
.dn-quick dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.dn-quick__action { padding: 5px 11px; border: 1px solid #8c673b; border-radius: 999px; background: #f5efe2; color: #5c4522; font: inherit; font-size: 12px; cursor: pointer; }
.dn-quick__action.is-ghost { border-style: dashed; background: #fff; color: #9aa69e; }
.dn-quick dd small { color: #9aa69e; font-size: 11px; }
.dn-journal { margin-top: 22px; }
.dn-journal > summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; font-family: Georgia, serif; font-size: 18px; font-weight: 500; list-style: none; }
.dn-journal > summary::-webkit-details-marker { display: none; }
.dn-journal > summary::before { content: "▸"; order: -1; font-size: 14px; color: #7c887f; transition: transform .15s ease; }
.dn-journal[open] > summary::before { transform: rotate(90deg); }
.dn-journal > summary small { color: #7c887f; font-family: system-ui, sans-serif; font-size: 12px; }
.dn-journal__table td { vertical-align: top; }

/* Реєстрові рядки — один стовпець; сітка карток на них не поширюється. */
.developments-group > ul.dn-list { grid-template-columns: minmax(0, 1fr); }

/* Крок 7 полиці: картки сервісів як у макеті — монограма, ініціатор, «коли», стан зараз. */
.svc__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.svc__head code { color: #835c2d; font-size: 12px; }
.svc__head h3 { margin: 2px 0 0; }
.svc--off { opacity: 0.92; }
.ini { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11px; }
.ini::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.ini--sys { background: #e1ecf7; color: #2c4a72; }
.ini--man { background: #f2e6cf; color: #865f2d; }
.ini--none { background: #ece8dd; color: #5c5240; }
.svc__when { margin: 0; color: #68756d; font-size: 12px; font-family: ui-monospace, monospace; }
.svc__now { margin: 0; }
.now-badge { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 11px; }
.now-run { background: #e2efe3; color: #2f5b3a; }
.now-idle { background: #ece8dd; color: #5c5240; }

/* Крок 8: робот переносу — карта «звідки → куди». */
.intake-import > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; cursor: pointer; font-size: 14px; }
.intake-import > summary span { color: #7c887f; font-size: 12px; }
.intake-import tr.is-skip td { color: #9aa69e; }


/* Правки за макетом модулів (2026-09-10): гліф замість монограми, зелена смуга зайнятої картки, CLI · API · GUI. */
.catalog-icon--glyph { border: 0; background: none; color: #5c6a60; opacity: .78; }
.catalog-icon--glyph svg { width: 24px; height: 24px; }
.catalog-card--busy { border-color: #b9cfbb; box-shadow: inset 3px 0 0 #3b6f45, 0 14px 36px #3040380b; }
.catalog-ifc { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; }

/* §19: інцидент розробки — збережений об'єкт. Рівень, контур, лічильник, реакція. */
.dn-incident { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 14px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.dn-incident.is-closed { opacity: .7; background: #faf8f3; }
.dn-incident__level { display: inline-flex; align-items: center; justify-content: center; min-width: 88px; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dn-incident__level--failure { background: #f6e3de; color: #8a3a2a; }
.dn-incident__level--warning { background: #f4ebcf; color: #7a5a12; }
.dn-incident__level--closed { background: #e6ebe6; color: #4f5f55; }
.dn-incident__body h4 { margin: 0 0 4px; font-size: 14px; }
.dn-incident__body p { margin: 0; color: #5e6b63; font-size: 13px; }
.dn-incident__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0 0; color: #7c887f; font-size: 11.5px; }
.dn-incident__meta code { font-size: 11px; }
.dn-incident__count { font-family: ui-monospace, monospace; font-size: 12px; color: #2f3a33; }
.dn-incident__react { display: flex; flex-direction: column; gap: 6px; min-width: 210px; }
.dn-incident__react select, .dn-incident__react input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: 12.5px/1.4 inherit; background: #faf8f3; }
.dn-incident__react button { align-self: flex-start; }
.dn-incident__contour { display: inline-flex; padding: 2px 7px; border: 1px dashed #b7c1b9; border-radius: 6px; color: #4f5f55; }
.dn-badge.inc { background: #f6e3de; color: #8a3a2a; }
.intake-import tr.is-substituted td { background: #eef5ee; }
.intake-contract-summary { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 0; font-size: 12.5px; color: #4f5f55; }
/* DQ-168 (И-5): результат робота приёма — три группы ответа. Своих цветов
   нет: палитра заморожена (§6.11), группы различаются разметкой, а статусы
   берут существующие пары .status--*. */
.intake-result { display: grid; gap: 10px; margin-top: 10px; }
.intake-result h4 { margin: 0; }
.intake-result__group { display: grid; gap: 6px; padding-left: 10px; border-left: 3px solid currentColor; }
.intake-result__group--done { opacity: 1; }
.intake-result__group--skipped, .intake-result__group--decide { opacity: 0.92; }
.intake-result__list { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: 12px; }
.intake-candidate input[name^="reason:"] { margin-left: 26px; width: min(100%, 360px); padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }

/* Правки за макетом shell-v2 (2026-09-10): KPI-картка, карта налаштувань, панель діагностики. */
.kpi-card { position: relative; min-height: 0; padding: 20px 22px 16px; display: block; }
.kpi-card header { align-items: start; }
.kpi-card header > div:first-child { display: grid; gap: 2px; min-width: 0; }
.kpi-card__title { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.kpi-card__title h3 { margin: 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.kpi-card header .hint code { font-size: 11px; color: #7a867e; }
.kpi-card__state { display: flex; align-items: center; gap: 8px; }
.kpi-card__state .status { padding: 4px 8px; font-size: 9.5px; letter-spacing: .04em; }
.kpi-card__badge { position: absolute; top: 56px; right: 22px; }
.kpi-card .kpi-value { display: block; margin: 14px 0 4px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.kpi-card .kpi-detail { margin: 0; color: #657269; font-size: 13px; line-height: 1.5; }
.kpi-card > strong { margin: 14px 0 4px; }
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; padding-top: 14px; border-top: 1px solid #e6e1d5; }
.quick { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid #d5cfc2; border-radius: 9px; background: #f8f5ed; color: #3d5045; font: 12px/1.3 inherit; cursor: pointer; }
.quick:hover { border-color: #b79162; background: #fff; }
.quick i { font-style: normal; color: #9a6a31; }
.quick b { min-width: 16px; padding: 0 5px; border-radius: 8px; background: #f0d9a8; color: #77521a; font-size: 10px; text-align: center; }
.quick--ghost { border-style: dashed; color: #6d7a71; }
.quick:disabled { opacity: .5; cursor: not-allowed; }
.kpi-card .module-card-pin { width: 28px; height: 28px; font-size: 14px; color: #b9b2a3; border-color: transparent; }
.kpi-card:hover .module-card-pin { border-color: #ddd7ca; }
.kpi-card .module-card-pin.is-pinned { color: #c8902f; border-color: #e6d3ac; background: #fdf6e7; }

/* Карта налаштувань: плашка з підписом усередині (макет .smap-dot). */
.settings-dot { width: auto; height: auto; margin: 0; padding: 6px 11px; gap: 6px; border: 1px solid #cfd8cd; border-radius: 999px; background: #f4f7f2; color: #3c5045; font-size: 12px; white-space: nowrap; transform: translate(-50%, -50%); }
.settings-dot--core, .settings-map__legend .settings-dot--core { border-color: #cfd8cd; background: #f4f7f2; color: #3c5045; }
.settings-dot--module, .settings-map__legend .settings-dot--module { border-color: #c6d2e2; background: #eef2f8; color: #37506e; }
.settings-dot--danger, .settings-map__legend .settings-dot--danger { border-color: #ddb6ae; background: #f8ece9; color: #8f4237; }
.settings-dot b { position: static; min-width: 16px; padding: 0 5px; border-radius: 8px; background: #e6cf9c; color: #6b4c17; font-size: 10px; line-height: 16px; order: 2; }
.settings-dot__name { position: static; transform: none; color: inherit; font-size: 12px; }
@media (hover: hover) {
  .settings-dot:hover, .settings-dot:focus-visible { transform: translate(-50%, -50%) scale(1.05); border-color: #9ab0a1; box-shadow: 0 8px 22px #14231f1f; }
}
.settings-map__legend i { display: inline-block; width: 12px; height: 12px; margin: 0 4px 0 8px; border: 1px solid; border-radius: 50%; vertical-align: middle; }
.settings-map { height: 320px; }

/* Панель діагностики: вступ, картка now-card, команда в рамці з копіюванням, дії. */
.diag-lead { margin: 0 0 6px; max-width: 900px; }
.diagnostic-items { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.diagnostic-item { padding: 14px 16px; border-left-width: 1px; border-radius: 14px; }
.diagnostic-item--error { border-color: #e0c3bc; background: #fdf7f5; }
.diagnostic-item--warning { border-color: #e6d9bb; background: #fdfaf2; }
.diagnostic-item--info { border-color: #d4dfd6; background: #f7faf6; }
.diagnostic-item__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.diagnostic-item__head .status { padding: 4px 8px; font-size: 9.5px; }
.diagnostic-item__head strong { font-size: 14px; }
.diagnostic-item p { margin: 0 0 10px; }
.diagnostic-fix { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #eae5da; border-radius: 10px; background: #f8f5ed; }
.diagnostic-fix code { flex: 1; min-width: 0; font-size: 11px; color: #45564c; word-break: break-all; white-space: normal; }
.sys-copy { width: 26px; height: 26px; flex: 0 0 auto; border: 1px solid #ded8cb; border-radius: 8px; background: #fffdf8; color: #7b877f; cursor: pointer; }
.sys-copy:hover { border-color: #b79162; color: #7c5a26; }
.diagnostic-item small { margin-top: 8px; }
.diagnostic-item__actions { margin-top: 10px; }

/* Вузькі екрани: карта вища, плашки читаються (підписи не ховаються), менший шрифт. */
@media (max-width: 720px) {
  .settings-map { height: 440px; }
  .settings-dot__name { display: inline; font-size: 11px; }
  .settings-dot { padding: 5px 9px; }
  .settings-map__corner { font-size: 9px; max-width: 40%; white-space: normal; }
}
.dn-quick--incident dd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dn-quick--incident small { flex-basis: 100%; color: #7c887f; font-size: 11px; }
.dn-incident__manual { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; }

/* «Задачник» (PAI-TASKIO-001 §9) — системный модуль. Плотность строки взята
   из макета архитектора: одна строка на задачу, мета моноширинным, чип и
   кнопки в одну линию справа. Панель-карточка на задачу не используется:
   в неё помещалось вдвое меньше задач. */
.taskbook-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line, #dfe3e8); margin-bottom: 14px; }
.taskbook-tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 13px; font: inherit; font-size: 13px; color: var(--muted, #5f6672); cursor: pointer; border-radius: 6px 6px 0 0; }
.taskbook-tab.is-active { color: inherit; border-bottom-color: var(--accent, #2f6f4f); font-weight: 600; }
.taskbook-tab:focus-visible { outline: 2px solid var(--accent, #2f6f4f); outline-offset: -2px; }

.taskbook-lead { color: var(--muted, #5f6672); font-size: 13px; max-width: 78ch; margin: 0 0 14px; }
.taskbook-message { margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft, #fdf3e0); font-size: 13px; }
.taskbook-notice { font-size: 13px; }
.taskbook-notice--error { border-left: 3px solid var(--err, #8c2f2f); }

.taskbook-target { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 11px 13px; }
.taskbook-target h3 { margin: 0; font-size: 14px; }
.taskbook-target__facts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 3px 0 0; font-size: 12.5px; color: var(--muted, #5f6672); }
.taskbook-target__switch { display: flex; gap: 6px; align-items: center; font-size: 12.5px; }

.taskbook-group { margin-bottom: 20px; }
.taskbook-group h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 7px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted, #5f6672); font-weight: 600; }
.taskbook-group h3 code, .taskbook-group h3 span { font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.taskbook-rows { list-style: none; margin: 0; padding: 0; }

/* Строка задачи — та самая плотность макета: 11px по вертикали, без тени. */
.taskbook-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  border: 1px solid var(--line, #dfe3e8); border-radius: 8px; padding: 11px 13px; margin-bottom: 7px;
  background: var(--panel, #fff); }
.taskbook-row__body { min-width: 0; }
.taskbook-row__body strong { font-weight: 600; }
.taskbook-row__meta { margin: 2px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; color: var(--muted, #5f6672); overflow-wrap: anywhere; }
.taskbook-row__actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.taskbook-link { appearance: none; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left; }
.taskbook-link:hover { text-decoration: underline; }

/* Чип состояния: точка + слово, как в макете. Пилюли с прочерком не бывает —
   непроверенное состояние называется словами. */
.taskbook-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 8px;
  border-radius: 99px; border: 1px solid var(--line, #dfe3e8); color: var(--muted, #5f6672); white-space: nowrap; }
.taskbook-chip i { width: 6px; height: 6px; border-radius: 99px; background: currentColor; flex: none; }
.taskbook-chip--verified { background: var(--accent-soft, #e8f1ec); color: var(--accent, #2f6f4f); border-color: transparent; }
.taskbook-chip--planned { background: var(--warn-soft, #fdf3e0); color: var(--warn, #8a5a00); border-color: transparent; }
.taskbook-chip--conflict { background: var(--err-soft, #fbecec); color: var(--err, #8c2f2f); border-color: transparent; }
.taskbook-chip--reported { background: var(--info-soft, #e9f0f7); color: var(--info, #2a5580); border-color: transparent; }

.taskbook-action { appearance: none; font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 7px;
  border: 1px solid var(--line, #dfe3e8); background: transparent; color: inherit; cursor: pointer; }
.taskbook-action--primary { background: var(--accent, #2f6f4f); border-color: var(--accent, #2f6f4f); color: #fff; font-weight: 600; }
.taskbook-action:disabled { opacity: .45; cursor: not-allowed; }

.taskbook-card__states, .taskbook-card__capabilities { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.taskbook-card__states dt, .taskbook-card__capabilities dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #5f6672); }
.taskbook-card__code { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; }
.taskbook-card__actions { display: flex; gap: 8px; margin-top: 14px; }
.taskbook-bindings { list-style: none; margin: 0; padding: 0; }
.taskbook-bindings li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 5px 0; font-size: 13px; }

.taskbook-tablewrap { overflow-x: auto; }
.taskbook-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.taskbook-table th, .taskbook-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line, #dfe3e8); vertical-align: top; }
.taskbook-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #5f6672); }
.taskbook-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.taskbook-log__row { cursor: pointer; }

.taskbook-run__head h2 { margin: 0 0 2px; font-size: 16px; }
.taskbook-run__head p { margin: 0; font-size: 12.5px; color: var(--muted, #5f6672); }
.taskbook-run__columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.taskbook-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13px; }
.taskbook-facts dt { color: var(--muted, #5f6672); }
.taskbook-facts dd { margin: 0; }
.taskbook-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line, #dfe3e8); }
.taskbook-timeline li { padding: 0 0 11px 12px; font-size: 12.5px; }
.taskbook-timeline p { margin: 2px 0 0; color: var(--muted, #5f6672); }
.taskbook-warnings { margin: 10px 0; padding-left: 18px; font-size: 13px; }
.taskbook-hint { color: var(--muted, #5f6672); font-size: 12.5px; }
.taskbook-warn { border-left: 3px solid var(--warn, #8a5a00); background: var(--warn-soft, #fdf3e0); padding: 10px 12px; border-radius: 0 8px 8px 0; font-size: 12.5px; }
.taskbook-conflicts { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }

@media (max-width: 560px) {
  .taskbook-row { grid-template-columns: 1fr; }
  .taskbook-row__actions { justify-content: flex-start; }
}
/* Пульт (PAI-TASKIO-001 §13). Четыре состояния прибора и четвёртое — не
   декорация: «немає показань» рисуется штриховой шкалой и серым, никогда не
   зелёным и никогда пустым местом. */
.kpi-bridge-entry { margin: -6px 0 14px; }
/* §15/§16 DQ-221: лента «Сьогодні» на главном экране. */
.kpi-feed { margin: 0 0 22px; }
.kpi-feed__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.kpi-feed__item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 15px; }
.kpi-feed__item .status { flex-shrink: 0; }
.kpi-feed__body { flex: 1; min-width: 0; }
.kpi-feed__entry-title { margin: 0; font-weight: 600; color: var(--ink); }
.kpi-feed__body .hint { margin: 2px 0 0; }
.kpi-feed__item .link-button { flex-shrink: 0; }
/* §16 DQ-224: типизированные окна модулей на карточках KPI. */
.kpi-window { margin: 14px 0 4px; }
.kpi-window--bars { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.kpi-window-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.kpi-window-bar span { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: #c8902f; }
.kpi-window--meter .kpi-window-meter { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--line); }
.kpi-window-meter__segment { display: block; height: 100%; background: #c8902f; }
.kpi-window-meter__segment--1 { opacity: .78; }
.kpi-window-meter__segment--2 { opacity: .56; }
.kpi-window-meter__segment--3 { opacity: .34; }
.kpi-window--rows { display: grid; gap: 4px; margin: 14px 0 4px; padding: 0; list-style: none; }
.kpi-window--rows li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #657269; }
.kpi-window--rows li b { color: var(--ink); font-weight: 600; }
.kpi-window--stale { color: #6b7076; }
/* §15 DQ-227: перенос статистики модулей в отдельный блок, задачи и
   коллаж эффективності на освободившемся месте главного экрана. */
.kpi-section-head { display: flex; align-items: baseline; gap: 11px; margin-bottom: 12px; flex-wrap: wrap; }
.kpi-section-head h3 { margin: 0; }
.kpi-section-head .link-button { margin-left: auto; }
.kpi-tasks { margin: 0 0 22px; }
.kpi-tasks__rail { display: flex; gap: 13px; overflow-x: auto; padding-bottom: 6px; }
.kpi-tasks__rail .gallery-card { flex: 0 0 260px; }
/* DQ-649 (G-23/G-24): плитка «Управління сховищем» — первая на KPI.
   Только токены оболочки: палитра заморожена (DQ-614). */
.kpi-storage { display: grid; gap: 14px; margin: 0 0 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--cream); }
.kpi-storage--empty { border-style: dashed; }
.kpi-storage .kpi-section-head { margin: 0; }
.kpi-storage__total { display: grid; gap: 6px; }
.kpi-storage__bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.kpi-storage__fill { display: block; height: 100%; background: var(--pine); }
.kpi-storage__fill--warn { background: var(--amber); }
.kpi-storage__fill--bad { background: var(--attention-block-ink); }
.kpi-storage__places { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kpi-storage__place { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.kpi-storage__place-title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.kpi-storage__place .kpi-storage__bar, .kpi-storage__meta { grid-column: 1 / -1; }
.kpi-storage__place .kpi-storage__bar { height: 6px; }
.kpi-storage__kind { display: inline-flex; align-items: center; gap: 4px; }
.kpi-storage__kind .lucide-icon { width: 14px; height: 14px; flex: none; }
.kpi-storage__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kpi-efficiency { margin: 0 0 22px; }
.kpi-efficiency .collage { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 13px; }
.kpi-efficiency__block { border: 1px solid var(--line); background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; border-radius: 18px; padding: 18px 20px; }
.kpi-efficiency-meter { display: flex; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 12px 0 8px; }
.kpi-efficiency-meter__segment { display: block; height: 100%; }
.kpi-efficiency-meter__segment--succeeded { background: #3f7d5c; }
.kpi-efficiency-meter__segment--warning { background: #b8842c; }
.kpi-efficiency-meter__segment--alarm { background: #a8483c; }
.kpi-efficiency-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-size: 12px; color: #718078; }
.kpi-efficiency-legend li { display: flex; align-items: center; gap: 6px; }
.kpi-efficiency-legend__dot { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.kpi-efficiency-legend__dot--succeeded { background: #3f7d5c; }
.kpi-efficiency-legend__dot--warning { background: #b8842c; }
.kpi-efficiency-legend__dot--alarm { background: #a8483c; }
.kpi-module-windows { margin: 0 0 22px; }
.kpi-module-windows .collage { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 13px; }
.kpi-module-window-tile { border: 1px solid var(--line); background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; border-radius: 18px; padding: 16px 18px; }
.kpi-module-window-tile__cap { display: flex; flex-direction: column; gap: 2px; font-weight: 600; margin-bottom: 4px; }
.kpi-module-summary { margin: 0 0 10px; }
.kpi-module-summary__counts { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-end; padding-bottom: 13px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.kpi-module-summary__counts strong { display: block; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.kpi-module-summary__counts span { font-size: 12px; color: #718078; margin-top: 4px; }
.strip-label { margin: 20px 0 8px; color: var(--muted, #5f6672); font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.bridge-fleet { display: flex; flex-wrap: wrap; gap: 10px; }
.bridge-ship { display: grid; gap: 3px; min-width: 190px; padding: 11px 14px; border: 1px solid var(--line, #d9d3c7); border-left-width: 4px; border-radius: 12px; background: var(--cream, #f6f3eb); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.bridge-ship.is-selected { box-shadow: 0 0 0 2px var(--amber, #f1b76d); }
.bridge-ship--good { border-left-color: #3f7d5c; }
.bridge-ship--warning { border-left-color: #b8842c; }
.bridge-ship--alarm { border-left-color: #a8483c; }
.bridge-ship--no_reading { border-left-color: #9aa0a6; }
.bridge-ship__name { font-weight: 700; font-size: 14px; }
.bridge-ship__link, .bridge-ship__counts { color: var(--muted, #5f6672); font-size: 12px; }

.bridge-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bridge-gauge { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line, #d9d3c7); border-top-width: 3px; border-radius: 14px; background: var(--cream, #f6f3eb); }
.bridge-gauge header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bridge-gauge h4 { margin: 0; font-size: 14px; }
.bridge-gauge__state { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bridge-gauge__value { font-size: 26px; font-weight: 750; letter-spacing: -.03em; }
.bridge-gauge--good { border-top-color: #3f7d5c; }
.bridge-gauge--good .bridge-gauge__state { color: #3f7d5c; }
.bridge-gauge--warning { border-top-color: #b8842c; }
.bridge-gauge--warning .bridge-gauge__state { color: #8a5a00; }
.bridge-gauge--alarm { border-top-color: #a8483c; }
.bridge-gauge--alarm .bridge-gauge__state { color: #a8483c; }
.bridge-gauge--no_reading { border-top-color: #9aa0a6; }
.bridge-gauge--no_reading .bridge-gauge__state { color: #6b7076; }
.bridge-gauge--no_reading .bridge-gauge__value { color: #6b7076; font-size: 19px; font-weight: 650; }
.bridge-gauge__scale { height: 6px; overflow: hidden; border-radius: 999px; background: #00000010; }
.bridge-gauge__scale i { display: block; height: 100%; border-radius: inherit; background: currentColor; }
.bridge-gauge--good .bridge-gauge__scale i { background: #3f7d5c; }
.bridge-gauge--warning .bridge-gauge__scale i { background: #b8842c; }
.bridge-gauge--alarm .bridge-gauge__scale i { background: #a8483c; }
/* Показания нет — шкала штриховая и пустая: доля без числа читалась бы как
   маленькое, но настоящее значение. */
.bridge-gauge__scale--empty { background: repeating-linear-gradient(135deg, #00000012 0 6px, transparent 6px 12px); }
.bridge-gauge__norm, .bridge-gauge__explain, .bridge-gauge__reason, .bridge-gauge__stale { margin: 0; color: var(--muted, #5f6672); font-size: 12.5px; }
.bridge-gauge__stale { color: #8a5a00; }
.bridge-gauge__reason { font-weight: 600; }
.bridge-gauge__tech { margin: 2px 0 0; font-size: 11.5px; color: var(--muted, #5f6672); overflow-wrap: anywhere; }
.bridge-gauge__levers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.bridge-lever { padding: 7px 12px; border: 1px solid var(--line, #d9d3c7); border-radius: 10px; background: #ffffff9c; font: inherit; font-size: 12.5px; color: inherit; cursor: pointer; }
.bridge-lever:hover { border-color: var(--amber, #f1b76d); }
.bridge-lever--paused, .bridge-lever--unknown { color: var(--muted, #5f6672); background: transparent; cursor: default; }
.bridge-rejected { margin-top: 12px; }

@media (max-width: 560px) {
  .bridge-panel { grid-template-columns: 1fr; }
  .bridge-ship { min-width: 0; width: 100%; }
}

/* ТЗ-01 Т4.1: имя точки на карте настроек не зависит от мыши. */
@media (pointer: coarse) {
  .settings-dot--crowded .settings-dot__name {
    display: block;
    z-index: 6;
    padding: 1px 6px;
    border-radius: 6px;
    background: #fff;
  }
}

/* ============================================================
   ТЗ-01 · Тач-базис. Блок стоит ПОСЛЕДНИМ в файле сознательно:
   пять существующих селекторов полей имеют более высокую
   специфичность (.monitoring-edit__field input и другие, 12-14px),
   и общее правило `input { font-size: 16px }` они молча перекрыли
   бы. Поэтому они перечислены явно — приёмка проверяет фактический
   вычисленный кегль, а не наличие блока.
   Всё внутри действует только под грубым указателем: десктопные
   кегли, тап-цели и плотность панелей не меняются.
   ============================================================ */
@media (pointer: coarse) {
  /* DQ-649: кнопка плитки сховища — тап-цель 44px. */
  .kpi-storage__foot .primary { min-height: 44px; }
  /* DQ-526: кнопка «показати пароль» — тап-цель 44px. */
  .password-field .password-reveal { width: 44px; min-height: 44px; top: 50%; bottom: auto; transform: translateY(-50%); }
  /* DQ-562: «Забули пароль?» — под полем, а не поверх него и кнопки «показати»;
     клавиша F1 на касании не нужна. */
  .brama-password-row { display: flex; flex-direction: column; }
  .brama-forgot { position: relative; top: auto; right: auto; align-self: flex-end; margin-top: 12px; }
  .brama-kbd { display: none; }
  /* Т2. Кегль полей. iOS Safari при фокусе в поле с кеглем меньше
     16px увеличивает страницу и обратно её не возвращает. */
  input,
  textarea,
  select,
  .monitoring-edit__field input,
  .monitoring-edit__field select,
  .developments-form__fields input,
  .developments-form__fields textarea,
  .developments-form__fields select,
  .intake-form input[type="text"],
  .intake-form textarea,
  .intake-form select,
  .dn-confirm__input input,
  .intake-candidate input[name^="reason:"] {
    font-size: 16px;
  }

  /* Т3. Тап-цель 44x44 CSS-px. Увеличение идёт через min-height и
     отступы, а не через кегль: кегль — это десктопная шкала, её
     трогать запрещено. */
  /* DQ-335: ссылки-кнопки «Брами» («Реєстрація», «Забули пароль?»)
     визуально мелкие по смыслу — тап-цель растит прозрачный
     псевдоэлемент, видимый размер не меняется. */
  .brama-link::after { position: absolute; inset: -14px -10px; content: ""; }

  button,
  .table-action,
  .breadcrumbs button,
  .diagnostic-window-actions button,
  .diagnostic-error-detail > header button,
  .start-path li button,
  .shell-debug-viewport-toggle button,
  .sidebar nav a,
  .module-tabs button {
    min-height: 44px;
    min-width: 44px;
  }

  /* Точки карт мелкие по смыслу: видимый размер сохраняется, палец
     попадает по прозрачному расширению. */
  .monitoring-dot,
  .settings-dot {
    position: relative;
  }

  .monitoring-dot::after,
  .settings-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }

  /* Т6. Отклик на касание. tap-highlight убирается ТОЛЬКО вместе с
     видимым :active — иначе нажатие перестаёт подтверждаться вовсе,
     и это условие, а не рекомендация. */
  button,
  a,
  .table-action,
  [data-action],
  input[type="checkbox"],
  input[type="radio"],
  label {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  button:active,
  a:active,
  .table-action:active,
  [data-action]:active,
  label:active {
    opacity: .72;
  }

  /* Прокрутка внутри панели не утягивает страницу за собой. */
  .diagnostic-panel,
  .palette-list,
  .dn-sheet,
  .help-panel,
  .topic-help-panel,
  .about-dialog,
  .modal-backdrop,
  .dn-backdrop {
    overscroll-behavior: contain;
  }
}

/* Т7. Экранная клавиатура. env(safe-area-inset-bottom) знает про вырез,
   но не про клавиатуру: переменная выставляется оболочкой из
   visualViewport и по умолчанию равна нулю, поэтому на desktop и без
   поддержки ничего не меняется. */
:root {
  --viewport-bottom: 0px;
}

.sidebar,
.assistant-dock,
.diagnostic-dock,
.module-builder-create-dock,
.assistant-form {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--viewport-bottom, 0px));
}

/* DQ-260: то же правило выше без условия перебивало родной нижний отступ
   .sidebar (20px из базового правила, ui/core/src/styles.css:60) нулём
   на десктопе, где env()/--viewport-bottom равны 0 — карточка диагностики
   «Web» (низ рейки) вплотную прижималась к краю окна. На ≤720px .sidebar
   позиционируется fixed со своим отступом (строка 762), а .diagnostic-dock
   там тоже fixed с собственным bottom — эта правка их не касается. */
@media (min-width: 721px) {
  .sidebar { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px) + var(--viewport-bottom, 0px)); }
}

/* ============================================================
   DQ-161 · Панель копий вопросов. Первая редакция была таблицей
   БЕЗ единого правила стиля: длинные идентификаторы вытесняли
   колонки, действия прижимались к краю, кнопка уборки висела под
   таблицей. Здесь список строк вместо таблицы — так имя вопроса
   не соревнуется за ширину с веткой и портом.
   Ни одного нового цвета и размера: палитра (499) и шкала кеглей
   (33) заморожены проверками ТЗ-01, взяты существующие.
   ============================================================ */
.worktrees__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.worktrees__head h3 { margin: 0 0 4px; }

.worktrees__hint {
  margin: 0;
  max-width: 68ch;
  color: #657269;
  font-size: 13px;
  line-height: 1.5;
}

.worktrees__cleanup { flex: 0 0 auto; }

.worktrees__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.worktrees__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
}

/* Закрытый вопрос виден сразу, но не кричит: приглушённая рамка,
   а не другой цвет фона. */
.worktrees__item--closed { border-style: dashed; }

.worktrees__about { min-width: 0; }

.worktrees__name {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worktrees__name b { letter-spacing: .02em; }

.worktrees__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #657269;
  font-size: 12px;
}

.worktrees__state { display: inline-flex; align-items: center; gap: 5px; }

.worktrees__state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.worktrees__state--live { color: #2f6f4f; }
.worktrees__state--closed { color: #7c887f; }

/* Порт — способ открыть копию, а не справочное число. */
.worktrees__port {
  font-family: var(--mono, ui-monospace, monospace);
  color: #2f6f4f;
}

.worktrees__port--gone {
  color: #7c887f;
  text-decoration: line-through;
}

.worktrees__action { flex: 0 0 auto; }

.worktrees__empty {
  margin: 0;
  color: #657269;
  font-size: 13px;
}

.worktrees__note {
  margin: 12px 0 0;
  font-size: 13px;
}

.worktrees__note--ok { color: #2f6f4f; }
.worktrees__note--error { color: #a54137; }
.worktrees__note--muted { color: #657269; }

@media (max-width: 720px) {
  .worktrees__head { flex-direction: column; }
  .worktrees__item { flex-direction: column; align-items: stretch; }
  .worktrees__name { white-space: normal; }
}

/* DQ-162: сделанное в вопросе — приглушённая справка рядом с состоянием,
   а не колонка цифр. «Ещё ничего» показывается иначе, чтобы отличалось
   от «сделано столько-то». */
.worktrees__done { color: #657269; }
.worktrees__done--idle { color: #7c887f; font-style: italic; }

/* DQ-163: панель прижималась к следующему блоку — «Карта» начиналась
   вплотную к её нижней границе. */
.worktrees { margin-bottom: 18px; }

/* Кнопка, которая удаляет, не должна выглядеть как обычное действие: она
   снимает копию вместе с веткой, и несведённая работа пропадает. */
.worktrees__action--danger { border-color: #bd584d; color: #a54137; }
.worktrees__action--danger:hover { background: #bd584d2b; }

.worktrees__risk { color: #a54137; }
.worktrees__safe { color: #7c887f; }

/* DQ-164: у копии с работой два выхода, и безопасный стоит первым. */
.worktrees__actions { display: flex; flex: 0 0 auto; gap: 8px; }

/* ── §14: витрина задач и мастер ── */
.gallery-filters { display: grid; gap: 8px; margin-bottom: 14px; }
.gallery-search { max-width: 360px; padding: 8px 12px; border: 1px solid #cfd5c9; border-radius: 10px; background: #fff; font: inherit; }
.gallery-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.gallery-card { display: grid; gap: 6px; align-content: start; }
.gallery-card--attention { border-color: var(--amber, #f1b76d); }
.gallery-card__head { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.gallery-card__axis { padding: 1px 8px; border: 1px solid #dfe2d6; border-radius: 999px; color: #6b786f; }
.gallery-card__state { padding: 1px 8px; border-radius: 999px; }
.gallery-card__state.is-ready { background: #dfeadf; color: #35633e; }
.gallery-card__state.is-confirm { background: #fbeccc; color: #8a5a11; }
.gallery-card__state.is-blocked { background: #f3ded7; color: #7c3826; }
.gallery-card h3 { margin: 4px 0 0; font-size: 16px; }
.gallery-card__summary, .gallery-card__purpose, .gallery-card__target { margin: 0; color: #5a675f; font-size: 13px; }
.gallery-card__last { margin: 0; font-size: 12px; color: #3b5f3e; }
.gallery-card__last.is-failed { color: #7c3826; }
.gallery-card__foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.gallery-card__open { padding: 7px 14px; border: 1px solid var(--pine); border-radius: 9px; background: var(--pine); color: #f7f3e8; font-weight: 600; cursor: pointer; }
.gallery-card__foot small { color: #8a5a11; font-size: 11px; }
.gallery-wizard { display: grid; gap: 10px; margin-bottom: 16px; border-color: var(--pine); }
.gallery-wizard__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.gallery-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: step; font-size: 12px; }
.gallery-steps li { padding: 3px 10px; border: 1px solid #dfe2d6; border-radius: 999px; color: #6b786f; }
.gallery-steps li.is-current { border-color: var(--pine); color: var(--pine); font-weight: 600; }
.gallery-steps li.is-done { background: #dfeadf; color: #35633e; }
.gallery-checks { display: grid; gap: 4px; margin: 0; padding-left: 18px; font-size: 13px; }
.gallery-checks li.is-ok { color: #35633e; }
.gallery-checks li.is-bad { color: #7c3826; }
.gallery-wizard__verdict.is-ok { color: #35633e; }
.gallery-wizard__verdict.is-bad { color: #7c3826; font-weight: 600; }
.gallery-wizard__consequence { padding: 10px 12px; border: 1px solid var(--amber, #f1b76d); border-radius: 10px; background: #fff8e8; }
.gallery-wizard__result.is-ok { color: #35633e; font-weight: 600; }
.gallery-wizard__result.is-bad { color: #7c3826; }
.gallery-wizard__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-wizard__actions button { padding: 7px 14px; border: 1px solid #cfd5c9; border-radius: 9px; background: #fff; font: inherit; cursor: pointer; }
.gallery-wizard__actions button.primary { border-color: var(--pine); background: var(--pine); color: #f7f3e8; font-weight: 600; }
.gallery-wizard__actions button[disabled] { opacity: .6; cursor: wait; }

/* ── Мониторинг · вкладка «Схема» (DQ-180) ───────────────────────────────────
   Цвета берутся из той же палитры, что и карта очереди: живое — зелёное
   (--mon-ai), объявленное без реализации — охра (--mon-arch), запланированное
   — фиолетовое (--mon-permit), отсутствующий путь — красный. Человек на
   схеме — синий (--mon-field): он не часть кода, и это должно быть видно
   без чтения подписи. */
.monitoring-view--scheme { --scheme-live: #1c6b58; --scheme-live-bg: #dfede8; --scheme-warn: #a85c1b; --scheme-warn-bg: #f7eadc; --scheme-plan: #6b3f8c; --scheme-plan-bg: #ede4f3; --scheme-absent: #a4483c; --scheme-person: #3a5a94; --scheme-person-bg: #e1e8f3; --scheme-muted: #637168; --scheme-faint: #8c949c; --scheme-surface: #fffdf8; --scheme-surface-2: #f7f4ec; }

.scheme-zoomline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; font-size: 13px; }
.scheme-zoomline button { padding: 3px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--scheme-muted); background: none; font: inherit; font-size: 13px; }
.scheme-zoomline button:hover { color: var(--ink); background: var(--scheme-surface-2); }
.scheme-zoomline button.is-focus { border-color: var(--scheme-live); color: var(--scheme-live); background: var(--scheme-live-bg); font-weight: 700; }
.scheme-zoomline i { color: var(--scheme-faint); font-style: normal; }
.scheme-zoomline__hint { margin-left: auto; color: var(--scheme-faint); font-size: 12px; }

/* Три колонки: откуда пришли · на что смотрим · рядом. На узком экране
   колонки складываются в столбец — единственный режим, где схемы идут
   друг за другом. */
.scheme-workspace { display: grid; align-items: start; gap: 16px; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr) minmax(260px, 330px); }
.scheme-workspace.is-split { grid-template-columns: minmax(230px, 300px) minmax(0, 1fr) minmax(0, 1fr); }
.scheme-workspace.no-origin { grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); }
.scheme-workspace.no-origin.is-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.scheme-workspace.no-rail { grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); }
.scheme-workspace.no-origin.no-rail { grid-template-columns: minmax(0, 1fr); }
.scheme-rail { display: flex; flex-direction: column; gap: 12px; }

.scheme-card { padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8d9; box-shadow: 0 14px 36px #3040380b; }
.scheme-card--focus { padding: 18px 20px 20px; }
.scheme-card--mini { padding: 10px 12px 12px; opacity: .88; }
.scheme-card--mini:hover { opacity: 1; }
.scheme-card__head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.scheme-card__role { margin: 0; color: var(--scheme-faint); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.scheme-card__title { margin: 1px 0 0; font-size: 15px; }
.scheme-card--focus .scheme-card__title { font-size: 19px; }
.scheme-card__question { margin: 2px 0 0; color: var(--scheme-muted); font-size: 13px; }
.scheme-card--mini .scheme-card__question, .scheme-card--mini .scheme-card__src { display: none; }
.scheme-card__src { margin: 6px 0 8px; color: var(--scheme-faint); font-size: 11px; }
.scheme-card__acts { display: flex; flex-wrap: wrap; gap: 5px; }
.scheme-card__acts button { padding: 2px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--scheme-surface-2); font: inherit; font-size: 12px; white-space: nowrap; }
.scheme-card__acts button:hover { border-color: var(--scheme-live); }

.scheme-map { display: block; width: 100%; height: auto; }
.scheme-map text { font-family: inherit; }
.scheme-map .scheme-name { fill: var(--ink); font-size: 13px; font-weight: 700; }
.scheme-map .scheme-type { fill: var(--scheme-faint); font-size: 9.5px; letter-spacing: .03em; }
.scheme-map .scheme-desc { fill: var(--scheme-muted); font-size: 11px; }
.scheme-map .scheme-meas { fill: var(--scheme-live); font-size: 10px; }
.scheme-map .scheme-drill { fill: var(--scheme-live); font-size: 11px; }
.scheme-map .scheme-node { cursor: pointer; }
.scheme-map .scheme-box { fill: var(--scheme-surface-2); stroke: var(--line); stroke-width: 1.4; }
.scheme-map .scheme-node:hover .scheme-box, .scheme-map .scheme-node:focus-visible .scheme-box { stroke: var(--scheme-live); }
.scheme-map .scheme-node:focus-visible { outline: none; }
.scheme-map .scheme-node.is-open .scheme-box { stroke: var(--scheme-live); stroke-width: 2.4; fill: var(--scheme-live-bg); }
.scheme-map .scheme-node--person .scheme-box { fill: var(--scheme-person-bg); stroke: var(--scheme-person); }
.scheme-map .scheme-node--store .scheme-box { fill: var(--scheme-surface); }
.scheme-map .scheme-node.is-described .scheme-box { fill: var(--scheme-warn-bg); stroke: var(--scheme-warn); stroke-dasharray: 6 3; }
.scheme-map .scheme-node.is-described .scheme-meas { fill: var(--scheme-warn); }
.scheme-map .scheme-node.is-planned .scheme-box { fill: var(--scheme-plan-bg); stroke: var(--scheme-plan); stroke-dasharray: 2 4; }
.scheme-map .scheme-node.is-planned .scheme-name, .scheme-map .scheme-node.is-planned .scheme-meas { fill: var(--scheme-plan); }
.scheme-map .scheme-edge { fill: none; stroke: var(--scheme-muted); color: var(--scheme-muted); stroke-width: 1.4; }
.scheme-map .scheme-edge--absent { stroke: var(--scheme-absent); color: var(--scheme-absent); stroke-dasharray: 3 5; }
.scheme-map .scheme-edge--plan { stroke: var(--scheme-plan); color: var(--scheme-plan); stroke-dasharray: 2 4; }
.scheme-map .scheme-enum { font-size: 9.5px; font-weight: 700; }
.scheme-map .scheme-enum--live { fill: var(--scheme-live); }
.scheme-map .scheme-enum--absent { fill: var(--scheme-absent); }
.scheme-map .scheme-enum--plan { fill: var(--scheme-plan); }
.scheme-map .scheme-enum-bg { fill: var(--scheme-surface); stroke-width: 1; }
.scheme-map .scheme-enum-bg--live { stroke: var(--scheme-live); }
.scheme-map .scheme-enum-bg--absent { stroke: var(--scheme-absent); }
.scheme-map .scheme-enum-bg--plan { stroke: var(--scheme-plan); }
.scheme-map .scheme-shelf { fill: var(--scheme-surface); stroke: var(--line); stroke-dasharray: 4 4; }
.scheme-map .scheme-shelf-text { fill: var(--scheme-faint); font-size: 9.5px; letter-spacing: .04em; }
.scheme-map .scheme-frame { fill: none; stroke: var(--line); stroke-dasharray: 5 4; }
.scheme-map .scheme-frame-label { fill: var(--scheme-faint); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }

/* Полные подписи связей: на полотне стоит только номер. */
.scheme-rels { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 4px 22px; margin: 12px 0 0; padding: 0; color: var(--scheme-muted); font-size: 12px; list-style: none; }
.scheme-rel { display: flex; align-items: baseline; gap: 8px; }
.scheme-rel b { flex: 0 0 auto; color: var(--scheme-live); font-variant-numeric: tabular-nums; }
.scheme-rel i { color: var(--ink); font-style: normal; }
.scheme-rel--absent, .scheme-rel--absent b, .scheme-rel--absent i { color: var(--scheme-absent); }
.scheme-rel--plan, .scheme-rel--plan b, .scheme-rel--plan i { color: var(--scheme-plan); }

.scheme-keys { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--scheme-muted); font-size: 12px; }
.scheme-keys b { color: var(--ink); }
.scheme-key { display: inline-flex; align-items: center; gap: 6px; }
.scheme-key em { width: 16px; height: 11px; display: inline-block; border: 1.4px solid var(--line); border-radius: 3px; background: var(--scheme-surface-2); font-style: normal; }
.scheme-key--person em { border-color: var(--scheme-person); background: var(--scheme-person-bg); }
.scheme-key--described em { border-color: var(--scheme-warn); border-style: dashed; background: var(--scheme-warn-bg); }
.scheme-key--planned em { border-color: var(--scheme-plan); border-style: dotted; background: var(--scheme-plan-bg); }
.scheme-key--absent em { width: 18px; height: 0; border: none; border-top: 2px dashed var(--scheme-absent); background: none; }

.scheme-underbar { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 18px; min-height: 92px; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf8d9; }
.scheme-underbar__main { flex: 1 1 520px; min-width: 0; }
.scheme-underbar__state { margin: 0 0 3px; color: var(--scheme-faint); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.scheme-underbar__title { margin: 0; font-size: 16px; font-weight: 700; }
.scheme-underbar__type { margin: 2px 0 6px; color: var(--scheme-muted); font-size: 12px; }
.scheme-underbar__text { max-width: 100ch; margin: 0; color: var(--scheme-muted); font-size: 13px; line-height: 1.65; }
.scheme-underbar__src { margin: 7px 0 0; color: var(--scheme-faint); font-size: 11.5px; }
.scheme-underbar__acts { display: flex; flex-wrap: wrap; gap: 8px; align-self: center; }
.scheme-noreading { max-width: 100ch; margin: 9px 0 0; padding: 9px 11px; border: 1px solid var(--scheme-warn); border-radius: 10px; background: var(--scheme-warn-bg); color: var(--ink); font-size: 12.5px; }
.scheme-btn { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--scheme-surface-2); font: inherit; font-size: 13px; }
.scheme-btn:hover:not(:disabled) { border-color: var(--scheme-live); }
.scheme-btn:disabled { opacity: .4; cursor: default; }
.scheme-btn--primary { border-color: var(--scheme-live); color: #fff; background: var(--scheme-live); }
.scheme-btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
.scheme-noreading b { margin-right: 6px; color: var(--scheme-warn); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

.monitoring-equipment-note { max-width: 900px; margin: 14px 0 0; color: #637168; font-size: 13px; line-height: 1.65; }

@media (max-width: 1200px) {
  .scheme-workspace, .scheme-workspace.is-split, .scheme-workspace.no-origin, .scheme-workspace.no-origin.is-split, .scheme-workspace.no-rail { grid-template-columns: 1fr; }
  .scheme-zoomline__hint { margin-left: 0; flex-basis: 100%; }
}

/* ── Мониторинг · хелп глоссария и публичный уровень схемы (DQ-181) ───────── */
.scheme-closed-note { max-width: 900px; margin: 14px 0 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: #f7f4ec; color: #637168; font-size: 13px; line-height: 1.6; }

.help-panel { position: fixed; top: 0; right: 0; z-index: var(--layer-info-window); width: min(680px, 100%); height: 100vh; height: 100dvh; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--cream); box-shadow: -18px 0 48px #3040380b; }
.help-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.help-panel__head h3 { margin: 1px 0 0; font-size: 20px; }
.help-panel__src { margin: 12px 20px 0; color: #8c949c; font-size: 12px; }
.help-panel__note { margin: 8px 20px 12px; color: #637168; font-size: 13px; line-height: 1.6; }
.help-panel__search { padding: 12px 20px; border-bottom: 1px solid var(--line); }
.help-panel__search input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8d9; color: var(--ink); font-size: 16px; }
.help-panel__cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.help-panel__toc { overflow: auto; padding: 12px; border-right: 1px solid var(--line); }
.help-panel__toc h4 { margin: 12px 8px 4px; color: #8c949c; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.help-panel__toc button { width: 100%; padding: 6px 9px; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; font-size: 13px; }
.help-panel__toc button:hover { background: #f7f4ec; }
.help-panel__toc button.is-active { background: #dfede8; color: #1c6b58; font-weight: 700; }
.help-panel__article { overflow: auto; padding: 20px 24px 40px; }
.help-panel__article h3 { margin: 6px 0 12px; font-size: 20px; }
.help-panel__article p { margin: 0 0 11px; color: #637168; font-size: 15px; line-height: 1.7; }
.help-panel__article li { margin: 0 0 6px; color: #637168; font-size: 15px; line-height: 1.7; }
.help-panel__article pre { overflow-x: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f7f4ec; font-size: 13px; }
.help-panel__path { margin: 0; color: #8c949c; font-size: 12px; }
.help-panel__error { margin: 20px 24px; color: #a4483c; font-size: 15px; }
.help-table { width: 100%; margin: 0 0 12px; border-collapse: collapse; font-size: 13px; }
.help-table th, .help-table td { padding: 6px 9px; border: 1px solid var(--line); color: #637168; text-align: left; vertical-align: top; }
.help-table th { background: #f7f4ec; color: var(--ink); }
.help-link { color: #1c6b58; font-style: normal; }

@media (max-width: 760px) {
  .help-panel { width: 100%; }
  .help-panel__cols { grid-template-columns: 1fr; }
  .help-panel__toc { max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* DQ-226: конструктор Production в «Розробки» — карточки реестра, состав, проверки */
.production-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.production-card { display: grid; gap: 8px; min-width: 0; }
.production-card.is-selected { outline: 2px solid #b79162; outline-offset: 2px; }
.production-card--proposal { border-style: dashed; }
.production-card > header, .production-detail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.production-card h3, .production-detail h3 { margin: 0 0 2px; }
.production-chips, .production-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.production-composition { margin: 0; color: #68756d; font-size: 13px; }
.production-count { padding: 2px 8px; border-radius: 999px; background: #ece2d1; font-size: 11px; }
.production-count--error { background: #f2ddd9; color: #8f4237; }
.production-count--warn { background: #f2e6cf; color: #865f2d; }
.production-count--ok { background: #dcebdd; color: #35633e; }
.production-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.production-detail { margin-top: 16px; display: grid; gap: 12px; }
.production-rules { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.production-field { display: grid; gap: 4px; font-size: 12px; color: #68756d; }
.production-field select { min-height: 44px; padding: 6px 10px; }
.production-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; }
.production-columns > * { min-width: 0; }
.production-check p, .production-shelf li { overflow-wrap: anywhere; }
.production-shelf ul, .production-checks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.production-shelf li { line-height: 1.7; }
.production-check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid #e6e1d5; border-radius: 10px; }
.production-check p { margin: 2px 0 0; color: #68756d; font-size: 13px; }
.production-check--error { border-color: #f2ddd9; }
@media (max-width: 900px) { .production-columns { grid-template-columns: minmax(0, 1fr); } }

/* DQ-250: «Переїзд» — опись Родителя, конверты, как принять */
.relocation-code { display: grid; gap: 10px; margin-top: 12px; }
.relocation-dirty { margin: 0; padding-left: 18px; color: #68756d; font-size: 13px; }
.relocation-group ul, .relocation-envelopes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.relocation-item { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid #e6e1d5; border-radius: 10px; overflow-wrap: anywhere; }
.relocation-item span { color: #68756d; font-size: 13px; }
.relocation-item small { color: #68756d; font-size: 12px; }
.relocation-item.is-absent { opacity: .6; }
.relocation-envelope { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.relocation-receive h3 { margin: 0 0 6px; }
.relocation-command { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #ece2d1; overflow-x: auto; font-size: 12px; }

/* DQ-255: редактор состава Production */
.production-composition-editor .production-shelf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.production-domain > b { display: block; margin: 8px 0 4px; color: #68756d; font-size: 12px; }
.production-pick { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; min-height: 44px; padding: 8px 10px; border: 1px solid #e6e1d5; border-radius: 10px; cursor: pointer; overflow-wrap: anywhere; }
.production-pick.is-picked { border-color: #b79162; }
.production-pick input { width: 20px; height: 20px; margin: 2px 0 0; }
.production-pick span { display: grid; gap: 2px; }
.production-pick small { color: #68756d; font-size: 12px; }
.production-dirty { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f2e6cf; color: #865f2d; font-size: 13px; }
.production-dirty__error { color: #8f4237; }

/* DQ-256: цели Production и пакеты */
.production-targets ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.production-target { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.production-target .production-pick { border-color: #e6e1d5; }
.production-target.is-picked .production-pick { border-color: #b79162; }
.production-targets-line { flex-wrap: wrap; }
@media (max-width: 600px) { .production-target { grid-template-columns: minmax(0, 1fr); } }
/* DQ-655: списки конструктора наследовали `.developments-group > ul` (auto-fit по 320px):
   платформы разъезжались в пять колонок, проверки делились на две и уходили за край
   панели. Каждый список конструктора — одна колонка своей ширины. */
.production-detail .developments-group > ul,
.production-targets ul,
.production-checks ul,
.production-shelf ul { grid-template-columns: minmax(0, 1fr); }
.production-domain > ul { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.production-detail { min-width: 0; overflow-wrap: anywhere; }
/* Сетка карточки без явной колонки растягивалась по самой длинной строке — команде
   испытания в <pre>: вся карточка уезжала вправо на полэкрана. Колонка — по ширине панели. */
.production-detail { grid-template-columns: minmax(0, 1fr); }
.production-pick--absent { cursor: default; opacity: .75; border-style: dashed; }
/* DQ-258: состояние рядом с шагом (очередь дозволов упразднена, DQ-581) */
.developments-next__state { display: block; margin-top: 4px; color: #728078; font-size: 11px; }
/* DQ-265: кнопка и её «?» — один неразрывный элемент, переносятся вместе */
.developments-action-unit { display: inline-flex; align-items: center; gap: 4px; flex-wrap: nowrap; white-space: nowrap; }
/* DQ-271: правая колонка шапки карточки — отметки, дата, владелец; запись во всю ширину */
.developments-project__side { display: grid; justify-items: end; gap: 6px; flex: 0 1 auto; min-width: 0; text-align: right; }
.developments-project__side .developments-since { margin: 0; }
.developments-project__owner { margin: 4px 0 0; }
.developments-project__owner dt { color: #7c887f; font-size: 11px; }
.developments-project__owner dd { margin: 3px 0 0; }
.developments-facts--record { grid-template-columns: 1fr; }
/* DQ-273: пункты меню фильтра — слово и число */
.dn-menu__list label small { margin-left: auto; padding-left: 10px; color: #9aa69e; font-size: 11px; }
/* DQ-274: домен и теги в карточке «Розробок» */
.developments-facts--tags { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.developments-facts--tags dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.developments-facts--tags dd.is-missing { color: #9aa69e; }
.dn-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.dn-tag { padding: 2px 8px; border-radius: 999px; background: #f5f3ec; color: #657269; font-size: 12px; }
.dn-tag--architect { background: transparent; border: 1px solid #b7bdb5; }
/* DQ-275: поле тегов в карточке — как поле «Налаштувань» */
.dn-tags-editor { flex: 1 1 220px; margin-top: 0; }
.dn-tags-editor input { flex: 1 1 160px; min-width: 0; }
.dn-tags-editor__error { flex-basis: 100%; color: #843a30; font-size: 12px; }
/* DQ-279: кнопки в дорожках цикла не выходят за колонку — во всю ширину колонки, «?» рядом */
.developments-track .developments-action-unit { display: flex; width: 100%; white-space: normal; }
.developments-track .developments-action-unit .developments-action { flex: 1 1 auto; min-width: 0; white-space: normal; text-align: center; }
.developments-track .developments-sync, .developments-track .developments-release { display: grid; gap: 6px; margin-top: 6px; }
.developments-cycle > header h4 { display: inline-flex; align-items: center; gap: 4px; }
/* DQ-280: строка проекта — зона «Вид» слева и открытие карточки справа, одна рамка */
.dn-row__view { display: flex; align-items: center; gap: 8px; min-width: 0; width: 230px; max-width: 230px; padding: 5px 12px 5px 10px; border: 0; border-right: 1px dashed #c9c2b0; background: #f5f3ec; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dn-row__view:hover, .dn-row__view:focus-visible { background: #f5efe2; outline: none; }
.dn-row__view:hover .mono-fb, .dn-row__view:focus-visible .mono-fb { opacity: 1; }
.dn-row__view.is-static { cursor: default; }
.dn-row__open { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; min-width: 0; padding: 5px 10px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dn-row__open:focus-visible { outline: 2px solid #eadbc0; outline-offset: -2px; }
.dn-row__name .dn-row__id { margin-top: 2px; }
.developments-list { container-type: inline-size; }
@container (max-width: 640px) {
  .dn-row__open { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .dn-row__name { grid-column: 1 / -1; }
  .dn-row__turn:empty { display: none; }
  .dn-row__cta { display: none; }
  .dn-row__view { width: 170px; max-width: 170px; }
}
@container (max-width: 420px) {
  .dn-row { grid-template-columns: minmax(0, 1fr); }
  .dn-row__view { width: auto; max-width: none; border-right: 0; border-bottom: 1px dashed #c9c2b0; }
}
/* DQ-282: вкладки модуля и кнопки полосы вида — одна высота и скругление, как кнопки «Розробок» */
.module-tabs { flex-wrap: wrap; align-items: center; }
.module-tabs button { min-height: 38px; padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer; }
.module-tabs button:not(.is-active):hover, .module-tabs button:not(.is-active):focus-visible { border-color: #8c673b; color: #1d3027; outline: none; }
.viewbar__actions > button { min-height: 32px; padding: 5px 14px; border: 1px solid #cbd0c7; border-radius: 999px; background: #fffdf8; color: #1d3027; font: inherit; font-size: 13px; cursor: pointer; }
.viewbar__actions > button:hover:not(:disabled), .viewbar__actions > button:focus-visible { border-color: #8c673b; outline: none; }
.viewbar__actions > button:disabled { color: #8a958d; cursor: default; }
.shell-view__switch .seg { border-radius: 999px; }
.shell-view__switch .seg button { padding: 6px 14px; cursor: pointer; }
/* DQ-283: отметка снимка на карточке «Оболонкою» и строка автозапуска в «Модулях» */
.shell-view__stamp.is-refreshing { color: #8c673b; }
.settings-autostart { margin: 0 0 12px; border-style: dashed; }
.settings-autostart small { display: block; margin-top: 2px; color: #7c887f; font-size: 12px; }

/* DQ-286/DQ-335: «Брама» — вход client_ui, до сессии, и её собственное окно
   ожидания. Первая настоящая реализация оси «Контур» (UI_STYLE_SYSTEM.md
   «Оси») — своя палитра только внутри .brama и .app-boot--brama, остальные
   экраны не затронуты; зелёный сплэш Родителя (.app-boot) не меняется.

   DQ-335/DQ-339: шрифты едут файлами из оболочки (`ui/core/src/fonts/`,
   `@font-face` — в `fonts.css`, OFL 1.1) и грузятся с самого сервера, без
   Google Fonts. Дисплейная гарнитура — Unbounded (кириллица и украинский в
   ней есть), и стоит она точечно, по слову Архитектора 2026-09-23: знак
   «БРАМА» (в сцене и в окне ожидания) и один крупный заголовок сцены; всё
   остальное, включая заголовок панели входа, — Manrope. Space Grotesk из
   DQ-335 снят: после Unbounded ему не осталось ни одного элемента.
   `font-synthesis: none` из :root запрещает подделывать начертание. */
.help-backdrop--brama,
.brama,
.brama-page,
.app-boot--brama {
  --brama-ink: #0d1016;
  --brama-ink2: #161b23;
  --brama-panel: #0f141b;
  --brama-line: #262d38;
  --brama-text: #e7ebf1;
  --brama-text-muted: #9aa4b2;
  --brama-mint: #35d6a4;
  --brama-mint-ink: #06231a;
  --brama-danger-bg: #3a1f22;
  --brama-danger-border: #7a3b3b;
  --brama-danger-text: #f3b8b8;
  /* Слово Президента 22.11.2026 (окно справки и генератор пароля). Палитра
     заморожена, поэтому новых значений нет: «готується» — янтарь оболочки
     (то же значение, что --amber), фон плашки — значение .brama-notice,
     кольцо фокуса и тень — значения, уже стоящие в правилах Брамы. */
  --brama-warn: #f1b76d;
  /* Слово Президента 26.11.2026: акцент простора организации (синий макета «Мій простір»). */
  --brama-blue: #6ea8ff;
  --brama-notice-bg: #12261f;
  --brama-ring: rgba(53, 214, 164, 0.25);
  --brama-shade: rgba(0, 0, 0, 0.35);
  --brama-display: "Unbounded", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --brama-body: "Manrope", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  color: var(--brama-text);
  background: var(--brama-ink);
  font-family: var(--brama-body);
}
.brama {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
/* Левая сцена: дуги-«ворота» фоном, знак сверху, заголовок в середине,
   плашки сервисов снизу — как в макете preview_8. */
.brama-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 56px) clamp(24px, 4.5vw, 64px);
}
.brama-stage__arcs { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
.brama-stage > *:not(.brama-stage__arcs) { position: relative; }
.brama-stage__mark { display: flex; align-items: center; gap: 13px; margin: 0; }
.brama-stage__glyph { flex: none; width: 30px; height: 30px; color: var(--brama-mint); }
/* DQ-339: знак «БРАМА» — Unbounded Bold 700, заголовок сцены — Unbounded
   Medium 500; это единственные два места дисплейной гарнитуры на экране. */
.brama-stage__wordmark { font-family: var(--brama-display); font-size: 19px; font-weight: 700; letter-spacing: .02em; }
/* Кодекс Брамы, АД-5: знак с названием — ссылка на сайт на каждой странице
   Брамы. Вид знака не меняется: цвет и отступ ссылка берёт у абзаца знака.
   Тап-цель 44px — прозрачным псевдоэлементом, без сдвига вёрстки. */
.brama-site-link { position: relative; display: inline-flex; align-items: center; gap: inherit; color: inherit; text-decoration: none; }
.brama-site-link::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.brama-site-link:focus-visible { outline: 2px solid var(--brama-mint); outline-offset: 4px; }
.brama-stage__rule { flex: none; width: 1px; height: 18px; background: var(--brama-line); }
.brama-stage__kicker { color: var(--brama-text-muted); font-size: 13px; }
.brama-stage__lead { display: grid; gap: 22px; max-width: 520px; }
.brama-stage__headline {
  margin: 0;
  font-family: var(--brama-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.brama-stage__help { margin: 0; max-width: 460px; color: var(--brama-text-muted); font-size: 15px; line-height: 1.65; }
/* Правая панель входа. */
.brama-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4.5vw, 64px);
  border-left: 1px solid var(--brama-line);
  background: var(--brama-ink2);
}
.brama-card { width: 100%; max-width: 392px; }
/* DQ-291/DQ-335: под узким окном сцена сворачивается до одного знака —
   форма входа важнее декоративной витрины, а не наоборот. */
@media (max-width: 860px) {
  .brama { grid-template-columns: 1fr; }
  .brama-stage { gap: 0; padding: 24px; }
  .brama-stage__lead { display: none; }
  .brama-panel { padding: 8px 24px 32px; border-left: 0; background: var(--brama-ink); }
}
/* Слово Архитектора 21.11.2026: два стиля окна входа. Лёгкий — основной;
   расширенный показывает слева «Стан підключення». Пиктограммы справа вверху:
   переключатель стиля и колёсико настроек подключения. */
.brama-panel { position: relative; }
.brama-tools { position: absolute; top: clamp(16px, 2.4vw, 28px); right: clamp(16px, 2.4vw, 28px); display: flex; gap: 6px; }
.brama-tool, .brama-mode { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--brama-line); border-radius: 12px; background: transparent; color: var(--brama-text-muted); cursor: pointer; }
.brama-tool:focus-visible, .brama-tool[aria-pressed="true"], .brama-tool[aria-expanded="true"],
.brama-mode--works:focus-visible, .brama-mode--works[aria-expanded="true"] { border-color: var(--brama-mint); color: var(--brama-mint); outline: none; }
.brama-tool svg, .brama-mode svg { width: 20px; height: 20px; }
.brama-under { margin: 18px 0 0; text-align: center; }
.brama-under .brama-link { font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.brama-conn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 0; color: var(--brama-text-muted); font-size: 13px; }
.brama-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brama-mint); }
.brama-conn--lost { color: var(--brama-danger-text); }
.brama-conn--lost .brama-dot, .brama-status__row--off .brama-dot { background: var(--brama-text-muted); }
.brama-modes { display: flex; justify-content: center; gap: 10px; margin: 14px 0 0; }
.brama-mode--works { color: var(--brama-mint); }
/* Слово Президента 25–26.11.2026: правило одно для всех режимов. Мятный —
   только у работающего; любой другой режим в нажатом виде — аварийный, какое
   бы состояние ни было причиной (нет настройки, ключа, кода или состояние
   видно только после входа). Исключений по состоянию здесь не заводить. */
.brama-mode:not(.brama-mode--works):focus-visible { border-color: currentColor; outline: none; }
.brama-mode:not(.brama-mode--works)[aria-expanded="true"] { border-color: var(--brama-danger-border); background: var(--brama-danger-bg); color: var(--brama-danger-text); }
.brama-mode-detail__state:not(.brama-mode-detail__state--works) { color: var(--brama-danger-text); }
/* Т-4: включённый сейчас режим выделен рамкой, остальные приглушены. */
.brama-mode[data-brama-mode-on="true"] { border-color: var(--brama-mint); }
.brama-mode[data-brama-mode-on="false"] { opacity: .55; }
.brama-mode[data-brama-mode-on="false"][aria-expanded="true"], .brama-mode[data-brama-mode-on="false"]:focus-visible { opacity: 1; }
.brama-mode-detail { margin: 12px 0 0; padding: 14px 16px; border: 1px solid var(--brama-line); border-radius: 12px; background: var(--brama-panel); }
.brama-mode-detail__title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; font-size: 14px; }
.brama-mode-detail__state { color: var(--brama-text-muted); font-size: 12.5px; white-space: nowrap; }
.brama-mode-detail__state--works { color: var(--brama-mint); }
.brama-mode-detail__help { margin: 8px 0 0; color: var(--brama-text-muted); font-size: 13px; line-height: 1.55; }
.brama-status { max-width: 520px; padding: 20px 22px; border: 1px solid var(--brama-line); border-radius: 16px; background: var(--brama-panel); }
.brama-status__title { margin: 0 0 8px; font-family: var(--brama-body); color: var(--brama-text-muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.brama-status__list { display: grid; margin: 0; padding: 0; list-style: none; }
.brama-status__row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.3fr); align-items: baseline; gap: 10px; padding: 11px 0; border-top: 1px solid var(--brama-line); font-size: 14px; }
.brama-status__row:first-child { border-top: 0; }
.brama-status__row span { color: var(--brama-text-muted); }
@media (max-width: 860px) {
  .brama-status { display: none; }
  .brama-tools { top: 12px; right: 16px; }
}
.brama-link { position: relative; padding: 0; border: none; background: none; color: var(--brama-mint); font: inherit; font-size: 12.5px; text-decoration: none; cursor: pointer; }
.brama-link:hover, .brama-link:focus-visible { text-decoration: underline; outline: none; }
.brama-no-account { margin: 0 0 26px; color: var(--brama-text-muted); font-size: 13px; }
.brama-back { display: inline-block; margin: 0 0 16px; }
.brama-password-row { position: relative; }
.brama-forgot { position: absolute; top: 0; right: 0; }
/* DQ-339: заголовок панели («Вхід») — Manrope, не дисплейная гарнитура. */
.brama-title { margin: 0 0 7px; font-family: var(--brama-body); font-size: 27px; font-weight: 600; line-height: 1.15; letter-spacing: -.018em; }
.brama-help { margin: 0 0 20px; color: var(--brama-text-muted); font-size: 14px; line-height: 1.6; }
.brama-error { margin: 0 0 18px; padding: 11px 13px; border-left: 4px solid var(--brama-danger-border); border-radius: 8px; background: var(--brama-danger-bg); color: var(--brama-danger-text) !important; font-weight: 650; }
.brama-notice { margin: 0 0 18px; padding: 11px 13px; border-left: 4px solid var(--brama-mint); border-radius: 8px; background: #12261f; color: var(--brama-text); font-weight: 550; }
.brama-form { display: grid; gap: 14px; margin: 0 0 26px; }
.brama-form label { display: grid; gap: 8px; color: var(--brama-text-muted); font-size: 12.5px; }
.brama-form input {
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--brama-line);
  border-radius: 14px;
  background: var(--brama-panel);
  color: var(--brama-text);
  font: inherit;
  /* Не меньше 16px: иначе мобильный браузер увеличит страницу при фокусе. */
  font-size: 16px;
  outline: 3px solid transparent;
  outline-offset: 1px;
  transition: border-color .15s ease, outline-color .15s ease;
}
.brama-form input:focus { border-color: var(--brama-mint); outline-color: rgba(53, 214, 164, 0.25); }
.brama-form input.is-invalid { border-color: var(--brama-danger-border); }
.brama-submit {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid var(--brama-mint);
  border-radius: 14px;
  background: var(--brama-mint);
  color: var(--brama-mint-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.brama-submit:hover, .brama-submit:focus-visible { filter: brightness(1.08); outline: none; }
.brama-divider { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; color: var(--brama-text-muted); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.brama-divider::before, .brama-divider::after { content: ""; flex: 1; height: 1px; background: var(--brama-line); }
.brama-alt { display: grid; gap: 10px; margin: 0 0 26px; }
.brama-alt-row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 17px;
  border: 1px solid var(--brama-line);
  border-radius: 14px;
  background: var(--brama-panel);
  color: var(--brama-text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.brama-alt-row .lucide-icon { flex: none; width: 19px; height: 19px; color: var(--brama-text-muted); }
.brama-alt-row > span { flex: 1 1 auto; }
.brama-alt-row:hover, .brama-alt-row:focus-visible { border-color: var(--brama-mint); outline: none; }
.brama-google--unavailable { color: var(--brama-text-muted); cursor: not-allowed; }
.brama-google--unavailable small { display: block; font-size: 12px; }
/* BRAMA-HELP-UI:BEGIN — слово Президента 22.11.2026: окно справки в стиле
   Брамы (макет brama-help-mockup). Регион справки стоит рядом с .brama, а не
   внутри, поэтому токены --brama-* объявлены и на .help-backdrop--brama (см.
   блок токенов выше). Цвета — только переменными. Наведение мыши ничего не
   открывает: оно лишь повторяет вид фокуса и стоит под (hover: hover). */
.help-backdrop--brama {
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  background: var(--brama-shade);
  background: color-mix(in srgb, var(--brama-ink) 78%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.topic-help-panel--brama {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(880px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 2 * var(--help-window-gap)));
  height: min(720px, calc(100svh - 2 * var(--help-window-gap)));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--brama-line);
  border-radius: 22px;
  background: var(--brama-ink2);
  color: var(--brama-text);
  font-family: var(--brama-body);
  box-shadow: 0 40px 120px var(--brama-shade);
  outline: none;
}
/* Шапка: знак Брамы, надзаголовок, название статьи, закрытие. */
.topic-help-panel--brama > .bhelp-head { display: flex; align-items: center; justify-content: flex-start; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid var(--brama-line); }
.bhelp-head__glyph { flex: none; width: 28px; height: 28px; color: var(--brama-mint); }
.bhelp-head__text { flex: 1; min-width: 0; }
.topic-help-panel--brama .bhelp-head__kicker { margin: 0 0 3px; color: var(--brama-text-muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
.topic-help-panel--brama .bhelp-head h3 { margin: 0; font-family: var(--brama-body); font-size: 22px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.bhelp-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--brama-line); border-radius: 12px; background: transparent; color: var(--brama-text-muted); cursor: pointer; }
.bhelp-close:focus-visible { border-color: var(--brama-mint); color: var(--brama-mint); outline: none; }
.bhelp-close svg { width: 20px; height: 20px; }
/* Поиск: кегль 16px — иначе мобильный браузер увеличит страницу при фокусе. */
.bhelp-search { position: relative; padding: 14px 24px; border-bottom: 1px solid var(--brama-line); }
.bhelp-search svg { position: absolute; top: 50%; left: 40px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--brama-text-muted); pointer-events: none; }
.bhelp-search input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 10px 16px 10px 46px; border: 1px solid var(--brama-line); border-radius: 14px; background: var(--brama-panel); color: var(--brama-text); font: inherit; font-size: 16px; outline: 3px solid transparent; outline-offset: 1px; transition: border-color .15s ease, outline-color .15s ease; }
.bhelp-search input::placeholder { color: var(--brama-text-muted); }
.bhelp-search input:focus { border-color: var(--brama-mint); outline-color: var(--brama-ring); }
/* Тело: оглавление слева, статья справа; прокручивается только статья. */
.bhelp-body { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 0; }
.bhelp-body--plain { grid-template-columns: minmax(0, 1fr); }
.bhelp-toc { overflow: auto; padding: 18px 12px 18px 16px; border-right: 1px solid var(--brama-line); }
.bhelp-toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.bhelp-toc__link { display: block; width: 100%; min-height: 44px; padding: 9px 12px; border: 0; border-left: 2px solid transparent; border-radius: 10px; background: transparent; color: var(--brama-text-muted); font: inherit; font-size: 14px; line-height: 1.35; text-align: left; cursor: pointer; }
.bhelp-toc__link:focus-visible { outline: 2px solid var(--brama-mint); outline-offset: -2px; }
.bhelp-toc__link[aria-current="true"] { border-left-color: var(--brama-mint); background: var(--brama-panel); color: var(--brama-text); font-weight: 600; }
.bhelp-article { overflow: auto; overscroll-behavior: contain; padding: 22px 28px 32px; scroll-padding-top: 16px; }
.bhelp-article, .bhelp-toc { scrollbar-width: thin; scrollbar-color: var(--brama-line) transparent; }
.topic-help-panel--brama .bhelp-lead { margin: 0 0 6px; max-width: 58ch; color: var(--brama-text); font-size: 16px; line-height: 1.65; }
.topic-help-panel--brama .bhelp-text { margin: 10px 0 0; max-width: 62ch; color: var(--brama-text-muted); font-size: 15px; line-height: 1.65; }
.bhelp-section { padding: 22px 0 0; scroll-margin-top: 8px; }
.bhelp-section + .bhelp-section { margin-top: 22px; border-top: 1px solid var(--brama-line); }
.bhelp-section h4 { margin: 0 0 12px; font-family: var(--brama-body); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.topic-help-panel--brama .bhelp-section p { margin: 0; max-width: 62ch; color: var(--brama-text-muted); font-size: 15px; line-height: 1.65; }
.topic-help-panel--brama .bhelp-section p + p,
.topic-help-panel--brama .bhelp-rows + p { margin-top: 12px; }
/* Строки «значок · что это · состояние». */
.bhelp-rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bhelp-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 14px; border: 1px solid var(--brama-line); border-radius: 14px; background: var(--brama-panel); }
.bhelp-ico { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--brama-line); border-radius: 12px; color: var(--brama-text-muted); }
.bhelp-ico svg { width: 20px; height: 20px; }
.bhelp-row--works .bhelp-ico { border-color: var(--brama-mint); color: var(--brama-mint); }
.bhelp-row--off .bhelp-ico { opacity: .55; }
.bhelp-row b { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 2px 0 4px; color: var(--brama-text); font-size: 15px; font-weight: 600; }
.topic-help-panel--brama .bhelp-row p { font-size: 14px; line-height: 1.55; }
.bhelp-row p::first-letter { text-transform: uppercase; }
.bhelp-state { color: var(--brama-text-muted); font-size: 12px; font-weight: 500; }
.bhelp-state::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--brama-text-muted); vertical-align: 1px; }
.bhelp-state--works { color: var(--brama-mint); }
.bhelp-state--works::before { background: var(--brama-mint); }
.bhelp-state--wait { color: var(--brama-warn); }
.bhelp-state--wait::before { background: var(--brama-warn); }
/* Дело — сразу под текстом раздела. */
.bhelp-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.bhelp-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 20px; border: 1px solid var(--brama-mint); border-radius: 14px; background: var(--brama-mint); color: var(--brama-mint-ink); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.bhelp-btn svg { width: 18px; height: 18px; }
.bhelp-btn:focus-visible { filter: brightness(1.08); outline: 2px solid var(--brama-text); outline-offset: 2px; }
.bhelp-btn--ghost { background: transparent; color: var(--brama-mint); }
.bhelp-btn--ghost:focus-visible { background: var(--brama-notice-bg); filter: none; }
.bhelp-rules { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: bhelp-rule; }
.bhelp-rules li { position: relative; max-width: 62ch; padding-left: 34px; color: var(--brama-text-muted); font-size: 15px; line-height: 1.6; counter-increment: bhelp-rule; }
.bhelp-rules li::before { content: counter(bhelp-rule); position: absolute; top: 1px; left: 0; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--brama-line); border-radius: 7px; color: var(--brama-text); font-size: 12px; font-weight: 600; }
.topic-help-panel--brama mark { padding: 0 1px; border-radius: 3px; background: var(--brama-ring); color: var(--brama-text); }
/* Прежняя выдача поиска по инструкциям, открытый раздел и адрес экрана — те
   же узлы, что у справки оболочки, в цветах Брамы. */
.bhelp-fallback { display: grid; gap: 12px; }
.topic-help-panel--brama .topic-help-results { max-height: none; overflow: visible; }
.topic-help-panel--brama .topic-help-results li button,
.topic-help-panel--brama .topic-help-offers li button,
.topic-help-panel--brama .topic-help-panel__back { border-color: var(--brama-line); background: var(--brama-panel); color: var(--brama-text); font: inherit; }
.topic-help-panel--brama .topic-help-results li button:focus-visible,
.topic-help-panel--brama .topic-help-offers li button:focus-visible,
.topic-help-panel--brama .topic-help-panel__back:focus-visible { border-color: var(--brama-mint); outline: none; }
.topic-help-panel--brama .topic-help-results li small,
.topic-help-panel--brama .topic-help-results li span,
.topic-help-panel--brama .topic-help-offers li small,
.topic-help-panel--brama .topic-help-panel__group { color: var(--brama-text-muted); }
.topic-help-panel--brama p.topic-help-panel__note { margin: 0; padding: 0; border-top: 0; color: var(--brama-text-muted); font-size: 14px; line-height: 1.6; }
.topic-help-panel--brama .topic-help-doc pre,
.topic-help-panel--brama pre.topic-help-code { max-height: none; border-color: var(--brama-line); background: var(--brama-panel); color: var(--brama-text); }
.topic-help-panel--brama .topic-help-panel__route { margin-top: 22px; border-top-color: var(--brama-line); color: var(--brama-text-muted); }
.bhelp-copy-route { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--brama-line); border-radius: 12px; background: transparent; color: var(--brama-text-muted); cursor: pointer; }
.bhelp-copy-route:focus-visible { border-color: var(--brama-mint); color: var(--brama-mint); outline: none; }
.bhelp-copy-route svg { width: 18px; height: 18px; }
/* Подвал: клавиши. */
.bhelp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 24px; border-top: 1px solid var(--brama-line); color: var(--brama-text-muted); font-size: 12.5px; }
.bhelp-foot kbd { margin-right: 6px; padding: 2px 7px; border: 1px solid var(--brama-line); border-radius: 6px; color: var(--brama-text); font: inherit; font-size: 11.5px; }
@media (hover: hover) {
  .bhelp-close:hover { border-color: var(--brama-mint); color: var(--brama-mint); }
  .bhelp-toc__link:hover { background: var(--brama-panel); color: var(--brama-text); }
  .bhelp-btn:hover { filter: brightness(1.08); }
  .bhelp-btn--ghost:hover { background: var(--brama-notice-bg); filter: none; }
  .bhelp-copy-route:hover { border-color: var(--brama-mint); color: var(--brama-mint); }
  .topic-help-panel--brama .topic-help-results li button:hover,
  .topic-help-panel--brama .topic-help-offers li button:hover,
  .topic-help-panel--brama .topic-help-panel__back:hover { border-color: var(--brama-mint); }
}
/* Телефон: окно на весь экран, оглавление — лента под поиском, подвала нет. */
@media (max-width: 720px) {
  .topic-help-panel--brama { grid-template-rows: auto auto auto minmax(0, 1fr); width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; }
  .topic-help-panel--brama > .bhelp-head { padding: 16px 16px 14px; }
  .bhelp-search { padding: 12px 16px; }
  .bhelp-search svg { left: 32px; }
  .bhelp-body { display: contents; }
  .bhelp-toc { overflow-x: auto; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--brama-line); }
  .bhelp-toc ol { display: flex; gap: 6px; width: max-content; }
  .bhelp-toc__link { padding: 8px 12px; border: 1px solid var(--brama-line); white-space: nowrap; }
  .bhelp-toc__link[aria-current="true"] { border-color: var(--brama-mint); }
  .bhelp-article { padding: 16px 16px 28px; }
  /* Без оглавления статья всё равно занимает растягиваемый ряд. */
  .bhelp-body--plain .bhelp-article { grid-row: 4; }
  .bhelp-foot { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .help-backdrop--brama.is-open .topic-help-panel--brama { animation: bhelp-in .18s ease-out; }
  @keyframes bhelp-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
}
/* BRAMA-HELP-UI:END */
/* BRAMA-PASSWORD-UI:BEGIN — слово Президента 22.11.2026: генератор пароля на
   виду (макет brama-password-mockup). Панели «Завершення реєстрації» и «Новий
   пароль» одинаковы; цвета — только переменными, тап-цели — 44px. */
.brama-card--wide { max-width: 440px; }
.brama-form--password { margin-top: 18px; }
/* Предложение до полей: первое, что видит человек. */
.bpass-offer { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; border: 1px solid var(--brama-line); border-radius: 14px; background: var(--brama-panel); }
.bpass-offer p { flex: 1; min-width: 0; margin: 0; color: var(--brama-text-muted); font-size: 13px; line-height: 1.45; }
.bpass-offer p b { display: block; color: var(--brama-text); font-size: 14px; font-weight: 600; }
.bpass-gen { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--brama-mint); border-radius: 12px; background: transparent; color: var(--brama-mint); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.bpass-gen:focus-visible { background: var(--brama-notice-bg); outline: none; }
.bpass-gen svg { width: 18px; height: 18px; }
/* Значок генератора в первом поле, слева от «ока». */
.brama-form .password-field--generate > input { padding-right: 96px; }
.bpass-icon--gen { position: absolute; top: 50%; right: 46px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--brama-mint); transform: translateY(-50%); cursor: pointer; }
.bpass-icon--gen:focus-visible { background: var(--brama-ink2); outline: none; }
/* «Око» в формах Брамы — 44×44 по центру поля. Общее правило
   `.password-field .password-reveal` стоит в файле позже тач-блока и возвращало
   `top: 0`, оставляя его сдвиг: под касанием «око» уезжало над поле. */
.brama-form .password-field .password-reveal { top: 50%; bottom: auto; width: 44px; height: 44px; min-height: 44px; transform: translateY(-50%); }
.bpass-icon--gen svg { width: 20px; height: 20px; }
/* Правила живым списком и строка совпадения заменяют подпись под полем. */
.brama-form--password .password-feedback { display: none; }
.bpass-checks { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--brama-text-muted); font-size: 13px; }
.bpass-checks li { display: flex; align-items: center; gap: 8px; }
.bpass-check { flex: none; display: grid; place-items: center; box-sizing: border-box; width: 16px; height: 16px; border: 1.5px solid var(--brama-text-muted); border-radius: 50%; color: transparent; }
.bpass-check svg { width: 12px; height: 12px; }
.bpass-check--note { border: 0; }
.bpass-check--note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brama-text-muted); }
.bpass-checks li.is-ok { color: var(--brama-text); }
.bpass-checks li.is-ok .bpass-check { border-color: var(--brama-mint); background: var(--brama-mint); color: var(--brama-mint-ink); }
.bpass-match { min-height: 18px; margin: 0; color: var(--brama-text-muted); font-size: 13px; }
.bpass-match.is-ok { color: var(--brama-mint); }
.bpass-match.is-bad { color: var(--brama-danger-text); }
/* После генерации: пароль показан, рядом «скопіювати» и «інший пароль». */
.bpass-done { display: grid; gap: 10px; margin: 0; padding: 12px 14px; border-left: 4px solid var(--brama-mint); border-radius: 8px; background: var(--brama-notice-bg); color: var(--brama-text); font-size: 13px; line-height: 1.5; }
.bpass-done[hidden] { display: none; }
.bpass-done p { margin: 0; }
.bpass-done__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.bpass-copy { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--brama-mint); border-radius: 10px; background: transparent; color: var(--brama-mint); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.bpass-copy svg { width: 16px; height: 16px; }
.bpass-copy:focus-visible { background: var(--brama-ring); outline: none; }
.brama-submit:disabled { opacity: .45; cursor: not-allowed; filter: none; }
@media (hover: hover) {
  .bpass-gen:hover { background: var(--brama-notice-bg); }
  .bpass-icon--gen:hover { background: var(--brama-ink2); }
  .bpass-copy:hover { background: var(--brama-ring); }
}
@media (max-width: 460px) {
  .bpass-offer { flex-direction: column; align-items: stretch; }
  .bpass-gen { justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .bpass-flash { animation: bpass-flash .6s ease-out; }
  @keyframes bpass-flash { from { box-shadow: 0 0 0 4px var(--brama-ring); } to { box-shadow: 0 0 0 0 transparent; } }
}
/* BRAMA-PASSWORD-UI:END */
/* DQ-374: «Брама» после входа — окно 2 «сервис, затем рабочее место» и
   профиль человека (screens/brama-home.js). Страница целиком, без рейки и
   шапки оболочки; палитра и гарнитуры — токены «Брамы» выше (.brama-page),
   новых цветов нет. Моноширинные подписи — системный моноширинный стек
   проекта (JetBrains Mono макета не вендорен). */
.brama-page {
  --brama-mint-soft: #12261f;
  --brama-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --brama-gap: 14px;
  --brama-radius: 18px;
  --brama-radius-row: 16px;
  --brama-radius-button: 12px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.brama-home__bar { position: relative; display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--brama-gap); min-height: clamp(72px, 5vw, 96px); padding: 0 clamp(16px, 4.5vw, 72px); border-bottom: 1px solid var(--brama-line); }
.brama-home__mark { display: flex; align-items: center; gap: 12px; margin: 0; }
.brama-home__glyph { width: 24px; height: 24px; color: var(--brama-mint); }
.brama-home__wordmark { font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.brama-home__who { position: relative; }
.brama-home__avatar-button { display: flex; align-items: center; gap: var(--brama-gap); min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--brama-text); font: inherit; font-size: 13px; cursor: pointer; }
.brama-home__avatar { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--brama-line); border-radius: 50%; background: var(--brama-ink2); font-size: 12px; }
.brama-home__avatar-button:focus-visible { outline: 2px solid var(--brama-mint); outline-offset: 2px; }
.brama-home__menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; display: grid; min-width: 240px; padding: 6px; border: 1px solid var(--brama-line); border-radius: var(--brama-radius-button); background: var(--brama-ink2); }
.brama-home__menu button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--brama-text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.brama-home__menu button:focus-visible { outline: 2px solid var(--brama-mint); }
@media (hover: hover) { .brama-home__menu button:hover { background: var(--brama-panel); } }
.brama-home__menu .lucide-icon { width: 16px; height: 16px; color: var(--brama-text-muted); }
/* DQ-418: макет нарисован в рамке 1312×820, и на большом экране контент
   упирался в неё, оставляя справа пустую колонку. Ширина, отступы и карточки
   теперь растут вместе с окном. Кегли не трогаются: шкала кеглей заморожена
   правилом проекта, её расширение — решение Архитектора. */
.brama-home__main { display: flex; flex: 1; flex-direction: column; gap: clamp(30px, 2.4vw, 44px); box-sizing: border-box; width: 100%; max-width: clamp(1312px, 94vw, 1680px); margin: 0 auto; padding: clamp(40px, 3.2vw, 60px) clamp(16px, 4.5vw, 72px); }
.brama-home__hello { display: grid; gap: 8px; }
.brama-home__title { font-size: 27px; letter-spacing: -.015em; }
.brama-home__lead { margin: 0; color: var(--brama-text-muted); font-size: 14px; }
.brama-home__block { display: grid; gap: var(--brama-gap); }
.brama-home__caption { display: flex; align-items: baseline; gap: 10px; margin: 0; color: var(--brama-text-muted); font-family: var(--brama-mono); font-size: 10.5px; font-weight: 400; letter-spacing: .13em; text-transform: uppercase; }
.brama-home__caption b { color: var(--brama-mint); font-family: var(--brama-body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.brama-home__services { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(260px, 21vw, 360px), 1fr)); gap: clamp(16px, 1.3vw, 24px); }
.brama-service { position: relative; display: grid; gap: clamp(12px, 1vw, 18px); justify-items: start; padding: clamp(20px, 1.6vw, 30px) clamp(22px, 1.8vw, 32px); border: 1px solid var(--brama-line); border-radius: var(--brama-radius); background: var(--brama-panel); color: var(--brama-text); font: inherit; text-align: left; cursor: pointer; }
.brama-service.is-selected { border-color: var(--brama-mint); }
.brama-service:focus-visible { outline: 2px solid var(--brama-mint); outline-offset: 2px; }
.brama-service__check { position: absolute; top: 18px; right: 20px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brama-mint); color: var(--brama-mint-ink); }
.brama-service__check .lucide-icon { width: 13px; height: 13px; }
.brama-service__head { display: flex; align-items: center; gap: 11px; }
.brama-service__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--brama-radius-button); background: var(--brama-mint-soft); color: var(--brama-mint); }
.brama-service__icon .lucide-icon { width: 20px; height: 20px; }
.brama-service__title { display: block; font-size: 17px; font-weight: 600; }
.brama-service__sub { display: block; margin-top: 2px; color: var(--brama-text-muted); font-family: var(--brama-mono); font-size: 11px; }
.brama-tag { flex: none; padding: 4px 12px; border: 1px solid var(--brama-line); border-radius: 999px; color: var(--brama-text-muted); font-size: 12px; }
.brama-tag--mint { border-color: var(--brama-mint); color: var(--brama-mint); }
.brama-home__places { display: grid; gap: clamp(10px, .85vw, 16px); margin: 0; padding: 0; list-style: none; }
.brama-place { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(12px, 1vw, 18px) clamp(22px, 1.8vw, 32px); padding: clamp(16px, 1.3vw, 24px) clamp(20px, 1.6vw, 30px); border: 1px solid var(--brama-line); border-radius: var(--brama-radius-row); background: var(--brama-panel); }
.brama-place--off { border-style: dashed; background: none; }
.brama-place__text { flex: 1 1 240px; min-width: 0; }
.brama-place__text b { display: block; font-size: 15px; font-weight: 600; }
.brama-place--off .brama-place__text b { color: var(--brama-text-muted); }
.brama-place__text small { display: block; margin-top: 3px; color: var(--brama-text-muted); font-size: 12.5px; line-height: 1.45; }
.brama-place__state { display: flex; flex: none; align-items: center; gap: 8px; min-width: 120px; font-size: 12.5px; }
.brama-place__state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.brama-place__state.is-on { color: var(--brama-mint); }
.brama-place__state.is-off { color: var(--brama-danger-text); }
.brama-enter { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: clamp(128px, 10vw, 168px); min-height: 44px; padding: 0 clamp(18px, 1.4vw, 26px); border: 1px solid var(--brama-line); border-radius: var(--brama-radius-button); background: none; color: var(--brama-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.brama-enter--primary { border-color: var(--brama-mint); background: var(--brama-mint); color: var(--brama-mint-ink); }
.brama-enter--off { border-style: dashed; color: var(--brama-text-muted); cursor: not-allowed; }
.brama-enter:focus-visible { outline: 2px solid var(--brama-mint); outline-offset: 2px; }
.brama-home__empty { display: grid; gap: var(--brama-gap); justify-items: start; padding: 20px 22px; border: 1px dashed var(--brama-line); border-radius: var(--brama-radius); }
.brama-home__empty p { margin: 0; color: var(--brama-text-muted); font-size: 14px; line-height: 1.6; }
.brama-home__back { align-self: flex-start; min-height: 44px; font-size: 13px; }
/* Профиль: разметка «Мої сервіси» (human.js) в тёмной стилистике «Брамы». */
.brama-page .panel, .brama-page .settings-zone-locked { border: 1px solid var(--brama-line); background: var(--brama-panel); color: var(--brama-text); box-shadow: none; }
.brama-page .screen-head h2, .brama-page h3, .brama-page h4, .brama-page h5 { color: var(--brama-text); }
/* DQ-619: заголовки тёмной страницы — Manrope «Брами», не гарнитура с засечками админки. */
.brama-page h2, .brama-page h3, .brama-page h4, .brama-page h5 { font-family: var(--brama-body); letter-spacing: -.01em; }
/* DQ-619: плашка закрытой зоны — замок у текста, а не через колонку сетки админки. */
.brama-page .settings-zone-locked { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; }
/* DQ-619: «БЕЗКОШТОВНО» — заливкой, как в макете. */
.brama-showcase__eyebrow .brama-tag--mint { background: var(--brama-mint); color: var(--brama-mint-ink); font-weight: 700; }
.brama-page .eyebrow, .brama-page .hint, .brama-page small { color: var(--brama-text-muted); }
.brama-page .refresh { min-height: 44px; border: 1px solid var(--brama-line); background: var(--brama-ink2); color: var(--brama-text); }
.brama-page .refresh:disabled { border-style: dashed; background: none; color: var(--brama-text-muted); cursor: not-allowed; }
.brama-page .button--danger { border: 1px solid var(--brama-danger-border); background: var(--brama-danger-bg); color: var(--brama-danger-text); }
.brama-page input, .brama-page select, .brama-page textarea { border: 1px solid var(--brama-line); background: var(--brama-ink2); color: var(--brama-text); font-size: 16px; }
/* DQ-562: на телефоне поля были 25px и сливались с карточкой. Поле и список —
   44px с различимой рамкой, флажок 22px; таблицы и шапка не шире экрана. */
.brama-page input:not([type="checkbox"]):not([type="radio"]), .brama-page select { box-sizing: border-box; max-width: 100%; min-height: 44px; padding: 8px 12px; border-color: var(--brama-text-muted); border-radius: var(--brama-radius-button); }
.brama-page textarea { box-sizing: border-box; max-width: 100%; border-color: var(--brama-text-muted); border-radius: var(--brama-radius-button); }
.brama-page input:focus-visible, .brama-page select:focus-visible, .brama-page textarea:focus-visible { outline: 2px solid var(--brama-mint); outline-offset: 1px; }
.brama-page .password-field > input { padding-right: 48px; }
.brama-page input[type="checkbox"], .brama-page input[type="radio"] { width: 22px; height: 22px; accent-color: var(--brama-mint); }
.brama-page .monitoring-tablewrap { max-width: 100%; border-color: var(--brama-line); background: var(--brama-panel); box-shadow: none; }
.brama-page .monitoring-table th { border-color: var(--brama-line); color: var(--brama-text-muted); }
.brama-page .monitoring-table td { border-color: var(--brama-line); color: var(--brama-text); }
.brama-page .screen-head { flex-wrap: wrap; }
.brama-page .screen-head > *, .brama-page .human-view, .brama-home__main { min-width: 0; }
.brama-page .org-switcher, .brama-page .org-switcher select { max-width: 100%; }
.brama-kbd { margin-left: 4px; padding: 0 5px; border: 1px solid var(--brama-line); border-radius: 6px; font: inherit; font-size: 11px; color: var(--brama-text-muted); }
.brama-page .human-card__actions, .brama-page .human-connection__actions, .brama-page .human-org-card section { border-color: var(--brama-line); }
/* DQ-569: вітрина окна 2 (макет brama.html, экран 2). Только токены
   --brama-*: палитра и шкала кеглей заморожены. Сетка резиновая: карточки
   переходят в одну колонку сами, без прокрутки вбок на 375px. */
.brama-showcase { display: grid; gap: clamp(30px, 2.4vw, 44px); min-width: 0; }
.brama-showcase__hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--brama-gap); padding: clamp(20px, 1.8vw, 32px); border: 1px solid var(--brama-mint); border-radius: var(--brama-radius); background: var(--brama-mint-soft); }
.brama-showcase__hero-main, .brama-showcase__points { display: grid; gap: var(--brama-gap); align-content: start; min-width: 0; }
.brama-showcase__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; color: var(--brama-text-muted); font-family: var(--brama-mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; }
.brama-showcase__hero-title { margin: 0; font-size: 27px; font-weight: 600; } /* Unbounded — только знак и один заголовок (DQ-339) */
.brama-showcase__text { margin: 0; color: var(--brama-text-muted); font-size: 14px; line-height: 1.6; }
.brama-showcase__note { margin: 0; color: var(--brama-text-muted); font-size: 12px; }
.brama-showcase__mono { color: var(--brama-text-muted); font-family: var(--brama-mono); font-size: 11px; }
.brama-showcase__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--brama-gap); }
.brama-showcase__points ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.brama-showcase__points li { display: flex; gap: 10px; align-items: baseline; }
.brama-showcase__points li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--brama-mint); }
.brama-showcase__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(16px, 1.3vw, 24px); }
.brama-showcase__card { display: grid; gap: 12px; align-content: start; min-width: 0; padding: clamp(20px, 1.6vw, 30px) clamp(22px, 1.8vw, 32px); border: 1px solid var(--brama-line); border-radius: var(--brama-radius); background: var(--brama-panel); }
.brama-showcase__card p { margin: 0; }
.brama-showcase__card .brama-enter { justify-self: start; }
.brama-showcase__prices { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.brama-showcase__prices li { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--brama-line); font-size: 14px; overflow-wrap: anywhere; }
.brama-showcase__prices small { color: var(--brama-text-muted); font-size: 12px; }
.brama-showcase__price { color: var(--brama-mint); font-family: var(--brama-mono); font-size: 17px; font-weight: 500; }
.brama-showcase__help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--brama-gap); padding: clamp(20px, 1.6vw, 30px); border: 1px solid var(--brama-line); border-radius: var(--brama-radius); background: var(--brama-ink2); }
.brama-showcase__help > div:first-child { display: grid; gap: 8px; flex: 1 1 320px; min-width: 0; }
.brama-home__caption small { letter-spacing: 0; text-transform: none; font-family: var(--brama-body); font-size: 12px; }
@media (max-width: 640px) {
  .brama-showcase__actions .brama-enter { flex: 1 1 100%; }
  .brama-home__caption { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .brama-home__name { display: none; }
  .brama-place__state { min-width: 0; }
}

/* DQ-335: своё окно ожидания «Брамы». Родитель показывает зелёный
   .app-boot; client_ui до первого рендера получает тёмное окно в палитре
   макета. Выбор делает роль интерфейса (client-config.json,
   `interfaceRole === "client_ui"`), а не адрес страницы. */
.app-boot--brama { padding: 24px; }
.brama-boot__arcs { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
.app-boot--brama .app-boot__card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(420px, 100%);
  padding: 40px 32px;
  border: 1px solid var(--brama-line);
  border-radius: 22px;
  background: #161b23;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.brama-boot__glyph { width: 38px; height: 38px; color: var(--brama-mint); }
.brama-boot__wordmark { font-family: var(--brama-display); font-size: 22px; font-weight: 700; letter-spacing: .12em; }
.app-boot--brama span { color: var(--brama-text-muted); font-size: 13px; }
.app-boot--brama i { margin-top: 18px; background: #ffffff1c; }
.app-boot--brama i::after { background: var(--brama-mint); }
/* DQ-292: подсказки существующих значений — список под полем (общий приём §27) */
.suggest-host { position: relative; display: flex; flex: 1 1 160px; min-width: 0; }
.suggest-host > input { flex: 1 1 auto; min-width: 0; }
.suggest-list { position: absolute; z-index: 8; top: calc(100% + 4px); left: 0; right: 0; display: grid; max-height: 240px; margin: 0; padding: 4px; overflow: auto; list-style: none; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(40, 45, 42, 0.1); }
.suggest-list button { width: 100%; padding: 6px 10px; border: 0; border-radius: 7px; background: transparent; color: #25372d; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.suggest-list button:hover, .suggest-list button.is-active { background: #f5efe2; }
/* DQ-295: общее правило dd { overflow: hidden } обрезало список подсказок под полем тегов */
.developments-facts--tags dd, .suggest-host { overflow: visible; }
/* DQ-299: причина, по которой шаг релиза сейчас недоступен */
.developments-release__reason { display: block; margin-top: 4px; color: #7c887f; font-size: 11px; }
/* DQ-304: служебные строки доказательств отделены от группы каталогов */
.developments-evidence li.is-service:first-of-type { margin-top: 6px; padding-top: 8px; border-top: 1px dashed #c9c2b0; }
.developments-evidence li.is-service { color: #68756d; }
/* DQ-305: заглушка вкладки «Вид» у модуля без объявленного вида */
.ext-no-view { display: grid; justify-items: center; gap: 10px; max-width: 640px; margin: 8px auto; padding: 28px 24px; text-align: center; border-style: dashed; }
.ext-no-view__picture { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 22px; background: #f5efe2; color: #8c673b; }
.ext-no-view__picture svg { width: 44px; height: 44px; }
.ext-no-view h3 { margin: 4px 0 0; font-family: Georgia, serif; font-weight: 500; }
.ext-no-view p { margin: 0; color: #657269; }
.ext-no-view__kinds { display: grid; gap: 4px; margin: 4px 0; padding: 0; list-style: none; color: #657269; font-size: 13px; text-align: left; }
/* DQ-308: блоки модуля по записи ядра — простым списком */
.ext-blocks-plain { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ext-blocks-plain li { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }


/* ============================================================
   DQ-324 · Собственный экран «Люди» (screens/human.js).
   Только раскладка: ни одного нового цвета и кегля — цвета
   наследуются или берутся из токенов (--line), кегли — из шкалы.
   ============================================================ */
.human-view .lucide-icon, .screen-head-actions .lucide-icon { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.human-filters { margin: 0 0 12px; }
.human-view .module-search { margin-bottom: 16px; }
.human-layout { align-items: start; }
.human-person-link { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.human-person-link:focus-visible { text-decoration: underline; }
@media (hover: hover) { .human-person-link:hover { text-decoration: underline; } }
.human-card { display: grid; gap: 16px; }
.human-card > header h3, .human-card h4 { margin: 0; }
.human-card dl { margin-top: 0; }
.human-card__actions, .human-card__events { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.human-action--off { display: grid; gap: 4px; justify-items: start; }
.human-action--off p { margin: 0; }
.human-events { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: 13px; }
.human-form form { display: grid; gap: 6px; }
.human-table td .refresh, .human-table td .human-action { margin: 2px 4px 2px 0; }
/* DQ-326 · «Організації», «Підключення», «Мої сервіси», переключатель
   организации. Та же политика: только раскладка, цвета — наследуются или
   из токенов (--line), кегли не заводятся. */
.human-card__mailboxes, .human-card__services { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
/* DQ-457: окна 4–6 макета «Люди». Только существующие цвета палитры. */
.human-context { display: inline-block; padding: 2px 8px; border: 1px solid var(--line); border-radius: 7px; background: #f8f5ed; color: #6b786f; font-size: 11.5px; white-space: nowrap; }
.human-context--staff { border-color: #b9d3bd; background: #f1f7f2; color: #476958; }
.human-context--client { border-color: #f1b76d; background: #f2e6cf; color: #865f2d; }
.human-card__head { align-items: center; gap: 12px; }
.human-card__head > div { flex: 1 1 auto; min-width: 0; }
.human-avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--pine); color: #f7f3e8; font-size: 14px; font-weight: 600; }
.human-card__id { display: block; margin-top: 2px; color: #6b786f; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; }
.human-overview-split { align-items: start; }
.human-bounds { display: grid; gap: 10px; }
.human-bounds h3 { margin: 0; }
.human-bounds p { margin: 0; color: #6b786f; font-size: 12.5px; line-height: 1.5; }
.human-bounds strong { color: var(--ink); font-weight: 600; }
.system-dialog__details { display: grid; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.system-dialog__detail { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.system-dialog__detail:first-child { border-top: 0; }
.system-dialog__detail dt { margin: 0; color: #6b786f; font-size: 12.5px; letter-spacing: normal; text-transform: none; }
.system-dialog__detail dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.system-dialog__detail--danger dt { color: #9b3b2f; font-weight: 500; }
.system-dialog__note { margin: 0 0 20px; color: #6b786f; font-size: 12.5px; line-height: 1.55; }
.human-list { display: grid; gap: 8px; margin: 0; padding-left: 18px; }
.human-list li > .detail-row { margin-top: 6px; }
.human-services-group p { margin: 0 0 4px; }
.human-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0 0 16px; }
.human-me__level { margin: 0 0 16px; }
.human-view--me { display: grid; gap: 16px; }
.human-connections { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.human-connection { display: grid; gap: 10px; }
.human-connection header h4, .human-connection header p, .human-connection h5 { margin: 0; }
.human-connection__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; padding-top: 10px; border-top: 1px solid var(--line); }
.org-switcher { display: grid; gap: 4px; min-width: 220px; }
.org-switcher select { width: 100%; }
/* DQ-330 · картка організації: власник, службовці, відповідальність.
   Только раскладка; цвета наследуются, граница — токен --line. */
.human-org-cards { display: grid; gap: 12px; margin: 0 0 16px; }
.human-org-card { display: grid; gap: 10px; }
.human-org-card > summary { cursor: pointer; }
.human-org-card p, .human-org-card h5 { margin: 0; }
.human-org-card section { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
/* Правила на экране сотрудников (норма ИР-20): строка видна всегда. */
.human-rules { display: grid; gap: var(--human-rules-gap); min-width: 0; }
.human-rules__line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--human-rules-gap); }
.human-rules p, .human-rules ul { margin: 0; overflow-wrap: anywhere; }
.human-rules__toggle { min-height: var(--tap-target); min-width: var(--tap-target); }

/* DQ-348: поиск по инструкциям в окне справки. Цвета и радиусы — те же, что
   у командной палитры и панели помощи: своих значений здесь нет. */
.topic-help-panel__search { margin: 8px 0 4px; }
.topic-help-panel__search input { width: 100%; min-height: 44px; font-size: 16px; padding: 8px 12px; border: 1px solid #ece2d1; border-radius: 10px; background: #fffdf8; }
.topic-help-results { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; max-height: 52svh; max-height: 52vh; overflow: auto; }
.topic-help-results li button { display: grid; gap: 2px; width: 100%; min-height: 44px; text-align: left; padding: 8px 12px; border: 1px solid #ece2d1; border-radius: 10px; background: #fffdf8; cursor: pointer; }
.topic-help-results li button:hover, .topic-help-results li button:focus-visible { border-color: #b79162; outline: none; }
.topic-help-results li small { color: #8c8a80; }
.topic-help-results li span { color: #8c8a80; font-size: 13px; }
.topic-help-doc { display: grid; gap: 8px; }
.topic-help-doc pre { max-height: 56svh; max-height: 56vh; overflow: auto; white-space: pre-wrap; margin: 0; padding: 8px 12px; border: 1px solid #ece2d1; border-radius: 10px; background: #fffdf8; }
/* DQ-414: блок кода в статье справки (SQL, pg_hba.conf) — как .topic-help-doc pre, без прокрутки по высоте. */
.topic-help-panel pre.topic-help-code { overflow: auto; white-space: pre; margin: 12px 0 0; padding: 8px 12px; border: 1px solid #ece2d1; border-radius: 10px; background: #fffdf8; font-size: 12.5px; }
.topic-help-panel__back { justify-self: start; min-height: 44px; padding: 8px 12px; border: 1px solid #ece2d1; border-radius: 10px; background: #fffdf8; cursor: pointer; }

/* DQ-351: мастер в окне справки. Цвета — только уже существующие в палитре. */
.topic-help-offers { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
.topic-help-offers li button { display: grid; gap: 2px; width: 100%; min-height: 44px; text-align: left; padding: 8px 12px; border: 1px solid #b79162; border-radius: 10px; background: #fffdf8; cursor: pointer; }
.topic-help-offers li small { color: #8c8a80; }
.wizard-steps { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.wizard-steps li { display: flex; gap: 8px; align-items: center; color: #8c8a80; }
.wizard-steps li.is-current { color: #8c673b; font-weight: 600; }
.wizard-steps li.is-done { color: #35633e; }
.wizard-steps__mark { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 10px; background: #ece2d1; }
.wizard-steps__mark--done { background: #dcebdd; color: #35633e; }
.wizard-steps__mark--blocked { background: #f2ddd9; color: #8f4237; }
.wizard-step { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #ece2d1; border-radius: 10px; background: #fffdf8; }
/* DQ-411: кнопки налезали друг на друга и терялись — своя сетка с переносом
   и тап-целью, дело стоит выше длинного пояснения. Цвета прежние. */
.wizard-step__head { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.wizard-step__head h4 { margin: 0; }
.wizard-step__state { font-size: 13px; color: #8c8a80; }
.wizard-step__state--done { color: #35633e; }
.wizard-step__state--blocked { color: #8f4237; font-weight: 600; }
.wizard-step__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wizard-step__actions button { min-height: 44px; padding: 8px 14px; border: 1px solid #cfd5c9; border-radius: 9px; background: #fff; font: inherit; cursor: pointer; }
.wizard-step__actions button.primary { border-color: var(--pine); background: var(--pine); color: #f7f3e8; font-weight: 600; }
.wizard-step__actions button[disabled] { opacity: .6; cursor: not-allowed; }
.wizard-step__explain { margin: 0; }
.wizard-step__more summary { cursor: pointer; }
.wizard-step__doc { justify-self: start; min-height: 44px; padding: 6px 0; border: 0; background: none; color: var(--pine); font: inherit; text-decoration: underline; cursor: pointer; }
.wizard-step__reason--blocked { color: #8f4237; }
.wizard-step__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wizard-step__actions button { min-height: 44px; padding: 8px 12px; border: 1px solid #ece2d1; border-radius: 10px; background: #fffdf8; cursor: pointer; }

/* DQ-355: список мастеров в «Налаштування». Цвета — существующие. */
.wizards-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wizards-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 12px; border: 1px solid #ece2d1; border-radius: 10px; background: #fffdf8; }
.wizards-list li small { display: block; color: #8c8a80; }
.wizards-list__questions { list-style: none; margin: 4px 0 0; padding: 0; color: #8c8a80; font-size: 13px; }

/* DQ-369: окно мастера длиннее статьи справки — содержимое прокручивается,
   заголовок и кнопка закрытия остаются на месте. Цвета не добавляются. */
.topic-help-panel--wizard { display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
.wizard-scroll { overflow: auto; display: grid; gap: 8px; align-content: start; }

/* DQ-378: карточка «PostgreSQL Родителя» (Налаштування → platform_storage).
   Кегль поля пароля и полей раздела — не меньше 16px и на десктопе:
   .production-field задаёт 12px подписи, поле наследовало бы его. */
:root {
  --platform-storage-tap: 44px;
  --platform-storage-gap: 12px;
}
.platform-storage .production-field input,
.platform-storage .production-field select,
.mail-settings .production-field input:not([type="checkbox"]) {
  font-size: 16px; /* шкала кеглей не расширяется: 16px в ней уже есть */
  min-height: var(--platform-storage-tap);
}
.platform-storage__secret,
.platform-storage__result { display: grid; gap: var(--platform-storage-gap); margin-top: var(--platform-storage-gap); }
/* DQ-401: раскладка карточки строками. Адреса — на всю ширину; порт и
   тайм-аут узкие; режим TLS — не меньше половины колонки, чтобы расшифровка
   пункта читалась целиком; кнопки — отдельной строкой с отступом сверху. */
:root {
  --platform-storage-narrow: 8rem;
  --platform-storage-field-min: 12rem;
  --platform-storage-tls-min: 50%;
  --platform-storage-actions-gap: calc(var(--platform-storage-gap) * 2);
}
.platform-storage__grid { display: grid; gap: var(--platform-storage-gap); }
.platform-storage__row { display: flex; flex-wrap: wrap; gap: var(--platform-storage-gap); align-items: flex-end; }
.platform-storage__field { flex: 1 1 var(--platform-storage-field-min); min-width: 0; }
.platform-storage__field input,
.platform-storage__field select { width: 100%; box-sizing: border-box; }
.platform-storage__row--full .platform-storage__field { flex-basis: 100%; }
.platform-storage__field--narrow { flex: 0 1 var(--platform-storage-narrow); }
.platform-storage__field--tls { flex: 2 1 var(--platform-storage-tls-min); }
.platform-storage__field--wide { flex: 3 1 var(--platform-storage-field-min); }
.platform-storage__actions { margin-top: var(--platform-storage-actions-gap); }
.platform-storage__state { display: grid; gap: var(--platform-storage-gap); margin-top: var(--platform-storage-gap); }
.platform-storage__state p { margin: 0; }
.platform-storage__switch-block { display: grid; gap: var(--platform-storage-gap); margin-top: var(--platform-storage-actions-gap); }
/* DQ-385: кнопка-тумблер вместо флажка. Дорожка и бегунок — из
   существующих цветов (--pine включено, --line выключено, --cream бегунок):
   палитра заморожена. Тап-цель — вся кнопка (--platform-storage-tap); состояние
   ещё и словом рядом, цвет — не единственный признак. */
:root {
  --storage-toggle-track-w: 44px;
  --storage-toggle-track-h: 24px;
  --storage-toggle-knob: 18px;
  --storage-toggle-inset: 3px;
  --storage-toggle-radius: 999px;
  --storage-toggle-on: var(--pine);
  --storage-toggle-off: var(--line);
  --storage-toggle-knob-color: var(--cream);
  --storage-toggle-pad: 0 12px 0 6px;
  --storage-toggle-border: 1px solid var(--line);
}
.platform-storage__switch-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--platform-storage-gap); }
.platform-storage__switch-label { font-weight: 700; }
.platform-storage__toggle { display: inline-flex; align-items: center; gap: var(--platform-storage-gap); min-height: var(--platform-storage-tap); min-width: var(--platform-storage-tap); padding: var(--storage-toggle-pad); border: var(--storage-toggle-border); border-radius: var(--storage-toggle-radius); background: var(--storage-toggle-knob-color); color: var(--ink); font-weight: 700; }
.platform-storage__toggle-track { position: relative; flex: none; width: var(--storage-toggle-track-w); height: var(--storage-toggle-track-h); border-radius: var(--storage-toggle-radius); background: var(--storage-toggle-off); transition: background .15s ease; }
.platform-storage__toggle-knob { position: absolute; top: var(--storage-toggle-inset); left: var(--storage-toggle-inset); width: var(--storage-toggle-knob); height: var(--storage-toggle-knob); border-radius: var(--storage-toggle-radius); background: var(--storage-toggle-knob-color); transition: transform .15s ease; }
.platform-storage__toggle.is-on .platform-storage__toggle-track { background: var(--storage-toggle-on); }
.platform-storage__toggle.is-on .platform-storage__toggle-knob { transform: translateX(calc(var(--storage-toggle-track-w) - var(--storage-toggle-knob) - 2 * var(--storage-toggle-inset))); }
.platform-storage__toggle:disabled { cursor: not-allowed; opacity: .6; }
.platform-storage__toggle:focus-visible { outline: var(--platform-storage-help-outline); outline-offset: var(--platform-storage-help-gap); }
/* DQ-385: раздел «Налаштування → Люди». */
.human-storage__actions { margin-top: var(--platform-storage-gap); }
.human-storage__actions .developments-action { min-height: var(--platform-storage-tap); }
/* DQ-450: доступное обновление — спокойный тон, не красный. */
.human-storage__update { margin: var(--platform-storage-gap) 0 0; color: var(--ink); }
.platform-storage__state .is-calm { color: var(--ink); }
.human-storage__report { display: grid; gap: var(--platform-storage-gap); margin-top: var(--platform-storage-gap); }
.human-storage__link { display: inline-flex; align-items: center; min-height: var(--platform-storage-tap); margin-left: var(--platform-storage-help-gap); color: var(--ink); font-weight: 700; }
/* DQ-414: значок «?» у подписи поля. Видимый размер — как у значка
   пиктограммы; тап-цель 44×44 — прозрачным псевдоэлементом, видимый
   размер не меняется. Цвета — существующие (подпись, is-warn — тон
   предупреждения #a85c1b из замороженной палитры). */
:root {
  --platform-storage-help-icon: 16px;
  --platform-storage-help-gap: 4px;
  --platform-storage-help-outline: 2px solid var(--ink);
}
.platform-storage__caption { display: inline-flex; align-items: center; gap: var(--platform-storage-help-gap); }
.platform-storage__help { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--platform-storage-help-icon); height: var(--platform-storage-help-icon); padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.platform-storage__help .lucide-icon { width: var(--platform-storage-help-icon); height: var(--platform-storage-help-icon); }
.platform-storage__help::before { content: ""; position: absolute; left: 50%; top: 50%; width: var(--platform-storage-tap); height: var(--platform-storage-tap); transform: translate(-50%, -50%); }
.platform-storage__help:focus-visible { outline: var(--platform-storage-help-outline); outline-offset: var(--platform-storage-help-gap); }
.platform-storage__fill { align-self: flex-end; min-height: var(--platform-storage-tap); }
:root { --settings-outcome-warn: #a85c1b; }
.settings-outcome .is-warn { color: var(--settings-outcome-warn); }
.platform-storage__role-line { display: block; }
/* DQ-440: ссылка у поля «Користувач» и блок «Підготовка сервера PostgreSQL 18».
   Поле кода — моноширинное, переносы строк сохраняются; фон и рамка — те же,
   что у поля команды диагностики (палитра заморожена). Тап-цели — --platform-storage-tap. */
:root {
  --platform-storage-code-bg: #f8f5ed;
  --platform-storage-code-border: 1px solid #eae5da;
  --platform-storage-code-radius: 10px;
  --platform-storage-code-pad: 8px 10px;
}
.platform-storage__user { display: grid; gap: var(--platform-storage-help-gap); }
.platform-storage__link { display: inline-flex; align-items: center; justify-self: start; min-height: var(--platform-storage-tap); padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 700; text-decoration: underline; cursor: pointer; }
.platform-storage__prep { display: grid; gap: var(--platform-storage-gap); margin-top: var(--platform-storage-actions-gap); padding-top: var(--platform-storage-gap); border-top: var(--platform-storage-code-border); }
.platform-storage__prep h4,
.platform-storage__prep h5,
.platform-storage__prep p { margin: 0; }
.platform-storage__prep h4:focus-visible { outline: var(--platform-storage-help-outline); outline-offset: var(--platform-storage-help-gap); }
.platform-storage__prep-step { display: grid; gap: var(--platform-storage-help-gap); }
.platform-storage__code { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--platform-storage-gap); }
.platform-storage__code pre { flex: 1 1 var(--platform-storage-field-min); min-width: 0; max-width: 100%; margin: 0; padding: var(--platform-storage-code-pad); overflow-x: auto; white-space: pre; border: var(--platform-storage-code-border); border-radius: var(--platform-storage-code-radius); background: var(--platform-storage-code-bg); font-family: var(--mono, ui-monospace, monospace); }
.platform-storage__copy { min-height: var(--platform-storage-tap); min-width: var(--platform-storage-tap); }
/* DQ-408: блок тревоги «потребує уваги» на экране «Люди». Не полоса во всю
   ширину и не серый «замок»: компактный блок в тёплом тоне предупреждения.
   Цвета — те же, что у «описано, не измерено» схемы и архитектурной метки
   мониторинга (#f7eadc / #a85c1b): палитра заморожена, новых нет. */
:root {
  --attention-block-bg: #f7eadc;
  --attention-block-ink: #a85c1b;
  --attention-block-max: 44rem;
  --attention-block-gap: 10px;
  --attention-block-pad: 10px 14px;
  --attention-block-radius: 10px;
  --attention-block-after: 16px;
  --attention-block-icon: 18px;
  --attention-block-link-pad: 4px 12px;
  --attention-block-outline: 2px;
  --attention-block-tap-bleed: -10px -4px;
}
.human-attention { display: flex; flex-wrap: wrap; align-items: center; gap: var(--attention-block-gap); max-width: var(--attention-block-max); margin: 0 0 var(--attention-block-after); padding: var(--attention-block-pad); border: 1px solid var(--attention-block-ink); border-radius: var(--attention-block-radius); background: var(--attention-block-bg); color: var(--ink); }
.human-attention > .lucide-icon { flex: none; width: var(--attention-block-icon); height: var(--attention-block-icon); color: var(--attention-block-ink); }
.human-attention p { flex: 1 1 16rem; margin: 0; font-size: 13px; /* шкала кеглей заморожена (§6.12): 13px в ней уже есть */ line-height: 1.5; }
.human-attention__link { display: inline-flex; align-items: center; padding: var(--attention-block-link-pad); border: 1px solid var(--attention-block-ink); border-radius: var(--attention-block-radius); color: var(--attention-block-ink); font-weight: 700; white-space: nowrap; text-decoration: none; }
.human-attention__link:focus-visible { outline: var(--attention-block-outline) solid var(--attention-block-ink); outline-offset: var(--attention-block-outline); }
@media (hover: hover) { .human-attention__link:hover { background: var(--cream); } }
/* Тап-цель не меньше 44px — прозрачным псевдоэлементом, видимый размер прежний. */
.human-attention__link { position: relative; }
.human-attention__link::after { position: absolute; inset: var(--attention-block-tap-bleed); content: ""; }
.human-select-hint { margin: 0 0 var(--attention-block-gap); }
.settings-map-fold { margin-bottom: var(--attention-block-after); }
.settings-map-fold > summary { cursor: pointer; font-weight: 700; }
[data-settings-section-focus]:focus { outline: none; }
[data-settings-section-focus]:focus-visible { outline: var(--attention-block-outline) solid var(--attention-block-ink); outline-offset: var(--attention-block-outline); }
/* DQ-388: карточка «Публічний доступ» (Налаштування → public_access) и окно
   «Вхід адміністратора з іншого комп’ютера». Поля — не меньше 16px, тап-цель —
   44px (те же переменные, что у карточки PostgreSQL Родителя). */
.public-access .production-field input:not([type="checkbox"]),
.public-access .production-field select {
  font-size: 16px; /* шкала кеглей не расширяется: 16px в ней уже есть */
  min-height: var(--platform-storage-tap);
}
.public-access .production-field--check { display: flex; align-items: center; gap: var(--platform-storage-gap); min-height: var(--platform-storage-tap); }
.public-access__help { display: grid; gap: var(--platform-storage-gap); margin-top: var(--platform-storage-gap); }
.public-access__help summary { min-height: var(--platform-storage-tap); display: flex; align-items: center; cursor: pointer; }
.public-access__nginx { display: grid; gap: var(--platform-storage-gap); }
.public-access__nginx pre { overflow-x: auto; max-width: 100%; margin: 0; font-family: var(--mono, ui-monospace, monospace); }
.remote-admin-entry__way { display: grid; gap: var(--platform-storage-gap); margin-top: var(--platform-storage-gap); }
.remote-admin-entry .diagnostic-fix code { overflow-wrap: anywhere; }
/* DQ-526: кнопка «показати пароль» в любом поле passwordField; тап-цель 44px. */
.password-field { position: relative; display: block; }
.password-field > input { width: 100%; box-sizing: border-box; padding-right: 48px; }
/* DQ-552: два класса в селекторе — не декоративный выбор, а необходимая
   специфичность. `.password-field` используется во множестве форм
   (`.auth-form`, `.module-builder-form`, `.module-development-panel footer`
   и другие), а каждая из них задаёт свой генерик `<форма> button {
   background: #1d3027; color: #fff; }` — два токена специфичности против
   одного у голого `.password-reveal`. Обёртывающее правило побеждало
   всюду, и тихая кнопка «показати пароль» превращалась в сплошной тёмный
   квадрат с белым значком. Понижать до одного класса нельзя без того же
   бага. */
.password-field .password-reveal { position: absolute; top: 0; bottom: 0; right: 2px; width: 40px; min-height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; opacity: 0.7; cursor: pointer; }
.password-field .password-reveal:hover, .password-field .password-reveal:focus-visible, .password-field .password-reveal[aria-pressed="true"] { opacity: 1; }
.password-field .password-reveal:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }
.password-field .password-reveal .lucide-icon { width: 18px; height: 18px; margin: 0; }
.password-reveal__word { font-size: 11px; }

/* DQ-530: экран «Пошта» — шесть блоков по порядку дела. Поля и строки —
   общие классы карточки PostgreSQL (platform-storage__row/__field), здесь
   только раскладка блоков; значения — существующие токены. */
:root {
  --mail-block-rule: var(--platform-storage-code-border);
}
.mail-settings__block { display: grid; gap: var(--platform-storage-gap); margin-top: var(--platform-storage-actions-gap); padding-top: var(--platform-storage-gap); border-top: var(--mail-block-rule); }
.mail-settings__block h4,
.mail-settings__block p { margin: 0; }
.mail-settings__switch { display: grid; gap: var(--platform-storage-help-gap); }
.mail-settings__switch .switch-control { min-height: var(--platform-storage-tap); }
.mail-settings__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--platform-storage-help-gap); }

/* DQ-605: коды восстановления Admin Core — показываются один раз, моноширинно */
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(14ch, 1fr)); gap: 8px 16px; margin: 16px 0; padding-left: 2.4em; font-family: var(--mono, ui-monospace, monospace); }
.recovery-codes-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
/* DQ-605: раздел восстановления внутри карточки доступа — строки «сведение + действие» */
.access-recovery { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.access-recovery h4 { margin: 0 0 6px; }
.access-recovery__note { margin: 0 0 14px; }
.access-recovery__row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-top: 12px; }
.access-recovery__row label { display: grid; flex: 1 1 18rem; gap: 7px; }

/* DQ-629: «Рентген ПК» (screens/brama-xray.js) — собственный облик модуля по макету
   Архитектора, слово Архитектора 2026-09-29: «все модули будут разные и не будут иметь
   один стиль». Вся палитра и гарнитуры экрана — ОДНИМ блоком токенов `.brama-xray`
   ниже (маркеры DQ-629-XRAY-TOKENS); компоненты берут только var(--xray-*). Палитра
   оболочки и «Брами» по-прежнему заморожена: проверки (test_ui_touch_environment,
   test_ui_fonts) исключают из подсчёта только этот блок. Шрифты макета (Chakra Petch,
   IBM Plex Sans, JetBrains Mono) названы стеком с системной заменой: CSP проекта
   (font-src 'self') внешние шрифты не пускает, вендорить файлы — отдельный пермит. */
/* DQ-629-XRAY-TOKENS:BEGIN */
.brama-xray {
  --xray-bg: #0F1219;
  --xray-panel: #171B25;
  --xray-panel2: #1E2330;
  --xray-line: #2A3142;
  --xray-ink: #E8EBF2;
  --xray-dim: #9AA3B8;
  --xray-mute: #6B7489;
  --xray-hot: #FF8A3D;
  --xray-on-hot: #1A0F05;
  --xray-cool: #7FB4FF;
  --xray-cool-soft: rgba(127, 180, 255, .07);
  --xray-ok: #5FD19A;
  --xray-warn: #F2C14E;
  --xray-bad: #FF6B6B;
  --xray-info: #8FA8FF;
  --xray-disp: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --xray-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --xray-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
/* DQ-629-XRAY-TOKENS:END */
.brama-xray { display: grid; gap: clamp(24px, 2.4vw, 40px); min-width: 0; padding: clamp(16px, 2vw, 28px); border-radius: var(--brama-radius); background: var(--xray-bg); color: var(--xray-ink); font-family: var(--xray-body); }
.brama-xray__title, .brama-xray__verdict-title, .brama-xray__card-title, .brama-xray__h2, .brama-xray__ring-value b, .brama-xray__check b, .brama-xray__slot b, .brama-xray__mode { font-family: var(--xray-disp); }
.brama-xray__h2 { margin: 0; font-size: 24px; font-weight: 600; }
.brama-xray__host { margin: 0; color: var(--xray-mute); font-family: var(--xray-mono); font-size: 11px; }
.brama-xray__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--brama-gap); }
.brama-xray__title { margin: 0; font-size: 27px; font-weight: 700; }
.brama-xray__modes { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--xray-line); border-radius: var(--brama-radius-button); background: var(--xray-panel); }
.brama-xray__mode { padding: 6px 12px; border: 0; border-radius: 8px; background: none; color: var(--xray-dim); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.brama-xray__mode[aria-pressed="true"] { background: var(--xray-hot); color: var(--xray-on-hot); }
.brama-xray__mode:focus-visible { outline: 2px solid var(--xray-hot); outline-offset: 2px; }
.brama-xray__hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(16px, 2vw, 28px); align-items: center; }
.brama-xray__ring { position: relative; width: 150px; height: 150px; }
.brama-xray__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.brama-xray__ring circle { fill: none; stroke-width: 10; }
.brama-xray__ring-bg { stroke: var(--xray-line); }
.brama-xray__ring-arc { stroke: var(--xray-hot); stroke-linecap: round; }
.brama-xray__ring-value { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.brama-xray__ring-value b { color: var(--xray-hot); font-size: 30px; }
.brama-xray__ring-value small { color: var(--xray-dim); font-family: var(--xray-mono); font-size: 11px; }
.brama-xray__verdict { display: grid; gap: 6px; min-width: 0; }
.brama-xray__verdict-title { margin: 0; font-size: 27px; font-weight: 700; line-height: 1.15; }
.brama-xray__badges { display: grid; gap: 8px; min-width: 210px; }
.brama-xray__badge { display: grid; gap: 4px; padding: 9px 12px; border: 1px solid var(--xray-line); border-radius: var(--brama-radius-button); background: var(--xray-panel); font-size: 14px; }
.brama-xray__label { margin: 0; color: var(--xray-mute); font-family: var(--xray-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.brama-xray__sub { margin: 0; color: var(--xray-dim); font-size: 13px; overflow-wrap: anywhere; }
.brama-xray__mono { font-family: var(--xray-mono); font-variant-numeric: tabular-nums; }
.brama-xray__na { color: var(--xray-mute); font-style: italic; }
.brama-xray__section { display: grid; gap: var(--brama-gap); min-width: 0; }
.brama-xray__section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.brama-xray__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--brama-gap); }
.brama-xray__card { display: grid; gap: 12px; align-content: start; min-width: 0; padding: 16px; border: 1px solid var(--xray-line); border-radius: var(--brama-radius); background: var(--xray-panel); }
.brama-xray__card.is-focus { border-color: var(--xray-hot); }
.brama-xray__card.is-soon { border-style: dashed; }
.brama-xray__card-head { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.brama-xray__card-title { margin: 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.brama-xray__pic { position: relative; display: grid; place-items: center; width: 96px; height: 72px; border-radius: var(--brama-radius-button); background: var(--xray-panel2); color: var(--xray-cool); }
.brama-xray__pic svg { width: 80px; height: 56px; }
.brama-xray__pic i { position: absolute; right: 4px; bottom: 3px; color: var(--xray-dim); font-family: var(--xray-mono); font-size: 9px; font-style: normal; }
.brama-xray__rows { display: grid; margin: 0; border-top: 1px solid var(--xray-line); }
.brama-xray__rows div { display: grid; grid-template-columns: 44% minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--xray-line); font-size: 13px; }
.brama-xray__rows dt { color: var(--xray-dim); }
.brama-xray__rows dd { margin: 0; overflow-wrap: anywhere; }
.brama-xray__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.brama-xray__tag { padding: 3px 7px; border-radius: 6px; background: var(--xray-panel2); color: var(--xray-dim); font-family: var(--xray-mono); font-size: 11px; }
.brama-xray__tag--ok { color: var(--xray-ok); }
.brama-xray__tag--off { color: var(--xray-bad); text-decoration: line-through; }
.brama-xray__tag--soon { border: 1px solid var(--xray-warn); color: var(--xray-bad); }
.brama-xray__slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.brama-xray__slot { display: grid; place-content: center; min-height: 54px; border: 1px dashed var(--xray-line); border-radius: 8px; color: var(--xray-dim); font-family: var(--xray-mono); font-size: 11px; text-align: center; }
.brama-xray__slot.is-on { border: 1px solid var(--xray-cool); background: var(--xray-cool-soft); color: var(--xray-ink); }
.brama-xray__slot b { display: block; color: var(--xray-cool); font-size: 14px; }
.brama-xray__meter { display: grid; gap: 5px; }
.brama-xray__meter-line { display: flex; justify-content: space-between; gap: 8px; color: var(--xray-dim); font-family: var(--xray-mono); font-size: 12px; }
.brama-xray__track { display: block; height: 8px; overflow: hidden; border-radius: 4px; background: var(--xray-panel2); }
.brama-xray__track i { display: block; height: 100%; border-radius: 4px; background: var(--xray-cool); }
.brama-xray__bar .brama-xray__track i { background: var(--xray-hot); }
.brama-xray__disks { display: grid; gap: 8px; }
.brama-xray__disk { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.brama-xray__disk-ic { color: var(--xray-cool); }
.brama-xray__disk-ic svg { width: 34px; height: 26px; }
.brama-xray__disk small { display: block; color: var(--xray-dim); font-family: var(--xray-mono); font-size: 11px; }
.brama-xray__two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--brama-gap); }
.brama-xray__bars { display: grid; gap: 12px; }
.brama-xray__bar { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 14px; }
.brama-xray__bar > span:last-child { text-align: right; }
.brama-xray__fit { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 8px; }
.brama-xray__fit-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--xray-panel2); font-size: 13px; }
.brama-xray__fit-item b { font-family: var(--xray-mono); font-size: 11px; white-space: nowrap; }
.brama-xray__fit-item[data-state="ok"] b { color: var(--xray-ok); }
.brama-xray__fit-item[data-state="no"] b { color: var(--xray-bad); }
.brama-xray__fit-item[data-state="limited"] b { color: var(--xray-warn); }
.brama-xray__flag[data-severity="info"] .brama-xray__tag { color: var(--xray-info); }
.brama-xray__flag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--xray-panel2); font-size: 13px; }
.brama-xray__flag[data-severity="critical"], .brama-xray__flag[data-severity="warning"] { border: 1px solid var(--xray-warn); }
.brama-xray__note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--brama-radius-button); background: var(--xray-panel2); }
.brama-xray__note > i { flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--xray-dim); }
.brama-xray__note[data-level="ok"] > i { background: var(--xray-ok); }
.brama-xray__note[data-level="bad"] > i { background: var(--xray-bad); }
.brama-xray__note[data-level="muted"] { border: 1px dashed var(--xray-warn); }
.brama-xray__note[data-level="muted"] > i { background: var(--xray-warn); }
.brama-xray__checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.brama-xray__check { display: grid; gap: 6px; padding: 12px; border-radius: 8px; background: var(--xray-panel2); }
.brama-xray__check b { color: var(--xray-ok); font-size: 22px; }
.brama-xray__check[data-ok="no"] b { color: var(--xray-bad); }
.brama-xray__check b small { margin-left: 3px; color: var(--xray-dim); font-family: var(--xray-mono); font-size: 12px; }
.brama-xray__ifs { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.brama-xray__ifs small { display: block; color: var(--xray-dim); font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .brama-xray__hero { grid-template-columns: auto minmax(0, 1fr); }
  .brama-xray__badges { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); min-width: 0; }
}
@media (max-width: 520px) {
  .brama-xray__hero { grid-template-columns: minmax(0, 1fr); }
  .brama-xray__ring { width: 120px; height: 120px; }
  .brama-xray__card-head { grid-template-columns: 72px minmax(0, 1fr); }
  .brama-xray__pic { width: 72px; height: 60px; }
  .brama-xray__pic svg { width: 60px; height: 44px; }
  .brama-xray__slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* «Мій простір» (BRAMA-W2, кодекс Брамы ПР-4, ПР-6, ПР-12) — screens/brama-prostir.js.
   Цвета — только токены --brama-* выше; отступы, радиусы и тень — токены корня
   .prostir. Кегли — значения замороженной шкалы проекта. */
.brama-page.prostir {
  --prostir-act: var(--brama-warn);
  --prostir-down: var(--brama-danger-text);
  --prostir-space-1: 4px;
  --prostir-space-2: 8px;
  --prostir-space-3: 12px;
  --prostir-space-4: 16px;
  --prostir-space-5: 24px;
  --prostir-space-6: 48px;
  --prostir-radius-s: 8px;
  --prostir-radius-m: var(--brama-radius-button);
  --prostir-radius-l: var(--brama-radius);
  --prostir-radius-round: 999px;
  --prostir-tap: 44px;
  --prostir-shadow: 0 30px 60px -20px var(--brama-shade);
  --prostir-wrap: 1320px;
  --prostir-blur: 10px;
  --prostir-ico-main: 52px;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 15px;
  line-height: 1.5;
}
.prostir button, .prostir input { font: inherit; color: inherit; }
.prostir :focus-visible { outline: 2px solid var(--brama-mint); outline-offset: 2px; }
.prostir__eyebrow { font-family: var(--brama-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--brama-text-muted); }

/* шапка */
.prostir__bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; box-sizing: border-box; display: flex; align-items: center; gap: var(--prostir-space-3); min-height: 64px; padding: 0 max(var(--prostir-space-4), env(safe-area-inset-right, 0px), calc((100% - var(--prostir-wrap)) / 2 + var(--prostir-space-4))) 0 max(var(--prostir-space-4), env(safe-area-inset-left, 0px), calc((100% - var(--prostir-wrap)) / 2 + var(--prostir-space-4))); border-bottom: 1px solid var(--brama-line); background: color-mix(in srgb, var(--brama-ink) 88%, transparent); backdrop-filter: blur(var(--prostir-blur)); -webkit-backdrop-filter: blur(var(--prostir-blur)); }
.prostir__mark { display: flex; align-items: center; gap: var(--prostir-space-2); margin: 0; }
.prostir .prostir__wordmark { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.prostir__glyph svg { display: block; width: 26px; height: 26px; color: var(--brama-mint); }
.prostir__ask { position: relative; flex: 1 1 340px; max-width: 520px; margin-left: var(--prostir-space-3); }
.brama-page .prostir__ask input:not([type="checkbox"]):not([type="radio"]) { width: 100%; min-height: var(--prostir-tap); padding: 0 120px 0 42px; border: 1px dashed var(--brama-line); border-radius: var(--prostir-radius-m); background: var(--brama-panel); font-size: 16px; cursor: not-allowed; }
.prostir__ask-ico svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--brama-text-muted); }
.prostir__mic { position: absolute; right: var(--prostir-space-3); top: 50%; display: inline-flex; align-items: center; gap: var(--prostir-space-1); transform: translateY(-50%); color: var(--brama-text-muted); }
.prostir__mic svg { width: 17px; height: 17px; }
.prostir__who { position: relative; margin-left: auto; min-width: 0; }
.prostir__me { display: flex; align-items: center; gap: var(--prostir-space-2); min-width: var(--prostir-tap); min-height: var(--prostir-tap); padding: 0 var(--prostir-space-2); border: 1px solid var(--brama-line); border-radius: var(--prostir-radius-round); background: transparent; cursor: pointer; }
.prostir__avatar { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brama-ink2); font-weight: 600; font-size: 13px; }
.prostir__name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prostir__menu { position: absolute; top: calc(100% + var(--prostir-space-2)); right: 0; min-width: 240px; padding: var(--prostir-space-1); border: 1px solid var(--brama-line); border-radius: var(--prostir-radius-m); background: var(--brama-panel); box-shadow: var(--prostir-shadow); }
.prostir__menu button { display: flex; align-items: center; gap: var(--prostir-space-3); width: 100%; min-height: var(--prostir-tap); padding: 0 var(--prostir-space-3); border: 0; border-radius: var(--prostir-radius-s); background: none; cursor: pointer; text-align: left; }
.prostir__menu hr { margin: var(--prostir-space-2) var(--prostir-space-1); border: 0; border-top: 1px solid var(--brama-line); }
.prostir__menu svg { width: 18px; height: 18px; color: var(--brama-text-muted); }
@media (max-width: 900px) { .prostir__ask { display: none; } }
@media (max-width: 560px) { .prostir__name { display: none; } }

/* тело */
.prostir__main { box-sizing: border-box; width: 100%; min-width: 0; max-width: var(--prostir-wrap); margin: 0 auto; padding: var(--prostir-space-5) max(var(--prostir-space-4), env(safe-area-inset-right, 0px)) var(--prostir-space-6) max(var(--prostir-space-4), env(safe-area-inset-left, 0px)); }
.brama-page .prostir__hello .prostir__title { margin: var(--prostir-space-1) 0; font-weight: 600; font-size: clamp(25px, 2.6vw, 34px); letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.prostir__hello .prostir__eyebrow { display: block; }
.prostir__hello p, .prostir__lead { margin: 0; color: var(--brama-text-muted); }
.prostir__error { padding: var(--prostir-space-3); border-left: 4px solid var(--brama-danger-border); border-radius: var(--prostir-radius-s); background: var(--brama-danger-bg); color: var(--brama-danger-text); }
.prostir__focus { display: flex; flex-wrap: wrap; gap: var(--prostir-space-2); margin-top: var(--prostir-space-4); }
.prostir__fbtn { display: flex; align-items: center; gap: var(--prostir-space-2); min-width: var(--prostir-tap); min-height: 48px; padding: 0 var(--prostir-space-4); border: 1px solid var(--brama-line); border-radius: var(--prostir-radius-l); background: var(--brama-panel); cursor: pointer; font-weight: 600; }
.prostir .prostir__fbtn { color: var(--brama-text-muted); }
.prostir__fbtn svg { width: 20px; height: 20px; }
.prostir__fbtn small { font-family: var(--brama-mono); font-size: 10.5px; color: var(--brama-mint); text-transform: uppercase; letter-spacing: .06em; }
.prostir .prostir__fbtn[aria-pressed="true"] { color: var(--brama-text); border-color: var(--brama-mint); background: var(--brama-notice-bg); }
.prostir__fbtn[aria-pressed="true"] svg { color: var(--brama-mint); }
.prostir__incoming { margin-top: var(--prostir-space-4); }
.prostir__layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--prostir-space-5); margin-top: var(--prostir-space-5); }
.prostir__layout--side { grid-template-columns: 210px minmax(0, 1fr) 330px; }
.prostir__side { display: grid; gap: var(--prostir-space-3); align-content: start; min-width: 0; }
.prostir__side .prostir__incoming { margin-top: 0; }
/* «скоро»: блоки колонки и фокусы макета, для которых данных ещё нет — не нажимаются */
.prostir__soon { display: grid; gap: var(--prostir-space-2); min-width: 0; padding: var(--prostir-space-4); border: 1px dashed var(--brama-line); border-radius: var(--prostir-radius-l); background: var(--brama-panel); }
.prostir__soon-head { display: flex; align-items: center; justify-content: space-between; gap: var(--prostir-space-2); }
.prostir__soon .prostir__eyebrow { display: inline-flex; align-items: center; gap: var(--prostir-space-2); }
.prostir__soon .prostir__eyebrow svg { width: 16px; height: 16px; }
.prostir__soon p { margin: 0; color: var(--brama-text-muted); font-size: 13px; }
.prostir__soon-mark { padding: var(--prostir-space-1) var(--prostir-space-2); border: 1px solid var(--brama-line); border-radius: var(--prostir-radius-round); color: var(--brama-text-muted); font-family: var(--brama-mono); font-size: 10.5px; font-style: normal; letter-spacing: .06em; text-transform: uppercase; }
.prostir .prostir__fbtn.is-soon { border-style: dashed; background: transparent; cursor: default; }
.prostir .prostir__fbtn.is-soon small { color: var(--brama-text-muted); }
.prostir__rail { display: grid; gap: var(--prostir-space-1); align-content: start; min-width: 0; }
.prostir__rail .prostir__eyebrow { padding: 0 var(--prostir-space-2) var(--prostir-space-2); }
.prostir__rail button { display: flex; align-items: center; gap: var(--prostir-space-2); min-width: var(--prostir-tap); min-height: var(--prostir-tap); padding: 0 var(--prostir-space-2); border: 0; border-radius: var(--prostir-radius-m); background: none; cursor: pointer; text-align: left; }
.prostir .prostir__rail button { color: var(--brama-text-muted); }
.prostir__rail button svg { flex: none; width: 18px; height: 18px; }
.prostir__rail button span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.prostir__rail button em { font-style: normal; font-family: var(--brama-mono); font-size: 11.5px; }
.prostir .prostir__rail button[aria-pressed="true"] { background: var(--brama-ink2); color: var(--brama-text); font-weight: 600; }
.prostir__rail .is-org { border: 1px dashed var(--brama-line); }
.prostir .prostir__rail button.is-org[aria-pressed="true"] { border-color: var(--brama-blue); }
.prostir__rail .is-org svg { color: var(--brama-blue); }
.prostir__keys-wrap { min-width: 0; }
.prostir__ctx { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--prostir-space-1) var(--prostir-space-4); margin-bottom: var(--prostir-space-3); }
.prostir__ctx h2 { margin: 0; font-size: 19px; }
.prostir__ctx p { margin: 0; color: var(--brama-text-muted); font-size: 13px; }
@media (max-width: 1200px) {
  .prostir__layout, .prostir__layout--side { grid-template-columns: 200px minmax(0, 1fr); }
  .prostir__side { grid-column: 1 / -1; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
}
@media (max-width: 760px) {
  .prostir__layout, .prostir__layout--side { grid-template-columns: minmax(0, 1fr); }
  .prostir__rail { display: flex; overflow-x: auto; overscroll-behavior: contain; gap: var(--prostir-space-2); scrollbar-width: none; }
  .prostir__rail .prostir__eyebrow { display: none; }
  .prostir__rail button { flex: none; padding: 0 var(--prostir-space-3); border: 1px solid var(--brama-line); border-radius: var(--prostir-radius-round); }
  .prostir__focus { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .prostir__fbtn { flex: none; }
}

/* кнопки простору */
.prostir__keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--prostir-space-3); }
.prostir__key { display: grid; grid-template-rows: auto auto auto 1fr; gap: var(--prostir-space-2); min-width: 0; min-height: 172px; padding: var(--prostir-space-4); border: 1px solid var(--brama-line); border-radius: var(--prostir-radius-l); background: var(--brama-panel); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.prostir__key[aria-disabled="true"] { cursor: default; }
.prostir__key-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--prostir-space-2); }
.prostir__ico { display: grid; place-items: center; width: var(--prostir-tap); height: var(--prostir-tap); border-radius: var(--prostir-radius-m); background: var(--brama-ink2); color: var(--brama-mint); }
.prostir__ico svg { width: 22px; height: 22px; }
.prostir__key-name { font-size: 17px; font-weight: 700; line-height: 1.25; }
.prostir__key-space { font-family: var(--brama-mono); font-size: 11px; color: var(--brama-text-muted); }
.prostir__key-foot { display: grid; gap: var(--prostir-space-2); align-self: end; }
.prostir__key-hint { color: var(--brama-text-muted); font-size: 13px; }
.prostir__go { justify-self: end; display: inline-flex; align-items: center; gap: var(--prostir-space-1); font-weight: 600; font-size: 13px; color: var(--brama-mint); }
.prostir__go svg { width: 16px; height: 16px; }
.prostir__key.is-main { grid-column: span 2; border-color: color-mix(in srgb, var(--brama-mint) 55%, var(--brama-line)); background: linear-gradient(130deg, var(--brama-notice-bg), var(--brama-panel) 65%); }
.prostir__key.is-main .prostir__ico { width: var(--prostir-ico-main); height: var(--prostir-ico-main); }
.prostir__key.is-main .prostir__key-name { font-size: 20px; }
.prostir__key.is-act { border-color: var(--prostir-act); }
.prostir__key.is-act .prostir__go { color: var(--prostir-act); }
.prostir__key.is-down .prostir__ico { color: var(--prostir-down); }
.prostir__key.is-off { background: transparent; border-style: dashed; }
.prostir__key.is-off .prostir__ico { color: var(--brama-text-muted); }
@media (max-width: 760px) { .prostir__key.is-main { grid-column: auto; } }
.prostir__state { display: inline-flex; align-items: center; gap: var(--prostir-space-1); font-size: 12.5px; color: var(--brama-text-muted); text-align: right; }
.prostir__state::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.prostir__state.is-on { color: var(--brama-mint); }
.prostir__state.is-act { color: var(--prostir-act); }
.prostir__state.is-down { color: var(--prostir-down); }
.prostir__legend { display: flex; flex-wrap: wrap; gap: var(--prostir-space-2) var(--prostir-space-4); margin: var(--prostir-space-3) 0 0; }
.prostir__empty { grid-column: 1 / -1; display: grid; gap: var(--prostir-space-2); justify-items: start; padding: var(--prostir-space-5); border: 1px dashed var(--brama-line); border-radius: var(--prostir-radius-l); }
.prostir__empty p { margin: 0; color: var(--brama-text-muted); }

.prostir__pill { display: inline-flex; margin-left: var(--prostir-space-1); padding: var(--prostir-space-1) var(--prostir-space-2); border-radius: var(--prostir-radius-round); background: var(--brama-mint); color: var(--brama-mint-ink); font-style: normal; }
.prostir__note { font-size: 13px; }
.prostir__btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--prostir-space-2); min-width: var(--prostir-tap); min-height: var(--prostir-tap); padding: 0 var(--prostir-space-4); border: 1px solid var(--brama-line); border-radius: var(--prostir-radius-m); background: transparent; font-weight: 600; cursor: pointer; }
.prostir .prostir__btn--mint { background: var(--brama-mint); border-color: var(--brama-mint); color: var(--brama-mint-ink); }
.prostir__btn[disabled] { opacity: .5; cursor: not-allowed; }
/* ПМ-15: «Підключити сервіс» і номер ліцензії — панель у просторі організації */
.prostir__connect-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--prostir-space-2) var(--prostir-space-4); margin-bottom: var(--prostir-space-3); }
.prostir__license { display: flex; flex-wrap: wrap; align-items: center; gap: var(--prostir-space-1) var(--prostir-space-3); margin: 0; color: var(--brama-text-muted); font-size: 13px; overflow-wrap: anywhere; }
.prostir__license b { font-family: var(--brama-mono); color: var(--brama-text); }
.prostir__link { display: inline-flex; align-items: center; gap: var(--prostir-space-1); min-width: var(--prostir-tap); min-height: var(--prostir-tap); padding: 0 var(--prostir-space-2); border: 0; border-radius: var(--prostir-radius-s); background: none; color: var(--brama-mint); font-weight: 600; cursor: pointer; }
.prostir__connect { display: grid; gap: var(--prostir-space-3); justify-items: start; max-width: 560px; margin-bottom: var(--prostir-space-4); padding: var(--prostir-space-5); border: 1px solid var(--brama-mint); border-radius: var(--prostir-radius-l); background: var(--brama-panel); }
.prostir__connect h3 { margin: 0; font-size: 17px; }
.prostir__connect-services { display: grid; gap: var(--prostir-space-1); margin: 0; padding: 0; border: 0; }
.prostir__connect-services legend { margin-bottom: var(--prostir-space-1); padding: 0; color: var(--brama-text-muted); font-size: 13px; }
.prostir__connect-service { display: flex; align-items: center; gap: var(--prostir-space-2); min-height: var(--prostir-tap); cursor: pointer; }
.prostir__field { display: grid; gap: var(--prostir-space-1); width: 100%; }
.brama-page .prostir__field input { box-sizing: border-box; width: 100%; min-height: var(--prostir-tap); padding: 0 var(--prostir-space-3); border: 1px solid var(--brama-line); border-radius: var(--prostir-radius-m); background: var(--brama-ink2); font-family: var(--brama-mono); font-size: 16px; }
.prostir__connect .prostir__error { margin: 0; }
.prostir__connect-actions { display: flex; flex-wrap: wrap; gap: var(--prostir-space-2); }
/* Блок сервиса «Дані24 · шлюз» в просторе человека: секция, не кнопка — внутри поле и действия. */
.prostir__key--service { grid-template-rows: auto auto 1fr; align-content: start; cursor: default; }
.prostir__service-body, .prostir__service-form { display: grid; gap: var(--prostir-space-3); align-content: start; justify-items: start; min-width: 0; }
.prostir__service-form { width: 100%; max-width: 560px; }
.prostir__service-body .prostir__license { margin: 0; }
.prostir__service-form .prostir__error { margin: 0; }
@media (hover: hover) {
  .prostir__link:hover { text-decoration: underline; }
  .prostir__menu button:hover { background: var(--brama-ink2); }
  .prostir__key:not([aria-disabled="true"]):hover { border-color: var(--brama-mint); }
  .prostir__btn:not([disabled]):hover { border-color: var(--brama-mint); }
}
