/* Partneroom — дизайн-система (ARCHITECTURE.md §6.4).
   Світлий теплий фон, графітовий текст, один зелений акцент для головних дій і фокусу.
   Без градієнтів, glassmorphism, фіолетового, індиго й помаранчевого. Анімації 150–200 мс.
   Брейкпоінти: 768 і 1100 px. Нижче 768 px діалоги й форми — на весь екран.
   Стилі лише з цього файлу: inline style= і <style> блокує CSP.
   Теми «Вигляду» (фон, скло, шрифт, розмір, смуга й панель меню) — у themes.css поверх цих токенів. */

:root {
  --bg:#F7F5F0; --paper:#FCFBF8; --sunk:#F0EDE5;
  --ink:#1C2321; --ink-2:#3E4744; --muted:#5F6662;
  --line:#E4DFD5; --line-2:#D3CCBE;
  --acc:#1F6F5C; --acc-dark:#185747; --acc-t:#E2EEE9; --acc-t2:#EFF5F2;
  --terra:#C4572E; --terra-ink:#A4441F; --terra-t:#F6E7DF;
  --danger:#B42318; --danger-t:#FBE7E4;
  --warn:#93580A;   --warn-t:#F8EDD9;
  --ok:#2E6B34;     --ok-t:#E5F0E2;
  --neutral:#55605B; --neutral-t:#ECEBE5;
  --c1:#6B6F68; --c2:#7A6A55; --c3:#5E7356; --c4:#8A5A44;
  --c5:#8C7A2E; --c6:#4F6B78; --c7:#7D5C6A; --c8:#5B6B3A;
  --r-s:6px; --r-m:8px;
  /* Масштаб для «Вигляду» (themes.css): --k — шрифт (база 13/14/15/16 px), --k-ui — висоти й відступи (мʼякше).
     За замовчуванням 1, тобто поточний вигляд. */
  --k: 1; --k-ui: calc(1 + (var(--k) - 1) * .6);
  --s1:calc(4px * var(--k-ui)); --s2:calc(8px * var(--k-ui)); --s3:calc(12px * var(--k-ui));
  --s4:calc(16px * var(--k-ui)); --s5:calc(24px * var(--k-ui)); --s6:calc(32px * var(--k-ui));
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-s:calc(13px * var(--k)); --fs:calc(14px * var(--k)); --fs-l:calc(16px * var(--k));
  --fs-h:calc(20px * var(--k)); --fs-hero:40px;

  /* Похідні */
  --info:#3F5F6E; --info-t:#E6EDF0;          /* «В роботі» — статус, не акцент */
  --r-l:10px;
  --shadow-1: 0 1px 2px rgba(28,35,33,.05);
  --shadow-2: 0 6px 20px -6px rgba(28,35,33,.16), 0 2px 6px rgba(28,35,33,.06);
  --shadow-3: 0 20px 48px -12px rgba(28,35,33,.24), 0 4px 12px rgba(28,35,33,.08);
  --ring: 0 0 0 3px var(--acc-t);
  --ease: cubic-bezier(.2,.7,.2,1);
  --t-fast: 150ms; --t: 180ms;
  --topbar-h: calc(52px * var(--k-ui));
  /* Ширина смуги й панелі меню. На комп'ютері їх можна тягнути (shell-nav.js) — тоді діють --nav-rail-w / --nav-subnav-w,
     які theme-boot.js ставить на <html> до першого малювання (див. «Адаптивність», ≥1024 px). */
  --rail-w-default: calc(82px * var(--k-ui));
  --subnav-w-default: calc(236px * var(--k-ui));
  --rail-w: var(--rail-w-default);
  --subnav-w: var(--subnav-w-default);
  --bottom-h: 60px;

  /* Поверхні й оболонка через змінні — їх перекривають теми «Вигляду» (themes.css) */
  --paper-2:#FAF8F3; --hover:#F8F6F1; --line-3:#BFB6A5; --placeholder:#8C918D;
  --backdrop: rgba(28,35,33,.34);
  --topbar-bg: var(--bg);
  /* Смуга й панель меню без тем (themes.css задає кольори з «Вигляду»): світлі, спокійні */
  --rail-bg: var(--sunk); --rail-solid: var(--sunk); --rail-filter: none; --rail-line: var(--line);
  --rail-ink: var(--ink-2); --rail-icon: var(--muted); --rail-hover: rgba(28,35,33,.06); --rail-hover-ink: var(--ink);
  --rail-active-bg: var(--paper); --rail-active-ink: var(--ink); --rail-active-icon: var(--acc);
  --rail-active-ring: inset 0 0 0 1px var(--line), var(--shadow-1); --rail-bar: var(--acc); --rail-brand: var(--ink);
  --rail-focus: var(--acc);
  --sub-bg: var(--paper-2); --sub-filter: none; --sub-line: var(--line); --sub-title: var(--ink); --sub-ink: var(--ink-2);
  --sub-muted: var(--muted); --sub-hover: rgba(28,35,33,.05); --sub-hover-ink: var(--ink);
  --sub-active-bg: var(--acc-t2); --sub-active-ink: var(--ink); --sub-active-ring: none; --sub-bar: var(--acc);
  --sub-focus: var(--acc); --sub-counter-bg: var(--neutral-t); --sub-counter-ink: var(--ink-2);
  --sub-pop: var(--paper); --sub-pop-line: var(--line);
}

/* --- База ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs)/1.5 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
h1 { font-size: var(--fs-h); }
h2 { font-size: calc(16px * var(--k)); }
h3 { font-size: calc(14px * var(--k)); }
p { margin: 0; }
a { color: var(--acc-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img, svg { display: block; }
.icon { flex: none; }
button { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s4) 0; }
code, kbd { font-family: var(--mono); font-size: calc(12.5px * var(--k)); background: var(--sunk); border-radius: 4px; padding: 1px 5px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--acc-t); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s3); top: -48px; z-index: 100; background: var(--ink); color: var(--paper);
  padding: 8px 12px; border-radius: var(--r-s); transition: top var(--t-fast) var(--ease); }
.skip-link:focus { top: var(--s3); text-decoration: none; }

/* --- Утиліти ---------------------------------------------------------------- */
.muted { color: var(--muted); }
.small { font-size: var(--fs-s); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--s2); }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.stack--s { gap: var(--s2); }
.stack--l { gap: var(--s5); }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-2 { margin-top: var(--s2); } .mt-3 { margin-top: var(--s3); } .mt-4 { margin-top: var(--s4); } .mt-5 { margin-top: var(--s5); }
.mb-3 { margin-bottom: var(--s3); } .mb-4 { margin-bottom: var(--s4); }
.text-danger { color: var(--danger); } .text-warn { color: var(--warn); } .text-ok { color: var(--ok); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s4); }
.split { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: var(--s5); align-items: start; }

/* --- Оболонка кабінету ----------------------------------------------------------- */
/* Три тони, зліва направо: смуга розділів (найтемніша), панель пунктів розділу, основна область («Фон»).
   Розмітка — components/sidebar.html; кольори смуги й панелі — змінні --rail-* / --sub-* (themes.css);
   згортання панелі — core/js/shell-nav.js. На телефоні смуги й панелі немає — нижня панель (bottom_nav.html). */
