/* Кабинет сотрудника в новом виде (этап 2, шаг 9): шапка, главная, база клиентов, страница клиента.
   Разметка — public/staff-ui.js (классы sf-), общие компоненты — ui-kit.css, шапка — классы cd-top из client-day.css.
   Размеры текста — только переменные сайта, интервал --ui-leading; плотность — за счёт отступов. */

/* ---------- Шапка ---------- */
.sf-top {
  position: relative;
}
.sf-top .cd-top__hello b {
  font-size: var(--ui-card);
}
/* Длинное название раздела на телефоне — в две строки, а не многоточием (независимая проверка 11.11.2026:
   «Журнал действий с…», «Срочные вопросы…» на 390 px не читались). */
@media (max-width: 600px) {
  .sf-top .cd-top__hello b {
    display: -webkit-box;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}
@media (max-width: 360px) {
  .sf-top .cd-top__hello b {
    -webkit-line-clamp: 3;
  }
}
.sf-top__tools {
  display: flex;
  align-items: center;
  flex: none;
}
.sf-top__tools:empty {
  display: none;
}
body.ui-readable .sf-top :is(.sf-icon-btn, .sf-back) {
  display: grid;
  place-items: center;
  width: var(--ui-tap);
  height: var(--ui-tap);
  min-height: var(--ui-tap);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--ui-radius);
  background: transparent;
  box-shadow: none;
  color: var(--ui-green-dark);
  flex: none;
}
.sf-top :is(.sf-icon-btn, .sf-back) svg {
  width: 23px;
  height: 23px;
}
.sf-top--deep .cd-top__hello {
  padding-left: var(--ui-space-2);
}
/* Почта сотрудника (обращения и ящики) — значком в шапке, как раньше */
.sf-mail:empty {
  display: none;
}
body.ui-readable .sf-mail [data-mail='workspace'] {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--ui-tap);
  height: var(--ui-tap);
  min-height: var(--ui-tap);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ui-green-dark);
}
.sf-mail [data-mail='workspace'] svg {
  width: 23px;
  height: 23px;
}
.sf-mail [data-mail-count]:not(:empty) {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--ui-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.sf-mail [data-mail-count]:empty {
  display: none;
}
.sf-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sf-hue, var(--ui-sage));
  color: #fff;
  font-size: var(--ui-caption);
  font-weight: 600;
  line-height: 1;
  object-fit: cover;
  overflow: hidden;
}
.sf-avatar--me {
  width: 36px;
  height: 36px;
  background: var(--ui-sage);
  color: var(--ui-green-dark);
}
.sf-avatar--lg {
  width: 64px;
  height: 64px;
  font-size: var(--ui-card);
}
@media (max-width: 360px) {
  /* На самом узком экране в шапке — только раздел и его значки: логотип ведёт туда же, что «Главная»
     внизу, а «Обращения и почта» открываются из «Сообщений». */
  .sf-top .cd-top__brand,
  .sf-top .sf-mail {
    display: none;
  }
}
@media (max-width: 430px) {
  /* На телефоне слово «Путь» в шапке сотрудника скрыто — остаётся значок: место для названия раздела и значков */
  .sf-top .cd-top__brand span {
    display: none;
  }
}
.sf-av-lead {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: none;
}