.shell { display: flex; align-items: stretch; min-height: 100vh; }
.workspace { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4) 0 var(--s3);
  background: var(--topbar-bg); border-bottom: 1px solid var(--line);
}
.topbar__brand { display: none; flex: none; align-items: center; }
.topbar__spacer { flex: 1 1 auto; }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700;
  font-size: calc(15px * var(--k)); letter-spacing: -0.015em; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 22px; height: 22px; }

/* Смуга розділів: велика іконка й підпис під нею; активний розділ — заокруглена плитка.
   Фон — на ::before: так спливні меню всередині смуги розмивають справжню сторінку, а не саму смугу. */
.rail {
  position: sticky; top: 0; z-index: 32; align-self: flex-start; flex: none;
  width: var(--rail-w); height: 100vh; display: flex; flex-direction: column; padding: 0 0 10px;
  color: var(--rail-ink); border-right: 1px solid var(--rail-line);
  /* іконка росте разом зі смугою: 24 px за замовчуванням, 22–30 px на найвужчій і найширшій */
  --rail-glyph: clamp(22px, calc(24px + (var(--rail-w) - var(--rail-w-default)) * .12), 30px);
}
.rail::before, .subnav::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rail::before { background: var(--rail-bg); -webkit-backdrop-filter: var(--rail-filter); backdrop-filter: var(--rail-filter); }
.rail__brand { flex: none; display: grid; place-items: center; height: var(--topbar-h); margin-bottom: 6px;
  color: var(--rail-brand); border-radius: 12px; }
.rail__brand .brand__mark { width: 28px; height: 28px; transition: transform .3s var(--ease); }
.rail__brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.rail__list { list-style: none; margin: 0; padding: 0 8px; display: flex; flex-direction: column; gap: 4px; }
.rail__list--foot { margin-top: auto; padding-top: 8px; }
.rail__item { position: relative; }
.rail__link {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: calc(62px * var(--k-ui)); padding: 9px 3px 8px; border-radius: 12px; color: var(--rail-ink);
  text-align: center; text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.rail__link:hover { background: var(--rail-hover); color: var(--rail-hover-ink); text-decoration: none; }
.rail__link .icon { color: var(--rail-icon); transition: color .2s var(--ease), transform .25s var(--ease); }
.rail__link:hover .icon { color: var(--rail-hover-ink); transform: translateY(-1px); }
.rail__link.is-active { background: var(--rail-active-bg); color: var(--rail-active-ink); box-shadow: var(--rail-active-ring);
  animation: pr-tile-in .34s var(--ease); }
.rail__link.is-active .icon { color: var(--rail-active-icon); }
.rail__link.is-active::before { content: ""; position: absolute; left: -8px; top: 16px; bottom: 16px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--rail-bar); animation: pr-bar-in .42s var(--ease); }
.rail__icon { position: relative; display: grid; place-items: center; }
.rail__icon .icon { width: var(--rail-glyph); height: var(--rail-glyph); }
.rail__tip { display: none; }
.rail__label { max-width: 100%; font-size: calc(11px * var(--k)); font-weight: 600; line-height: 1.2; letter-spacing: -0.005em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  overflow-wrap: break-word; hyphens: manual; }
.rail__link.is-active .rail__label { font-weight: 680; }
.rail__badge { position: absolute; top: calc(4px * var(--k-ui)); left: calc(50% + 3px); min-width: calc(17px * var(--k-ui)); height: calc(16px * var(--k-ui));
  padding: 0 4px; font-size: calc(10px * var(--k)); box-shadow: 0 0 0 2px var(--rail-solid); }
.rail__toggle { display: grid; place-items: center; width: 100%; height: calc(36px * var(--k-ui)); padding: 0; border: 0;
  border-radius: 10px; background: transparent; color: var(--rail-icon); cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease); }
.rail__toggle:hover { background: var(--rail-hover); color: var(--rail-hover-ink); }
.rail__toggle .icon { transition: transform .3s var(--ease); }
:is(.rail, .subnav) :focus-visible { outline-color: var(--rail-focus); }
.subnav :focus-visible, .flyout :focus-visible { outline-color: var(--sub-focus); }
@keyframes pr-tile-in { from { background-color: transparent; box-shadow: none; } }
@keyframes pr-bar-in { from { opacity: 0; transform: scaleY(.25); } }

/* Панель пунктів розділу. Згорнута — ширина 0 (рух), пункти тоді випадають біля смуги (.flyout). */
.subnav {
  position: sticky; top: 0; z-index: 31; align-self: flex-start; flex: none;
  width: var(--subnav-w); height: 100vh; overflow: hidden;
  color: var(--sub-ink); border-right: 1px solid var(--sub-line);
  transition: width .3s var(--ease), opacity .24s var(--ease), border-color .3s var(--ease), visibility 0s linear 0s;
}
.subnav::before { background: var(--sub-bg); -webkit-backdrop-filter: var(--sub-filter); backdrop-filter: var(--sub-filter); }
.subnav__inner { width: var(--subnav-w); height: 100%; display: flex; flex-direction: column; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin; }
.subnav__head { flex: none; display: flex; align-items: center; height: var(--topbar-h); padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--sub-line); }
.subnav__title { font-size: calc(16px * var(--k)); font-weight: 680; letter-spacing: -0.015em; color: var(--sub-title);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subnav__nav { padding: 8px 10px 20px; }
/* Групи пунктів. Підзаголовок групи — мітка розділу, а не пункт: дрібні капітелі з розрядкою, приглушений колір
   (--sub-muted тримає AA ≥ 4,5:1 на кожному кольорі панелі, свій колір рахує theme-boot.js), тонка лінія праворуч
   до краю, більший відступ зверху; без наведення, підсвічування й курсора-руки. Пункти групи зсунуті вправо, тож
   мітка стоїть «над» ними, а не в їхньому ряду. Між групами без назви — розділювач. */
.subnav__group { display: flex; align-items: center; gap: 8px; margin: 20px 4px 6px 6px;
  font-size: calc(10.5px * var(--k)); font-weight: 650; line-height: 1.25; letter-spacing: .09em;
  text-transform: uppercase; color: var(--sub-muted); cursor: default; user-select: none; -webkit-user-select: none; }
.subnav__group::after { content: ""; flex: 1 1 auto; min-width: 12px; height: 1px;
  background: color-mix(in srgb, var(--sub-muted) 32%, transparent); }
.subnav__block:first-child > .subnav__group { margin-top: 8px; }
.subnav__block--titled > .subnav__list { padding-left: 6px; }
.subnav__sep { border: 0; border-top: 1px solid var(--sub-line); margin: 10px 12px 10px; }
.subnav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.subnav__link { position: relative; display: flex; align-items: center; gap: 8px; min-height: calc(36px * var(--k-ui));
  padding: 6px 10px 6px 12px; border-radius: 9px; color: var(--sub-ink); font-weight: 500; text-decoration: none;
  transition: background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease); }
.subnav__link:hover { background: var(--sub-hover); color: var(--sub-hover-ink); text-decoration: none; }
.subnav__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: transform .2s var(--ease); }
.subnav__link:hover .subnav__label { transform: translateX(2px); }
.subnav__link.is-active { background: var(--sub-active-bg); color: var(--sub-active-ink); font-weight: 650;
  box-shadow: var(--sub-active-ring); animation: pr-tile-in .34s var(--ease); }