/* ---------- Общее ---------- */
.sf-page {
  padding-bottom: var(--ui-space-6);
}
.sf-block {
  margin-top: var(--ui-space-4);
}
.sf-block:first-child {
  margin-top: 0;
}
.sf-lead {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.sf-lead svg {
  width: 22px;
  height: 22px;
}
.sf-lead--red {
  background: var(--ui-red-bg);
  color: var(--ui-red);
}
.sf-lead--amber {
  background: var(--ui-amber-bg);
  color: var(--ui-amber);
}
.sf-lead--gray {
  background: #eceeea;
  color: #4a5550;
}
.sf-lead--violet {
  background: #efe8f6;
  color: #6b3f8f;
}
.sf-lead--blue {
  background: var(--ui-blue-bg);
  color: var(--ui-blue);
}
.sf-num {
  font-size: var(--ui-card);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sf-num--red {
  color: var(--ui-red);
}
.sf-num--amber {
  color: var(--ui-amber);
}
.sf-num--ink {
  color: var(--ui-ink);
}
.sf-num--zero {
  color: var(--ui-muted);
}
.sf-red {
  color: var(--ui-red);
}
.sf-nw {
  white-space: nowrap;
}
.sf-empty {
  margin: 0;
  padding: var(--ui-space-5) var(--ui-row-pad-x);
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-cap {
  margin: var(--ui-space-2) 0 0;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-group > .ui-group__body > .ui-row:first-child {
  border-top: 1px solid var(--ui-rule-soft);
}
.sf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2) var(--ui-space-3);
  margin-top: var(--ui-space-2);
}
body.ui-readable :is(button, a).sf-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--ui-space-2);
  min-height: var(--ui-tap);
  padding: 0 var(--ui-space-5);
  box-shadow: inset 0 0 0 1px var(--ui-rule);
  font-size: var(--ui-caption);
  font-weight: 600;
  white-space: nowrap;
}
body.ui-readable button.sf-btn.ui-btn--primary {
  box-shadow: none;
}
.sf-btn svg {
  width: 18px;
  height: 18px;
}
.sf-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-3);
  margin: 0 0 var(--ui-space-4);
  padding: var(--ui-space-3) var(--ui-space-3) var(--ui-space-3) var(--ui-space-5);
  border-radius: var(--ui-radius);
  background: var(--ui-amber-bg);
  color: var(--ui-amber);
  font-size: var(--ui-caption);
}
.sf-as {
  display: flex;
  justify-content: center;
  margin-top: var(--ui-space-5);
}
/* Плашка «Непрочитанные уведомления» и ИИ-разбор над страницей — компактнее, как в макете */
body.workspace-staff .sf-layout .inbox-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-3);
  margin: 0 auto var(--ui-space-4);
  max-width: var(--ui-page-max);
  padding: var(--ui-space-3) var(--ui-space-3) var(--ui-space-3) var(--ui-space-5);
  border: 0;
  border-radius: var(--ui-radius);
  background: #fff4e3;
  color: #6b4a12;
  box-shadow: none;
}
body.workspace-staff .sf-layout .inbox-banner strong {
  flex: 1 1 12em;
  font-size: var(--ui-body);
  font-weight: 600;
}
body.workspace-staff .sf-layout .inbox-banner button {
  min-height: var(--ui-tap);
  margin: 0;
  border-radius: var(--ui-radius);
  background: #fff;
}
body.workspace-staff .sf-layout .sf-ai-notice {
  max-width: var(--ui-page-max);
  margin: 0 auto var(--ui-space-4);
}

/* ---------- Главная ---------- */
.sf-person {
  align-items: start;
}
.sf-person .sf-avatar {
  margin-top: 2px;
}
.sf-person__name {
  display: block;
  color: inherit;
  text-decoration: none;
}
.sf-person__name:hover .ui-row__title {
  text-decoration: underline;
}
.sf-more .ui-row__title {
  font-weight: 400;
  color: var(--ui-green);
}

/* ---------- База клиентов ---------- */
.sf-search {
  display: flex;
  align-items: center;
  gap: var(--ui-space-3);
  min-height: 48px;
  padding: 0 var(--ui-space-5);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  box-shadow: 0 0 0 1px var(--ui-rule);
  color: var(--ui-muted);
}
.sf-search svg {
  width: 22px;
  height: 22px;
  flex: none;
}
body.ui-readable .sf-search input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ui-ink);
  font-size: var(--ui-control);
}
body.ui-readable .sf-search input:focus {
  outline: none;
}
.sf-search:focus-within {
  box-shadow: 0 0 0 2px var(--ui-focus);
}
.sf-tabs {
  margin-top: var(--ui-space-2);
}
.sf-filterline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space-2) var(--ui-space-3);
  margin: var(--ui-space-3) 0 0;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-filterline span {
  margin-right: auto;
}
.sf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-1) var(--ui-space-5);
  margin: var(--ui-space-3) var(--ui-space-1) var(--ui-space-3);
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--ui-space-2);
}
.sf-legend span::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--sf-c);
}
.sf-c-yes {
  --sf-c: #5c9a78;
  fill: #5c9a78;
}
.sf-c-no {
  --sf-c: #e2b0aa;
  fill: #e2b0aa;
}
.sf-c-cycle {
  --sf-c: #d98fb0;
  fill: #d98fb0;
}
.sf-c-complaint {
  --sf-c: #b23c43;
  fill: #b23c43;
}
.sf-c-none {
  --sf-c: #e6e9e4;
  fill: #e6e9e4;
}
.sf-list {
  margin-top: var(--ui-space-2);
}
.sf-client + .sf-client {
  border-top: 1px solid var(--ui-rule);
}
.sf-client--urgent {
  box-shadow: inset 3px 0 0 var(--ui-red);
}
.sf-client .sf-row {
  align-items: center;
}
.sf-sub {
  display: block;
}
.sf-client__more {
  padding: 0 var(--ui-space-3) var(--ui-space-3) calc(var(--ui-row-pad-x) + 44px + var(--ui-space-4));
}
.sf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
  font-size: var(--ui-caption);
}
.sf-tags .ui-tag {
  min-height: 26px;
  padding: 0 var(--ui-space-3);
  font-size: var(--ui-caption);
}
.sf-tags .ui-tag svg {
  width: 15px;
  height: 15px;
}
.sf-line {
  margin: var(--ui-space-2) 0 0;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
  overflow-wrap: anywhere;
}
.sf-sent {
  display: inline-flex;
  align-items: center;
  min-height: var(--ui-tap);
  color: var(--ui-green);
  font-size: var(--ui-caption);
}
.sf-found {
  margin: var(--ui-space-3) var(--ui-space-1);
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}

/* Динамика за весь период: подпись | полоса | итог — одна сетка, итоги выровнены; общая ось времени */
.sf-dyn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px var(--ui-space-4);
  padding: 0 var(--ui-space-3) var(--ui-space-4) calc(var(--ui-row-pad-x) + 44px + var(--ui-space-4));
  font-size: var(--ui-caption);
}
.sf-dyn__l {
  color: var(--ui-ink);
}
.sf-dyn__b {
  min-width: 0;
}
.sf-dyn__n {
  color: var(--ui-muted);
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sf-dyn__n b {
  color: var(--ui-ink);
  font-weight: 600;
}
.sf-dyn__e {
  grid-column: 2 / 4;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-strip {
  display: block;
  width: 100%;
  height: 15px;
}
.sf-spark {
  display: block;
  width: 100%;
  height: 24px;
  color: var(--ui-green-dark);
}
.sf-dyn__axis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: var(--ui-space-3);
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
@media (max-width: 420px) {
  /* На узком экране — динамика и ярлыки во всю ширину строки */
  .sf-dyn,
  .sf-client__more {
    padding-left: var(--ui-row-pad-x);
  }
}

/* Окно «Фильтры» и настройки строки */
.sf-sheet .ui-form {
  margin-bottom: var(--ui-space-5);
}
.sf-sheet select {
  width: 100%;
  min-height: var(--ui-tap);
  margin: 0;
  font-size: var(--ui-control);
}
/* «Показать» и «Сбросить фильтры» — закреплены внизу окна, пока видна форма, как кнопки остальных окон
   (независимая проверка 11.11.2026: в первом кадре их срезал нижний край экрана). */
.sf-filter-form .ui-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 calc(-1 * var(--ui-space-6));
  padding: var(--ui-space-4) var(--ui-space-6) calc(var(--ui-space-4) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--ui-rule-soft);
  background: var(--ui-surface);
}
.sf-sheet-list,
.sf-setup {
  margin: var(--ui-space-4) 0;
}
.sf-setup__row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.sf-check {
  display: flex;
  align-items: center;
  gap: var(--ui-space-4);
  min-height: var(--ui-tap);
  margin: 0;
  font-size: var(--ui-body);
  cursor: pointer;
}
.sf-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
}
body.ui-readable .sf-setup .ui-icon-btn {
  width: var(--ui-tap);
  height: var(--ui-tap);
  min-height: var(--ui-tap);
  font-size: var(--ui-body);
}
body.ui-readable .sf-setup .ui-icon-btn:disabled {
  opacity: 0.35;
}
.sf-danger {
  color: var(--ui-red);
}