.subnav__link.is-active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--sub-bar); animation: pr-bar-in .42s var(--ease); }
:is(.subnav, .flyout) .counter:not(.counter--red) { background: var(--sub-counter-bg); color: var(--sub-counter-ink); }
.rail .counter--red, :is(.subnav, .flyout) .counter--red { box-shadow: 0 0 0 1.5px var(--rail-solid); }
.subnav__link .nav__counts, .subnav__link > .counter { flex: none; }

/* Спливне меню розділу біля смуги (лише коли панель згорнута) — при наведенні або фокусі */
.flyout { display: none; position: absolute; left: calc(100% + 16px); top: var(--fly-top, 0px); z-index: 50;
  width: max-content; min-width: 216px; max-width: 280px; padding: 8px 8px 8px;
  background: var(--sub-pop); color: var(--sub-ink); border: 1px solid var(--sub-pop-line); border-radius: 14px;
  box-shadow: var(--shadow-3); text-align: left;
  opacity: 0; visibility: hidden; transform: translateX(-6px);
  transition: opacity .16s var(--ease), transform .18s var(--ease), visibility 0s linear .18s; }
.flyout::before { content: ""; position: absolute; top: 0; bottom: 0; left: -18px; width: 18px; }  /* мостик для миші */
.flyout__title { padding: 4px 12px 6px; font-size: calc(14px * var(--k)); font-weight: 680; color: var(--sub-title); }
.flyout .subnav__group { margin: 14px 4px 4px 6px; }
.flyout .subnav__block:first-child > .subnav__group { margin-top: 4px; }
.flyout .subnav__sep { margin: 8px 10px; }
.rail__item:hover > .flyout, .rail__item:focus-within > .flyout { opacity: 1; visibility: visible; transform: none;
  transition-delay: 0s; }
.rail__item.is-fly-closed > .flyout { opacity: 0; visibility: hidden; }
.rail__list--foot .flyout { top: auto; bottom: 0; }

.nav__counts { display: inline-flex; gap: 4px; }

/* Ручки ширини смуги й панелі — лише на комп'ютері (див. «Адаптивність», ≥1024 px); на планшеті й телефоні їх немає */
.nav-resize, .nav-resize-slot { display: none; }

/* Основна область: вміст починається одразу за панеллю меню з однаковим полем зліва й справа (32 px на комп'ютері,
   20 px на планшеті, 16 px на телефоні) і займає всю ширину — обмеження лише на дуже великих екранах (1680 px),
   притиснуте вліво, а не по центру. Заголовок, вкладки, панелі й таблиці стоять на одному лівому краї.
   --narrow — форми: та сама ліва межа, вужчий вміст. --wide лишився для сумісності (тепер так за замовчуванням). */
.main { flex: 1 1 auto; min-width: 0; outline: none; --page-px: 32px; --page-pt: calc(24px * var(--k-ui)); }
.main__inner { width: 100%; max-width: 1680px; margin: 0; padding: var(--page-pt) var(--page-px) 64px; }
.main__inner--narrow { max-width: calc(820px + 2 * var(--page-px)); }

/* Перемикач компанії */
.company-switch { position: relative; }
.company-switch__btn {
  display: inline-flex; align-items: center; gap: 8px; height: calc(34px * var(--k-ui)); padding: 0 10px 0 6px;
  border: 1px solid transparent; border-radius: var(--r-s); background: transparent; cursor: pointer;
  font-weight: 600; color: var(--ink); max-width: 280px;
}
.company-switch__btn:hover { background: var(--sunk); }
.company-switch__btn[aria-expanded="true"] { background: var(--paper); border-color: var(--line); }
.company-switch__btn.is-static { cursor: default; }
.company-switch__btn.is-static:hover { background: transparent; }
.company-switch__avatar {
  width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; flex: none;
  background: var(--acc-t); color: var(--acc-dark); font-size: calc(11px * var(--k)); font-weight: 700; letter-spacing: .02em;
}
.company-switch__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-switch__btn .icon { color: var(--muted); }

/* Дзвіночок */
.bell { position: relative; display: grid; place-items: center; width: calc(36px * var(--k-ui)); height: calc(36px * var(--k-ui)); border-radius: var(--r-s);
  color: var(--ink-2); }
.bell:hover { background: var(--sunk); color: var(--ink); text-decoration: none; }
.bell__badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--danger); color: #FFF; font-size: calc(10.5px * var(--k)); font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--topbar-bg); font-variant-numeric: tabular-nums;
}

/* Меню користувача */
.user-menu__btn {
  display: inline-flex; align-items: center; gap: 8px; height: calc(36px * var(--k-ui)); padding: 0 8px 0 4px;
  border: 1px solid transparent; border-radius: var(--r-s); background: transparent; cursor: pointer; color: var(--ink-2);
}
.user-menu__btn:hover { background: var(--sunk); color: var(--ink); }
.user-menu__btn[aria-expanded="true"] { background: var(--paper); border-color: var(--line); }
.user-menu__name { font-weight: 500; }

/* Нижня панель (телефон) */
.bottom-nav { display: none; }

/* --- Заголовок сторінки ---------------------------------------------------------- */
/* Ритм сторінки-списку (однаковий у всіх розділах): заголовок і підзаголовок → 20 → вкладки → 16 → фільтри
   (якщо є) → 12 → рядок «кількість · Колонки» → 8 → таблиця. Кнопки заголовка — на рівні назви. */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4);
  margin-bottom: calc(20px * var(--k-ui)); }
.page-header__text { min-width: 0; }
.page-header__back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: var(--fs-s);
  margin-bottom: 6px; }
.page-header__back:hover { color: var(--ink); text-decoration: none; }
.page-header__title { font-size: calc(22px * var(--k)); font-weight: 680; letter-spacing: -0.02em; }
.page-header__title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.page-header__subtitle { margin-top: 4px; color: var(--muted); max-width: 76ch; }
.page-header__note { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; max-width: 76ch;
  color: var(--muted); font-size: var(--fs-s); }
.page-header__note .icon { margin-top: 2px; }
.page-header__actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: -3px; }
.page-header:has(> .page-header__text > .page-header__back) > .page-header__actions {
  margin-top: calc(var(--fs-s) * 1.5 + 3px); }
.section-title { font-size: calc(15px * var(--k)); font-weight: 650; margin-bottom: var(--s3); }
.eyebrow { font-size: calc(12px * var(--k)); font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* --- Кнопки ----------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: calc(34px * var(--k-ui)); padding: 0 14px; border-radius: var(--r-s); cursor: pointer; white-space: nowrap;
  font: 600 calc(14px * var(--k))/1 var(--font); letter-spacing: -0.005em;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-1);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform 80ms var(--ease);
}
.btn:hover { background: var(--sunk); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--acc); }
.btn .icon { color: currentColor; }
.btn--primary { background: var(--acc); border-color: var(--acc); color: #FCFBF8; }
.btn--primary:hover { background: var(--acc-dark); border-color: var(--acc-dark); }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn--ghost:hover { background: var(--sunk); color: var(--ink); }
.btn--danger { color: var(--danger); border-color: #E9C3BD; }
.btn--danger:hover { background: var(--danger-t); border-color: #E2ABA3; }
.btn--danger-solid { background: var(--danger); border-color: var(--danger); color: #FFF; }
.btn--danger-solid:hover { background: #9A1D13; }
.btn--sm { height: calc(28px * var(--k-ui)); padding: 0 10px; font-size: calc(13px * var(--k)); }
.btn--lg { height: calc(42px * var(--k-ui)); padding: 0 20px; font-size: calc(15px * var(--k)); }
.btn--icon { width: calc(34px * var(--k-ui)); padding: 0; }
.btn--sm.btn--icon { width: calc(28px * var(--k-ui)); }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-color: rgba(28,35,33,.25) rgba(28,35,33,.25) rgba(28,35,33,.25) var(--ink);
  animation: pr-spin .7s linear infinite; }
.btn--primary.is-busy::after { border-color: rgba(252,251,248,.35) rgba(252,251,248,.35) rgba(252,251,248,.35) #FCFBF8; }
@keyframes pr-spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--acc-dark); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }

/* --- Форми ------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: var(--s4); }
.grid-2 > .field + .field, .grid-3 > .field + .field { margin-top: 0; }  /* у сітці відступ дає gap */
.field__label-row { display: flex; align-items: center; gap: 6px; }
.field__label { font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }
.field__req { color: var(--danger); margin-left: 2px; }
.field__help { font-size: calc(12.5px * var(--k)); color: var(--muted); }
.field__error { font-size: calc(12.5px * var(--k)); color: var(--danger); font-weight: 500; }
.form-error { padding: 10px 12px; border-radius: var(--r-s); background: var(--danger-t); color: var(--danger);
  font-weight: 500; font-size: var(--fs-s); }

.input,
.field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.field select, .field textarea, .filterbar select, .filterbar input[type="search"], .filterbar input[type="date"] {
  width: 100%; height: calc(36px * var(--k-ui)); padding: 0 10px; border-radius: var(--r-s);
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  font: 400 calc(14px * var(--k))/1.4 var(--font);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea, textarea.input { height: auto; min-height: 96px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-3); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus,
.filterbar select:focus, .filterbar input:focus {
  outline: none; border-color: var(--acc); box-shadow: var(--ring);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error input:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 3px var(--danger-t); }
::placeholder { color: var(--placeholder); }
select.input, .field select, .filterbar select {
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%235F6662' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.field input[type="checkbox"], .field input[type="radio"], .check input { accent-color: var(--acc); width: 16px; height: 16px; }
.check { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; line-height: 1.4; }
.check input { margin: 2px 0 0; flex: none; }
.char-counter { align-self: flex-end; font-size: calc(12px * var(--k)); color: var(--muted); font-variant-numeric: tabular-nums; }
.char-counter.is-over { color: var(--danger); }
.form-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s5); }

/* Перемикач (switch) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 34px; height: 20px;
  border-radius: 10px; background: var(--line-2); position: relative; cursor: pointer;
  transition: background var(--t-fast) var(--ease); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #FFF; box-shadow: 0 1px 2px rgba(28,35,33,.25); transition: transform var(--t-fast) var(--ease); }
.switch input:checked { background: var(--acc); }
.switch input:checked::after { transform: translateX(14px); }
.switch input:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.switch input:disabled { opacity: .5; cursor: not-allowed; }

/* Чекліст */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist__item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--r-s); background: var(--paper); cursor: pointer; }
.checklist__item input { accent-color: var(--acc); width: 16px; height: 16px; margin: 2px 0 0; flex: none; }
.checklist__item:has(input:checked) { background: var(--acc-t2); border-color: #CFE1D9; }
.checklist__item:has(input:checked) .checklist__text { color: var(--ink-2); }

/* --- Панелі й картки ----------------------------------------------------------------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-1); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 14px var(--s4); border-bottom: 1px solid var(--line); }
.panel__title { font-size: calc(14px * var(--k)); font-weight: 650; }
.panel__body { padding: var(--s4); }
.panel__foot { padding: 12px var(--s4); border-top: 1px solid var(--line); background: var(--paper-2);
  border-radius: 0 0 var(--r-m) var(--r-m); }
.panel + .panel { margin-top: var(--s4); }
.panel--flat { box-shadow: none; }
.panel--sunk { background: var(--sunk); border-color: transparent; box-shadow: none; }

.kpi { padding: 14px var(--s4); }
.kpi__label { font-size: var(--fs-s); color: var(--muted); font-weight: 500; }
.kpi__value { font-size: calc(26px * var(--k)); font-weight: 680; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi__delta { font-size: calc(12.5px * var(--k)); font-weight: 600; }
.kpi__delta--up { color: var(--ok); } .kpi__delta--down { color: var(--danger); }
.sparkline { width: 100%; height: 28px; margin-top: 6px; }
.sparkline polyline { fill: none; stroke: var(--acc); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }

/* --- Пілюлі, лічильники, чипи ---------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: calc(22px * var(--k-ui)); padding: 0 9px 0 8px; border-radius: 999px;
  font-size: calc(12.5px * var(--k)); font-weight: 600; white-space: nowrap; line-height: 1;
  background: var(--neutral-t); color: var(--neutral);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill--new { background: var(--neutral-t); color: var(--neutral); }
.pill--active { background: var(--info-t); color: var(--info); }
.pill--review { background: var(--warn-t); color: var(--warn); }
.pill--deferred { background: var(--neutral-t); color: var(--muted); }
.pill--deferred .dot { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.pill--done { background: var(--ok-t); color: var(--ok); }
.pill--cancelled { background: var(--neutral-t); color: var(--muted); }
.pill--cancelled .dot { background: var(--line-2); }
.pill--overdue { background: var(--danger-t); color: var(--danger); }
.pill--soon { background: var(--warn-t); color: var(--warn); }
.pill__sub { font-weight: 500; opacity: .85; }
.pill--btn { border: 0; cursor: pointer; }
.pill--btn:hover { filter: brightness(.97); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c1); flex: none; }
.dot--c1 { background: var(--c1) !important; } .dot--c2 { background: var(--c2) !important; }
.dot--c3 { background: var(--c3) !important; } .dot--c4 { background: var(--c4) !important; }
.dot--c5 { background: var(--c5) !important; } .dot--c6 { background: var(--c6) !important; }
.dot--c7 { background: var(--c7) !important; } .dot--c8 { background: var(--c8) !important; }

.turn { display: inline-flex; align-items: center; gap: 6px; height: calc(22px * var(--k-ui)); padding: 0 9px; border-radius: 999px;
  font-size: calc(12.5px * var(--k)); font-weight: 600; white-space: nowrap; }
.turn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.turn--us { background: var(--acc-t2); color: var(--acc-dark); box-shadow: inset 0 0 0 1px #D3E5DD; }
.turn--them { background: var(--terra-t); color: var(--terra-ink); }
.turn--both { background: var(--warn-t); color: var(--warn); }
.turn--none { background: var(--neutral-t); color: var(--muted); }
.turn--none::before { display: none; }

.counter { display: inline-grid; place-items: center; min-width: calc(20px * var(--k-ui)); height: calc(18px * var(--k-ui)); padding: 0 6px; border-radius: 9px;
  background: var(--neutral-t); color: var(--ink-2); font-size: calc(11.5px * var(--k)); font-weight: 650; line-height: 1;
  font-variant-numeric: tabular-nums; }
.counter--red { background: var(--danger); color: #FFF; }
.counter--acc { background: var(--acc); color: #FCFBF8; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: calc(22px * var(--k-ui)); padding: 0 8px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-size: calc(12.5px * var(--k)); font-weight: 550;
  white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; }
.chip--tier { background: var(--sunk); border-color: transparent; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }

.badge-new { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); display: inline-block; flex: none; }

/* Аватари */
.avatar { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--sunk); color: var(--ink-2); font-size: calc(11px * var(--k)); font-weight: 700; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px var(--line); }
.avatar--sm { width: 26px; height: 26px; font-size: calc(10.5px * var(--k)); }
.avatar--lg { width: 40px; height: 40px; font-size: calc(14px * var(--k)); }
.avatar--company { border-radius: 8px; background: var(--acc-t2); color: var(--acc-dark); box-shadow: inset 0 0 0 1px #D3E5DD; }
.avatar--them { background: var(--terra-t); color: var(--terra-ink); box-shadow: none; }

/* Етапи-точки */
.stage-dots { display: inline-flex; align-items: center; gap: 0; }
.stage-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1.5px var(--line-2); background: var(--paper); }
.stage-dot + .stage-dot { margin-left: 14px; }
.stage-dot + .stage-dot::before { content: ""; position: absolute; right: 10px; top: 4.25px; width: 14px; height: 1.5px;
  background: var(--line-2); }
.stage-dot--done { background: var(--acc); box-shadow: none; }
.stage-dot--done + .stage-dot::before { background: var(--acc); }
.stage-dot--active { background: var(--acc); box-shadow: inset 0 0 0 1.5px var(--acc), inset 0 0 0 3px var(--paper); }
.stage-dot--submitted { box-shadow: inset 0 0 0 1.5px var(--warn); background: var(--warn-t); }
.stage-dot--skipped { background: var(--line-2); box-shadow: none; }
.stage-label { font-size: var(--fs-s); color: var(--ink-2); }

/* --- Вкладки, сегменти, фільтри ------------------------------------------------------------- */
.tabs { display: flex; gap: var(--s5); border-bottom: 1px solid var(--line); margin-bottom: var(--s4); overflow-x: auto;
  scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__item { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 0 11px;
  color: var(--muted); font-weight: 550; white-space: nowrap; border: 0; background: none; cursor: pointer; }
.tabs__item:hover { color: var(--ink); text-decoration: none; }
.tabs__item.is-active { color: var(--ink); }
.tabs__item.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  border-radius: 2px 2px 0 0; background: var(--acc); }

.segmented { display: inline-flex; padding: 2px; border-radius: var(--r-s); background: var(--sunk); gap: 2px; }
.segmented__item { display: inline-flex; align-items: center; gap: 6px; height: calc(28px * var(--k-ui)); padding: 0 10px; border-radius: 5px;
  color: var(--ink-2); font-size: var(--fs-s); font-weight: 550; border: 0; background: transparent; cursor: pointer; }
.segmented__item:hover { color: var(--ink); text-decoration: none; }
.segmented__item.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }

.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s4); }
.filterbar select, .filterbar input[type="search"], .filterbar input[type="date"] { width: auto; height: calc(32px * var(--k-ui));
  font-size: var(--fs-s); }
.filterbar select { min-width: 132px; }
.filterbar__search { position: relative; }
.filterbar__search .icon { position: absolute; left: 9px; top: 7px; color: var(--muted); pointer-events: none; }
.filterbar__search input[type="search"] { padding-left: 32px; min-width: 220px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s3); }
.preset { display: inline-flex; align-items: center; gap: 6px; height: calc(28px * var(--k-ui)); padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-size: var(--fs-s); font-weight: 550; }
.preset:hover { border-color: var(--line-2); color: var(--ink); text-decoration: none; }
.preset.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* --- Таблиці --------------------------------------------------------------------------------- */
.table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); overflow-x: auto;
  box-shadow: var(--shadow-1); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs); }
.table th { text-align: left; font-size: calc(12.5px * var(--k)); font-weight: 600; color: var(--muted); padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--paper-2); }
.table th:first-child, .table td:first-child { padding-left: var(--s4); }
.table th:last-child, .table td:last-child { padding-right: var(--s4); }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast) var(--ease); }
.table tbody tr:hover { background: var(--hover); }
.table .num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table__primary { font-weight: 550; color: var(--ink); }
.table__primary a { color: inherit; }
.table__code { font-family: var(--mono); font-size: calc(12.5px * var(--k)); color: var(--muted); }
.row-link { color: inherit; }
.row-link:hover { text-decoration: none; color: var(--acc-dark); }

/* Список-рядки */
.list { list-style: none; margin: 0; padding: 0; }
.list__item { display: flex; align-items: center; gap: var(--s3); padding: 12px var(--s4); border-bottom: 1px solid var(--line); }
.list__item:last-child { border-bottom: 0; }
a.list__item { color: inherit; transition: background var(--t-fast) var(--ease); }
a.list__item:hover { background: var(--hover); text-decoration: none; }
.list__icon { width: 34px; height: 34px; border-radius: var(--r-s); display: grid; place-items: center; flex: none;
  background: var(--sunk); color: var(--ink-2); }
.list__title { font-weight: 600; color: var(--ink); }
.list__hint { font-size: var(--fs-s); color: var(--muted); }
.list__chevron { color: var(--line-2); }
a.list__item:hover .list__chevron { color: var(--muted); }

/* Порожній стан */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 56px var(--s5); }
.empty__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--sunk); color: var(--ink-2); margin-bottom: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.empty__body { display: flex; flex-direction: column; align-items: inherit; gap: 6px; }
.empty__title { font-size: calc(16px * var(--k)); font-weight: 650; }
.empty__text { color: var(--muted); max-width: 46ch; }
.empty__actions { margin-top: var(--s3); display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: center; }

/* Хронологія й тред */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline__item { position: relative; padding: 0 0 14px 24px; }
.timeline__item::before { content: ""; position: absolute; left: 1px; top: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.timeline__item--acc::before { background: var(--acc); box-shadow: none; }
.timeline__text { color: var(--ink); }
.timeline__meta { font-size: calc(12.5px * var(--k)); color: var(--muted); margin-top: 2px; }

.msg { display: flex; gap: 10px; padding: 10px 0; }
.msg__body { min-width: 0; flex: 1 1 auto; }
.msg__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: var(--fs-s); }
.msg__author { font-weight: 650; color: var(--ink); }
.msg__company { color: var(--muted); }
.msg__time { color: var(--muted); font-size: calc(12px * var(--k)); }
.msg__source { font-size: calc(11.5px * var(--k)); color: var(--muted); padding: 1px 6px; border-radius: 4px; background: var(--sunk); }
.msg__text { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--mine .msg__text { color: var(--ink); }
.msg--system { color: var(--muted); font-size: var(--fs-s); padding: 6px 0; }

/* Блок «Зараз» (каркас для P1/P2) */
.now { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); box-shadow: var(--shadow-1);
  overflow: hidden; }