/* ---------- Страница клиента ---------- */
.sf-person-head {
  display: flex;
  align-items: center;
  gap: var(--ui-space-5);
}
.sf-person-head h1 {
  margin: 0;
  font-size: var(--ui-card);
  font-weight: 600;
  line-height: var(--ui-leading);
  overflow-wrap: anywhere;
}
.sf-person-head p {
  margin: var(--ui-space-1) 0 0;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-cl > .sf-tags {
  margin-top: var(--ui-space-4);
}
.sf-cl .sf-block {
  margin-top: var(--ui-space-4);
}
.sf-kv {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ui-space-3);
  padding: var(--ui-space-4) var(--ui-row-pad-x);
}
.sf-kv small {
  display: block;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-kv b {
  display: block;
  margin-top: 2px;
  font-size: var(--ui-card);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sf-kv b em {
  color: var(--ui-muted);
  font-size: var(--ui-caption);
  font-style: normal;
  font-weight: 400;
}
.sf-dline {
  display: flex;
  justify-content: space-between;
  gap: var(--ui-space-3);
  padding: var(--ui-space-3) var(--ui-row-pad-x);
  border-top: 1px solid var(--ui-rule-soft);
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-block > .sf-ai {
  border-top: 1px solid var(--ui-rule-soft);
}
.sf-ai__text {
  display: -webkit-box;
  margin-top: var(--ui-space-1);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--ui-ink);
  font-size: var(--ui-caption);
}
.sf-more-about {
  border-top: 1px solid var(--ui-rule-soft);
}
.sf-table-wrap {
  margin-top: var(--ui-space-4);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  box-shadow: 0 0 0 1px var(--ui-rule);
  overflow: clip;
}
.sf-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: var(--ui-body);
  font-variant-numeric: tabular-nums;
}
.sf-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: var(--ui-space-4) var(--ui-space-2);
  border-bottom: 2px solid var(--ui-rule);
  background: var(--ui-surface-soft);
  color: var(--ui-muted);
  font-size: var(--ui-caption);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}