.now__head { display: flex; align-items: center; gap: var(--s2); padding: 12px var(--s4); background: var(--acc-t2);
  border-bottom: 1px solid #DCE9E3; font-weight: 650; }
.now__body { padding: 14px var(--s4); display: flex; flex-direction: column; gap: 6px; }
.now__actions { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 12px var(--s4);
  border-top: 1px solid var(--line); }
.now--them .now__head { background: var(--terra-t); border-bottom-color: #EED6CA; }

/* --- Канбан --------------------------------------------------------------------------------------- */
.kanban { display: flex; gap: var(--s3); overflow-x: auto; padding-bottom: var(--s3); align-items: flex-start;
  scroll-snap-type: x proximity; }
.kanban__col { flex: 0 0 calc(272px * var(--k-ui)); display: flex; flex-direction: column; max-height: calc(100vh - 220px);
  background: var(--sunk); border-radius: var(--r-m); border: 1px solid transparent; scroll-snap-align: start;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.kanban__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; font-weight: 650; font-size: var(--fs-s); }
.kanban__head .counter { background: var(--paper); }
.kanban__group-label { font-size: calc(11.5px * var(--k)); font-weight: 650; color: var(--muted); letter-spacing: .04em;
  text-transform: uppercase; padding: 0 2px 6px; }
.kanban__cards { display: flex; flex-direction: column; gap: 6px; padding: 2px 8px 10px; overflow-y: auto; min-height: 56px; }
.kanban__col.is-over { background: var(--acc-t2); border-color: var(--acc); }
.kanban__col.is-locked .kanban__head { color: var(--muted); }
.kanban__col.is-locked.is-over-denied { border-color: var(--line-2); }
.kanban__col--danger .kanban__head { color: var(--danger); }
.kcard { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 9px 10px; box-shadow: var(--shadow-1); color: var(--ink); cursor: grab; touch-action: manipulation;
  user-select: none; -webkit-user-select: none; transition: box-shadow var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
.kcard:hover { border-color: var(--line-2); text-decoration: none; }
.kcard:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.kcard.is-locked { cursor: pointer; }
.kcard.is-dragging { opacity: .35; }
.kcard.is-lifted { box-shadow: 0 0 0 2px var(--acc), var(--shadow-2); }
.kcard__top { display: flex; align-items: center; gap: 6px; font-size: calc(12px * var(--k)); color: var(--muted); }
.kcard__code { font-family: var(--mono); font-size: calc(11.5px * var(--k)); }
.kcard__title { margin-top: 3px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.kcard__meta { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: calc(12px * var(--k)); color: var(--muted); }
.kcard__flag { color: var(--danger); font-weight: 700; }
.drag-ghost { position: fixed; z-index: 90; pointer-events: none; margin: 0; box-shadow: var(--shadow-3);
  transform-origin: 30% 20%; cursor: grabbing; }
.drop-marker { height: 3px; border-radius: 2px; background: var(--acc); margin: -1px 0; }

/* Сортований список */
.sortable { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sortable__item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--paper);
  border-bottom: 1px solid var(--line); }
.sortable__item:last-child { border-bottom: 0; }
.sortable__handle { display: grid; place-items: center; width: 24px; height: 28px; border: 0; background: none;
  color: var(--line-2); cursor: grab; border-radius: 4px; touch-action: none; flex: none; }
.sortable__handle:hover { color: var(--muted); background: var(--sunk); }
.sortable__item.is-dragging { opacity: .4; }
.sortable__item.is-locked .sortable__handle { cursor: default; color: var(--muted); background: none; }

/* --- Меню, підказки ---------------------------------------------------------------------------------- */
.menu { position: relative; display: inline-flex; }
.menu__panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 220px; max-width: 320px;
  padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2);
  animation: pr-pop var(--t) var(--ease); }
.menu--end .menu__panel, .menu__panel--end { left: auto; right: 0; }
.menu__panel--up { top: auto; bottom: calc(100% + 6px); }
.menu__item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: calc(34px * var(--k-ui)); padding: 6px 10px;
  border: 0; border-radius: 5px; background: none; color: var(--ink); font: 500 calc(14px * var(--k))/1.3 var(--font); text-align: left;
  cursor: pointer; }
.menu__item:hover, .menu__item:focus-visible { background: var(--sunk); text-decoration: none; outline: none; }
.menu__item .icon { color: var(--muted); }
.menu__item.is-current { font-weight: 650; }
.menu__item.is-current .icon--check { color: var(--acc); margin-left: auto; }
.menu__item--danger { color: var(--danger); }
.menu__item--danger .icon { color: var(--danger); }
.menu__label { padding: 8px 10px 4px; font-size: calc(12px * var(--k)); font-weight: 600; color: var(--muted); }
.menu__meta { margin-left: auto; font-size: calc(12px * var(--k)); color: var(--muted); font-weight: 400; }
.menu__head { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line);
  margin: 0 -4px 4px; padding-left: 14px; }
.menu__head span { font-size: calc(12.5px * var(--k)); color: var(--muted); }
.menu__sep { height: 1px; background: var(--line); margin: 4px -4px; }
.menu form { margin: 0; }
@keyframes pr-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.tip-btn { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: help; }
.tip-btn:hover, .tip-btn[aria-expanded="true"] { color: var(--acc-dark); background: var(--acc-t2); }
/* Заголовок блоку з кнопкою «i» поруч: <h2 class="… with-tip">Назва {% include info_tip %}</h2> */
.with-tip { display: flex; align-items: center; gap: 6px; }
.with-tip > .tip-btn { flex: none; }
/* Згорнутий блок для рідковживаного: <details class="more"><summary class="more__toggle">Більше налаштувань</summary>
   <div class="more__body">…</div></details> */
.more > .more__toggle { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; list-style: none;
  color: var(--acc-dark); font-size: var(--fs-s); font-weight: 600; user-select: none; -webkit-user-select: none; }
.more > .more__toggle::-webkit-details-marker { display: none; }
.more > .more__toggle::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform var(--t-fast) var(--ease); }
.more[open] > .more__toggle::after { margin-top: 3px; transform: rotate(-135deg); }
.more > .more__toggle:hover { text-decoration: underline; text-underline-offset: 2px; }
.more__body { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
.more__body > .field + .field { margin-top: 0; }
.tip-pop { position: fixed; z-index: 95; max-width: 280px; padding: 8px 10px; border-radius: var(--r-s);
  background: var(--ink); color: #F4F2EC; font-size: calc(12.5px * var(--k)); line-height: 1.45; box-shadow: var(--shadow-2);
  animation: pr-pop var(--t-fast) var(--ease); }

/* --- Діалоги й шухляди --------------------------------------------------------------------------------- */
dialog { color: var(--ink); }
.dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 1px solid var(--line);
  border-radius: var(--r-l); background: var(--paper); box-shadow: var(--shadow-3); overflow: auto;
  opacity: 0; transform: translateY(8px) scale(.99);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.dialog--s { width: min(400px, calc(100vw - 32px)); }
.dialog--l { width: min(720px, calc(100vw - 32px)); }
.dialog.is-open { opacity: 1; transform: none; }
.dialog::backdrop, .drawer::backdrop { background: var(--backdrop); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 16px 16px 4px 20px; }
.dialog__title { font-size: calc(16px * var(--k)); font-weight: 680; }
.dialog__body { padding: 8px 20px 20px; }
.dialog__text { color: var(--ink-2); }
.dialog__foot { display: flex; justify-content: flex-end; gap: var(--s2); margin: var(--s5) -20px -20px; padding: 12px 20px;
  border-top: 1px solid var(--line); background: var(--paper-2); border-radius: 0 0 var(--r-l) var(--r-l); }

.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(440px, 100vw); padding: 0; border: 0;
  border-left: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-3); overflow: auto;
  transform: translateX(24px); opacity: 0; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease); }