.sf-table th:first-child {
  padding-left: var(--ui-row-pad-x);
  text-align: left;
}
.sf-table td {
  padding: var(--ui-space-3) var(--ui-space-2);
  border-top: 1px solid var(--ui-rule-soft);
  text-align: center;
  vertical-align: middle;
}
.sf-table .sf-w {
  text-align: right;
}
.sf-table td.sf-w small {
  display: block;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-table .sf-d {
  padding-left: var(--ui-row-pad-x);
  text-align: left;
  white-space: nowrap;
}
.sf-table .sf-d span {
  color: var(--ui-muted);
}
.sf-table .sf-d small {
  display: block;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
}
.sf-week td {
  padding: var(--ui-space-3) var(--ui-row-pad-x);
  background: #eef0ec;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}
.sf-today td {
  background: #f1f6f2;
}
.sf-has-cmp {
  cursor: pointer;
}
.sf-has-cmp:hover td,
.sf-has-cmp:focus-visible td {
  background: #fbf3f3;
}
.sf-has-cmp:focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: -2px;
}
.sf-yes {
  color: var(--ui-green);
  font-weight: 700;
}
.sf-no {
  color: var(--ui-red);
  font-weight: 700;
}
.sf-none {
  color: var(--ui-muted);
}
.sf-rose {
  color: #9a4f78;
}
.sf-cmp {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--ui-red);
  color: #fff;
  font-size: var(--ui-caption);
  font-weight: 700;
}
.sf-note td {
  padding: var(--ui-space-3) var(--ui-row-pad-x) var(--ui-space-4);
  background: #fbf3f3;
  text-align: left;
}
.sf-note p {
  margin: 0 0 var(--ui-space-3);
  font-size: var(--ui-body);
  line-height: var(--ui-leading);
  white-space: pre-wrap;
}
.sf-ack {
  color: var(--ui-green);
  font-size: var(--ui-caption);
  font-weight: 600;
}
@media (max-width: 380px) {
  .sf-table {
    font-size: var(--ui-caption);
  }
  /* На 320 px таблица помещается целиком: дата и «день N» переносятся, ячейки уже */
  .sf-table .sf-d {
    white-space: normal;
    padding-left: var(--ui-space-3);
  }
  .sf-table .sf-d span {
    display: inline-block;
  }
  .sf-table th {
    white-space: normal;
    padding-left: 1px;
    padding-right: 1px;
  }
  .sf-cmp {
    min-width: 22px;
    height: 22px;
    padding: 0 4px;
  }
  .sf-table th,
  .sf-table td {
    padding-left: 2px;
    padding-right: 2px;
  }
  .sf-kv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Нижние кнопки страницы клиента: «Назначения · Дневник · Написать» (вместо нижнего меню) */
.sf-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: var(--ui-space-3);
  max-width: var(--ui-page-max);
  margin: var(--ui-space-4) auto 0;
  padding: var(--ui-space-3) 0 calc(var(--ui-space-3) + env(safe-area-inset-bottom));
  background: var(--ui-paper);
}
body.ui-readable button.sf-bar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-3);
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 0 var(--ui-space-3);
  border: 0;
  border-radius: var(--ui-radius);
  background: var(--ui-sage);
  box-shadow: none;
  color: var(--ui-green-dark);
  font-size: var(--ui-body);
  font-weight: 600;
}
body.ui-readable button.sf-bar__btn--primary {
  background: var(--ui-green-dark);
  color: #fff;
}
.sf-bar__btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}
@media (max-width: 760px) {
  .sf-layout.sf-deep {
    padding-bottom: 0;
  }
  .sf-bar {
    position: fixed;
    left: 0;
    right: 0;
    padding-left: var(--ui-space-4);
    padding-right: var(--ui-space-4);
    border-top: 1px solid var(--ui-rule);
    background: rgba(244, 243, 238, 0.97);
  }
  .sf-deep .sf-cl {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  body:has(.sf-bar) #toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 380px) {
  body.ui-readable button.sf-bar__btn {
    flex-direction: column;
    gap: 2px;
    font-size: var(--ui-caption);
  }
}

/* Прежние разделы карточки под новой шапкой: прежний вид, только без второй шапки карточки */
.sf-sub > .workspace-page:first-child,
.sf-sub > .client-record-view:first-child {
  margin-top: 0;
}

/* ---------- Прежние страницы сотрудника в новом виде (этап 2, шаг 14): срочные вопросы по питанию, журнал
   действий с клиентами, назначения цепочек, входящие заявки. Заголовок — в шапке раздела, содержимое строками. */
.sf-legacy {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-4);
}
.sf-legacy > * {
  margin: 0;
}
.sf-legacy__note {
  margin: 0;
  color: var(--ui-muted);
  font-size: var(--ui-caption);
  line-height: var(--ui-leading);
}
.sf-legacy__empty {
  margin: 0;
  padding: var(--ui-space-5) var(--ui-row-pad-x);
  color: var(--ui-muted);
}
.sf-legacy__list .ui-row {
  align-items: flex-start;
  text-decoration: none;
}
.sf-legacy__list .ui-row__body {
  display: grid;
  gap: var(--ui-space-1);
  justify-items: start;
}
body.ui-readable .sf-legacy button.sf-legacy__link {
  min-height: var(--ui-tap);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ui-ink);
  font-size: var(--ui-body);
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--ui-rule);
  text-underline-offset: 4px;
}
body.ui-readable .sf-legacy button.sf-legacy__sub-link {
  min-height: var(--ui-tap);
  color: var(--ui-green-dark);
  font-weight: 400;
}
.sf-legacy__tags,
.sf-legacy__actions,
.sf-legacy__tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
}
.sf-legacy__actions {
  margin-top: var(--ui-space-2);
}
body.ui-readable .sf-legacy :is(.sf-legacy__actions, .sf-legacy__tools) button,
body.ui-readable .sf-legacy button.sf-legacy__btn {
  flex: none;
  min-height: var(--ui-tap);
  margin: 0;
}
.sf-legacy__quote {
  color: var(--ui-ink);
}
.sf-legacy__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
/* Отборы журнала цепочек — подпись над полем, две колонки на телефоне. */
.sf-legacy__form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  align-items: start;
  gap: var(--ui-space-4);
  padding: var(--ui-space-5);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  box-shadow: 0 0 0 1px var(--ui-rule);
}
body.ui-readable .sf-legacy__form label {
  display: grid;
  gap: var(--ui-space-2);
  margin: 0;
  color: var(--ui-muted);
}
body.ui-readable .sf-legacy__form :is(input, select) {
  width: 100%;
  min-height: var(--ui-tap);
  margin: 0;
  color: var(--ui-ink);
}
.sf-legacy__form label:first-child,
.sf-legacy__form .chain-ending-filter {
  grid-column: 1 / -1;
}
.sf-legacy__list .sf-legacy__row {
  flex-wrap: wrap;
}
.sf-legacy__list .sf-legacy__row > .ui-row__body {
  flex: 1 1 240px;
  min-width: 0;
}