.drawer.is-open { transform: none; opacity: 1; }
.drawer__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); padding: 14px 16px 12px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.drawer__body { padding: 16px 20px 24px; }
.drawer--bottom { margin: auto 0 0; width: 100vw; max-width: 100vw; height: fit-content; max-height: 85vh; border-left: 0;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; transform: translateY(24px); }

/* Лист «Ще» на телефоні: усі розділи з пунктами (пункти — пілюлі, щоб розділ займав 1–2 рядки) */
.more-nav { padding: 6px 0 12px; }
.more-nav__section { padding: 10px var(--s4) 12px; border-bottom: 1px solid var(--line); }
.more-nav__section:last-child { border-bottom: 0; }
.more-nav__head { display: flex; align-items: center; gap: 10px; min-height: 40px; color: var(--ink); font-weight: 650;
  font-size: calc(15px * var(--k)); text-decoration: none; }
.more-nav__head:hover { text-decoration: none; }
.more-nav__head .icon { color: var(--muted); }
.more-nav__section.is-current .more-nav__head .icon { color: var(--acc); }
.more-nav__items { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.more-nav__link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-weight: 550; font-size: var(--fs-s);
  text-decoration: none; }
.more-nav__link:hover { text-decoration: none; border-color: var(--line-2); color: var(--ink); }
.more-nav__link.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.more-nav__link.is-active .counter:not(.counter--red) { background: rgba(255,255,255,.18); color: var(--paper); }

/* --- Тости --------------------------------------------------------------------------------------- */
.toasts { position: fixed; right: var(--s5); bottom: var(--s5); z-index: 120; display: flex; flex-direction: column;
  gap: var(--s2); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 11px 10px 11px 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2);
  position: relative; overflow: hidden; animation: pr-toast-in var(--t) var(--ease); }
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc); }
.toast--error::before { background: var(--danger); }
.toast--warn::before { background: var(--warn); }
.toast--info::before { background: var(--c6); }
.toast__icon { margin-top: 1px; color: var(--acc); }
.toast--error .toast__icon { color: var(--danger); }
.toast--warn .toast__icon { color: var(--warn); }
.toast--info .toast__icon { color: var(--c6); }
.toast__text { flex: 1 1 auto; min-width: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.toast__action { border: 0; background: none; color: var(--acc-dark); font-weight: 650; cursor: pointer; padding: 0 4px;
  white-space: nowrap; }
.toast__close { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 4px; flex: none; }
.toast__close:hover { background: var(--sunk); color: var(--ink); }
.toast.is-leaving { animation: pr-toast-out var(--t-fast) var(--ease) forwards; }
@keyframes pr-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pr-toast-out { to { opacity: 0; transform: translateY(6px); } }

/* --- Налаштування (хаб) ----------------------------------------------------------------------------- */
.settings-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s4); align-items: start; }
.settings-group__title { padding: 12px var(--s4) 10px; font-size: calc(12.5px * var(--k)); font-weight: 650; color: var(--muted);
  letter-spacing: .03em; text-transform: uppercase; border-bottom: 1px solid var(--line); }

/* --- Публічні сторінки й вхід ----------------------------------------------------------------------- */
.container { width: min(1120px, 100% - 32px); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.site-header__nav { display: flex; align-items: center; gap: var(--s2); }
.site-main { min-height: calc(100vh - 60px - 72px); }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: var(--fs-s); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer nav { display: flex; gap: var(--s4); flex-wrap: wrap; }

.hero { padding: 96px 0 72px; max-width: 760px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-s); font-weight: 550; }
.hero__title { font-size: var(--fs-hero); line-height: 1.12; letter-spacing: -0.03em; font-weight: 720; margin-top: 18px; }
.hero__lead { font-size: calc(18px * var(--k)); color: var(--ink-2); margin-top: 16px; max-width: 58ch; line-height: 1.55; }
.hero__actions { margin-top: 28px; display: flex; gap: var(--s2); flex-wrap: wrap; }

.auth { min-height: calc(100vh - 60px - 72px); display: grid; place-items: center; padding: 48px 16px; }
.auth__card { width: min(420px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-2); padding: 28px 28px 24px; }
.auth__title { font-size: calc(22px * var(--k)); font-weight: 700; letter-spacing: -0.02em; }
.auth__lead { color: var(--muted); margin-top: 6px; }
.auth__form { margin-top: 22px; }
.auth__submit { margin-top: 22px; }
.auth__alt { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-s);
  text-align: center; }
.auth__note { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-s); background: var(--acc-t2); color: var(--ink-2);
  font-size: var(--fs-s); }

.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.error-page__code { font-family: var(--mono); font-size: calc(13px * var(--k)); color: var(--muted); letter-spacing: .08em; }
.error-page__title { font-size: calc(26px * var(--k)); font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; }
.error-page__text { color: var(--muted); margin-top: 8px; max-width: 44ch; }
.error-page__actions { margin-top: 22px; display: flex; gap: var(--s2); justify-content: center; }

/* UI-кіт */
.kit-section { margin-bottom: var(--s6); }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.kit-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s2); }
.kit-swatch { border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: var(--paper);
  font-size: calc(12px * var(--k)); }
.kit-swatch__chip { height: 40px; }
.kit-swatch__name { padding: 6px 8px; font-family: var(--mono); color: var(--ink-2); }
.sw-bg { background: var(--bg); } .sw-paper { background: var(--paper); } .sw-sunk { background: var(--sunk); }
.sw-ink { background: var(--ink); } .sw-muted { background: var(--muted); } .sw-line { background: var(--line); }
.sw-acc { background: var(--acc); } .sw-acc-t { background: var(--acc-t); } .sw-terra { background: var(--terra); }
.sw-danger { background: var(--danger); } .sw-warn { background: var(--warn); } .sw-ok { background: var(--ok); }
.kit-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2); }
.kit-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line);
  border-radius: var(--r-s); background: var(--paper); font-size: calc(11.5px * var(--k)); color: var(--muted); font-family: var(--mono); }
.kit-icon .icon { color: var(--ink-2); }

/* --- Адаптивність --------------------------------------------------------------------------------------- */
/* Панель меню згорнута: на комп'ютері — за вибором (data-nav-desk), на планшеті — за замовчуванням
   (розгорнута лише з data-nav-tablet="open"). Атрибути ставить theme-boot.js до першого малювання. */
@media (min-width: 1024px) {
  html[data-nav-desk="collapsed"] .subnav { width: 0; opacity: 0; visibility: hidden; border-right-color: transparent;
    transition: width .3s var(--ease), opacity .18s var(--ease), border-color .3s var(--ease), visibility 0s linear .3s; }
  html[data-nav-desk="collapsed"] .flyout { display: block; }
  html[data-nav-desk="collapsed"] .rail__toggle .icon { transform: rotate(180deg); }

  /* Ширина смуги й панелі під себе: ручки на правому краї (shell-nav.js), збережена ширина — --nav-*-w від theme-boot.js.
     Згорнута панель лишається згорнутою, її ширина чекає, доки панель розгорнуть. Вміст сторінки — flex: 1, тож іде слідом. */
  :root { --rail-w: var(--nav-rail-w, var(--rail-w-default)); --subnav-w: var(--nav-subnav-w, var(--subnav-w-default)); }
  .nav-resize { display: block; position: absolute; top: 0; bottom: 0; width: 12px; z-index: 45;
    cursor: col-resize; touch-action: none; outline: none; }
  .nav-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px;
    border-radius: 2px; background: var(--rail-focus);
    box-shadow: 0 0 0 1px rgba(255,255,255,.6), 0 0 0 2px rgba(28,35,33,.16);
    opacity: 0; transition: opacity .15s var(--ease) .12s; }
  .nav-resize--subnav::after { background: var(--sub-focus); }
  .nav-resize::before { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 34px; margin: -17px 0 0 -4px;
    border-radius: 4px; background: var(--rail-focus); box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 0 0 2px rgba(28,35,33,.18);
    opacity: 0; transform: scaleY(.6); transition: opacity .15s var(--ease), transform .2s var(--ease); }
  .nav-resize--subnav::before { background: var(--sub-focus); }
  .nav-resize:hover::after, .nav-resize.is-dragging::after, .nav-resize:focus-visible::after { opacity: 1; transition-delay: 0s; }
  .nav-resize:focus-visible::before, .nav-resize.is-dragging::before { opacity: 1; transform: none; }
  .nav-resize--rail { right: -6px; }
  /* ручка панелі — поза <aside> (там overflow: hidden): нульова за шириною обгортка не займає місця в розкладці */
  .nav-resize-slot { display: block; position: sticky; top: 0; z-index: 33; align-self: flex-start; flex: none;
    width: 0; height: 100vh; }
  .nav-resize--subnav { left: -6px; }
  html[data-nav-desk="collapsed"] .nav-resize-slot { display: none; }
  /* під час перетягування — без анімації ширини, без виділення тексту, курсор — лише «ширина» */
  html.is-nav-resizing, html.is-nav-resizing * { cursor: col-resize !important; user-select: none !important;
    -webkit-user-select: none !important; }
  html.is-nav-resizing .subnav { transition: none; }
  html.is-nav-resizing :is(.flyout, .rail__tip) { display: none !important; }

  /* Вузька смуга (< 72 px): лише іконки; підпис лишається для читачів екрана, назва — у підказці поруч */
  html[data-rail-compact] .rail__list { padding: 0 6px; }
  html[data-rail-compact] .rail__link { min-height: calc(48px * var(--k-ui)); padding: 8px 2px; }
  html[data-rail-compact] .rail__link.is-active::before { left: -6px; top: 12px; bottom: 12px; }
  html[data-rail-compact] .rail__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; }
  html[data-rail-compact] .rail__tip { display: block; position: absolute; left: calc(100% + 12px); top: 50%; z-index: 60;
    padding: 5px 9px; border-radius: var(--r-s); background: var(--ink); color: #F4F2EC; box-shadow: var(--shadow-2);
    font-size: calc(12.5px * var(--k)); font-weight: 600; line-height: 1.3; white-space: nowrap; pointer-events: none;
    opacity: 0; visibility: hidden; transform: translate(-4px, -50%);
    transition: opacity .14s var(--ease), transform .16s var(--ease), visibility 0s linear .16s; }
  html[data-rail-compact]:not([data-nav-desk="collapsed"]) .rail__link:is(:hover, :focus-visible) .rail__tip {
    opacity: 1; visibility: visible; transform: translate(0, -50%); transition-delay: .12s, .12s, 0s; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  html:not([data-nav-tablet="open"]) .subnav { width: 0; opacity: 0; visibility: hidden; border-right-color: transparent;
    transition: width .3s var(--ease), opacity .18s var(--ease), border-color .3s var(--ease), visibility 0s linear .3s; }
  html:not([data-nav-tablet="open"]) .flyout { display: block; }
  html:not([data-nav-tablet="open"]) .rail__toggle .icon { transform: rotate(180deg); }
}
/* Невисокий екран: щільніша смуга, щоб усі розділи вмістилися */
@media (min-width: 768px) and (max-height: 700px) {
  .rail__brand { height: 48px; margin-bottom: 2px; }
  .rail__link { min-height: 50px; padding: 6px 3px 5px; gap: 3px; }
  .rail__list { gap: 2px; }
}

@media (max-width: 1099px) {
  .main { --page-px: 20px; }
  .split { grid-template-columns: minmax(0,1fr); }
  .settings-groups { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 767px) {
  body.app { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 var(--s2) 0 0; gap: 4px; }
  .topbar__brand { display: flex; padding-left: var(--s4); }
  .brand__name { display: none; }
  .company-switch__btn { max-width: 190px; }
  .user-menu__name, .user-menu__btn > .icon { display: none; }
  .rail, .subnav { display: none; }
  .main { --page-px: 16px; --page-pt: 16px; }
  .main__inner { padding-bottom: 40px; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header > .page-header__actions,
  .page-header:has(> .page-header__text > .page-header__back) > .page-header__actions { margin-top: 0; }
  .page-header__title { font-size: calc(20px * var(--k)); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0,1fr); }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column;
    grid-auto-columns: 1fr; height: calc(var(--bottom-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--line); }
  .bottom-nav__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; border: 0; background: none; color: var(--muted); font-size: calc(11px * var(--k)); font-weight: 600; cursor: pointer; }
  .bottom-nav__item:hover { text-decoration: none; color: var(--ink); }
  .bottom-nav__item.is-active { color: var(--acc-dark); }
  .bottom-nav__dot { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 17px; height: 16px; font-size: calc(10px * var(--k)); }
  .toasts { left: var(--s4); right: var(--s4); top: calc(var(--topbar-h) + 8px); bottom: auto; width: auto; }
  .dialog, .dialog--s, .dialog--l { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; margin: 0;
    border-radius: 0; border: 0; }
  .dialog__foot { position: sticky; bottom: -20px; border-radius: 0; }
  .drawer { width: 100vw; max-width: 100vw; }
  .tabs { gap: var(--s4); }
  .filterbar select, .filterbar__search input[type="search"] { flex: 1 1 140px; min-width: 0; }
  .filterbar__search { flex: 1 1 100%; }
  .kanban__col { flex-basis: 84vw; }
  .table-wrap--cards .table thead { display: none; }
  .table-wrap--cards .table, .table-wrap--cards .table tbody, .table-wrap--cards .table tr,
  .table-wrap--cards .table td { display: block; width: 100%; }
  .table-wrap--cards .table tr { padding: 10px var(--s4); border-bottom: 1px solid var(--line); }
  .table-wrap--cards .table td { border: 0; padding: 2px 0 !important; }
  .table-wrap--cards .table td.num { text-align: left; }
  .table-wrap--cards .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: calc(12.5px * var(--k)); }
  .hero { padding: 56px 0 40px; }
  .hero__title { font-size: calc(30px * var(--k)); }
  .auth__card { padding: 22px 18px 18px; border-radius: 10px; }
  .btn { height: calc(38px * var(--k-ui)); }
  .btn--sm { height: calc(32px * var(--k-ui)); }
}
