/* Экраны: то, что есть только у них. Общие детали — components.css. */

.section-gap {
  margin-top: var(--space-4);
}

.section-gap-bottom {
  margin-bottom: var(--space-4);
}

ul.plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}

/* ---------- Вход ---------- */

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-4);
}

.login__form {
  width: min(400px, 100%);
  display: grid;
  gap: 18px;
}

.login__form .logo {
  margin-bottom: var(--space-1);
}

.login__form .btn {
  height: 50px;
}

/* ---------- Долги ---------- */

.debts .total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: end;
}

.debts .legend .is-late b {
  color: var(--late);
}

/* «Кто должен и с какого месяца»: клиент строкой, колонки — давность долга. Ширины
   колонок растут с окном; уже ~1210 px таблица прокручивается вбок внутри карточки,
   на телефоне остаются имя и сумма (narrow.css). */
.debts .ag {
  margin-top: var(--gap);
}

.ag__box {
  overflow-x: auto;
}

.ag__t {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.ag__t th,
.ag__t td {
  padding: var(--space-3) 0 var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
  font-weight: 400;
  text-align: right;
  vertical-align: middle;
}

.ag__t .ag__who {
  padding-left: 0;
  text-align: left;
}

.ag__t .ag__c {
  width: clamp(112px, 8vw, 160px);
}

.ag__t .ag__sum {
  width: clamp(160px, 10vw, 210px);
}

.ag__t .ag__act {
  width: clamp(190px, 14vw, 280px);
  text-align: left;
}

.ag__t thead th {
  padding-top: 0;
  border-top: 0;
  font-size: var(--text-s);
  color: var(--text-2);
  vertical-align: bottom;
}

.ag__t thead small {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
}

/* Задержка помечена в заголовке колонки, а не цветом сумм: суммы текстом не красятся. */
.ag__t thead small.is-late {
  color: var(--late);
}

.ag__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--late);
}

.ag__t tfoot th,
.ag__t tfoot td {
  font-weight: 600;
}

.debts .who {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.debts .who__id {
  display: grid;
  min-width: 0;
}

.debts .who__name {
  font-weight: 500;
  font-size: var(--text-l);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.debts .who__sub {
  font-size: var(--text-s);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* «с какого» под именем — только на телефоне, где колонок давности нет. */
.ag__since {
  display: none;
}

.ag__v {
  display: block;
  white-space: nowrap;
}

.ag__v--sum {
  font-size: var(--text-l);
  font-weight: 500;
}

.ag__v.is-crumb {
  font-size: var(--text-s);
  color: var(--text-2);
}

.ag__note {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-2);
  white-space: nowrap;
}

.ag__bill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-s);
  color: var(--text-2);
}

/* Значок и подпись счёта — одной строкой: перенос оставлял квадрат над текстом. */
.ag__bill--open {
  flex-wrap: nowrap;
  align-items: baseline;
}

.incoming {
  display: grid;
  margin-top: var(--space-4);
}

.inc {
  margin-top: var(--space-2);
  padding: 14px var(--space-4) var(--space-4);
  border-radius: 18px;
  background: var(--on-accent-box);
  display: grid;
  gap: 2px;
}

.inc__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--text-s);
  color: var(--on-accent-2);
}

.inc__client {
  font-size: var(--text-l);
  font-weight: 600;
  color: var(--on-accent);
}

.inc__sum {
  font-size: var(--text-dec);
  font-weight: 400;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.inc__meta {
  font-size: var(--text-s);
  color: var(--on-accent-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inc .btn {
  margin-top: 10px;
  justify-self: start;
}

.bills {
  display: grid;
  margin-top: 14px;
}

.bill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.bill:hover {
  text-decoration: none;
}

.bill__client {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bill__sum {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bill__meta {
  grid-column: 1 / -1;
  font-size: var(--text-s);
  color: var(--text-2);
}

/* ---------- Счета ---------- */

.batch td {
  vertical-align: top;
}

.batch__check {
  width: 18px;
  height: 18px;
  margin-top: 8px;
  accent-color: var(--accent);
}

.batch__text {
  min-width: 280px;
  width: 46%;
}

.batch__tasks {
  margin-top: var(--space-1);
}

.batch__tasks summary {
  cursor: pointer;
}

.batch__number {
  width: 140px;
}

.batch__amount {
  width: 128px;
}

.batch__foot {
  margin-top: var(--space-3);
  justify-content: flex-end;
}

.pay__day {
  max-width: 220px;
  margin-bottom: var(--space-4);
}

.invoices-page .bento {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.invoices-page .total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--space-6);
  align-items: end;
}

/* «Ждут оплаты»: счёт строкой — номер и клиент, сумма, сколько дней ждёт (артборд WideInvoices);
   так же — «Не учитываются» на «Поступлениях» (`.ioff`). */
/* Колонка `minmax(0, 1fr)` и `min-width: 0`: `.mkv` — сетка с колонкой по содержимому, и на телефоне
   строки распирали страницу до 395 px вместо многоточия в имени. */
.iwait,
.ioff {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  margin-top: 0;
}

.iwait > div:first-child,
.ioff > div:first-child {
  border-top: 0;
}

/* Блоком, а не `inline-flex`, как в `.mkv`: иначе имя не сжимается до многоточия. С `.mkv` в селекторе:
   `.mkv dt` стоит ниже в файле и при равном весе перебивал `display`, имя обрезалось без многоточия. */
.mkv.iwait dt,
.mkv.ioff dt {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* «Не учитываются»: день и кто — первой строкой, почему — второй, мельче. */
.ioff dt > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ioff__why {
  font-size: var(--text-s);
}

.iwait__d {
  min-width: 64px;
  font-weight: 400;
  color: var(--text-2);
  white-space: nowrap;
}

.iwait__d.is-late {
  color: var(--late);
}

/* Пачка под тремя карточками — во всю ширину, как в узкой раскладке. */
.ibatch {
  margin-bottom: var(--gap);
}

.inext__go,
.ioff__go {
  margin-top: var(--space-3);
}

/* Строка счёта — кнопка, раскрывающая задачи, документы и действия. Счета — по месяцам (`.mg`). */
.bill-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 140px 210px 24px;
  column-gap: 18px;
  align-items: center;
}

/* Кружок клиента — только в строке выбора шире 1600: в раскрывающейся строке клиент над строкой счёта. */
.bill-row .ava {
  display: none;
}

.xrow {
  border-top: 1px solid var(--line);
}

.invoices .mg__head + .xrow {
  border-top: 0;
}

.bill-row {
  width: 100%;
  min-height: 76px;
  padding: var(--space-3);
  border: 0;
  border-radius: 18px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}

.bill-row:hover {
  background: var(--card-2);
}

.no {
  display: grid;
}

.no__n {
  font-size: var(--text-l);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.no__d,
.what__t {
  font-size: var(--text-s);
  color: var(--text-2);
}

.what {
  min-width: 0;
  display: grid;
}

.what__c {
  font-size: var(--text-l);
  font-weight: 500;
}

.what__c,
.what__t {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amt {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.st {
  justify-self: end;
  display: grid;
  justify-items: end;
  gap: 3px;
}

.st__sub {
  font-size: var(--text-xs);
  color: var(--text-2);
  white-space: nowrap;
}

.chev {
  justify-self: end;
  display: grid;
  color: var(--text-2);
  transition: transform var(--dur-theme) var(--ease-out);
}

[aria-expanded="true"] > .chev {
  transform: rotate(180deg);
}

.bill-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
  margin: 0 var(--space-3) var(--space-4) 162px;
  padding-top: var(--space-1);
}

.bill-more h4 {
  margin: 0 0 6px;
  font-size: var(--text-s);
  font-weight: 500;
  color: var(--text-2);
}

.bill-more__act {
  margin-top: var(--space-2);
}

.xlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.xlist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px dashed var(--line);
  font-size: var(--text-m);
}

.xlist li:first-child {
  border-top: 0;
}

.xlist .s {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.xlist .d {
  color: var(--text-2);
  margin-right: var(--space-2);
  font-variant-numeric: tabular-nums;
}

.facts {
  display: grid;
  align-content: start;
  gap: 6px;
  font-size: var(--text-m);
  color: var(--text-2);
}

.facts a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

.facts a.btn {
  text-decoration: none;
}

.paidlist {
  list-style: none;
  margin: var(--space-4) 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.paidlist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--space-3);
  padding: var(--space-3) 14px;
  border-radius: var(--radius-row);
  background: var(--on-accent-box);
}

.paidlist__c {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paidlist__s {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.paidlist__m {
  grid-column: 1 / -1;
  font-size: var(--text-s);
  color: var(--on-accent-2);
}

/* ---------- Поступления ---------- */

.incomes .bento {
  grid-template-columns: minmax(0, 1fr) 380px;
}

/* Строка выписки уже 1600 — со своими действиями; поступления — по месяцам (`.mg`). */
.income {
  display: grid;
  grid-template-columns: 56px 44px minmax(0, 0.9fr) minmax(0, 1.1fr) 140px 168px;
  column-gap: var(--space-4);
  row-gap: var(--space-2);
  align-items: center;
  min-height: 76px;
  padding: 10px var(--space-3);
  border-radius: 18px;
  transition: background-color 160ms var(--ease-out);
}

.income:hover {
  background: var(--card-2);
}

.income:hover .ava {
  background: var(--bg);
}

.income__d,
.iline__d {
  font-size: var(--text-m);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Ждёт записи — лаймовый кружок: его и ищут глазами в выписке. */
.income.is-waiting .ava,
.income.is-waiting:hover .ava,
.iline.is-waiting .ava {
  background: var(--accent);
  color: var(--on-accent);
}

/* Не учитывается — серым, сумма зачёркнута, как у отменённой задачи: в списке, но не в суммах. */
.income.is-off .who__c,
.income.is-off .sum,
.iline.is-off .iline__c,
.iline.is-off .iline__s {
  color: var(--text-2);
}

.income.is-off .sum,
.iline.is-off .iline__s {
  text-decoration: line-through;
  text-decoration-color: var(--bar-no);
}

.income .who {
  min-width: 0;
  display: grid;
}

.who__c {
  font-size: var(--text-l);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who__p {
  font-size: var(--text-s);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purpose {
  min-width: 0;
  font-size: var(--text-s);
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.income .sum {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.income .state {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.income .state .chip svg {
  color: var(--text);
}

/* Подсказки и действия ждущего поступления — второй строкой под его колонками. */
.income__more {
  grid-column: 3 / -1;
  display: grid;
  gap: var(--space-2);
}

.income__more:empty {
  display: none;
}

.income__candidate {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--text-m);
}

.expand {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition:
    transform var(--dur-theme) var(--ease-out),
    color 200ms;
}

.expand:hover {
  color: var(--text);
}

.expand[aria-expanded="true"] {
  transform: rotate(180deg);
}

/* Платёжки под строкой — под колонкой имени: поле строки, день, кружок и два зазора. */
.subs {
  list-style: none;
  margin: 0 var(--space-3) 10px calc(var(--space-3) + 56px + 44px + 2 * var(--space-4));
  padding: 0;
  display: grid;
}

.subs li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-4);
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  font-size: var(--text-m);
}

.subs li:first-child {
  border-top: 0;
}

.subs__n {
  font-weight: 500;
}

.subs__d {
  grid-column: 1;
  font-size: var(--text-s);
  color: var(--text-2);
}

.subs__s {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.incomes .since {
  margin: 14px var(--space-3) var(--space-1);
  font-size: var(--text-s);
  color: var(--text-2);
}

.next {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* «Пришло с 1 октября»: полоса тонкая, как в артборде WideIncomes, — главное в карточке сумма над ней. */
.came .split {
  height: 14px;
  margin-top: var(--space-5);
}

.came .split > span {
  border-radius: var(--space-1);
}

/* Строка выбора шире 1600 (артборд WideIncomes) — в одну линию: день, клиент, от кого, за что,
   откуда, сумма, состояние; выбирает поступление для карточки справа (`IncomeCard`). */
.ilist .mg__head + .xrow {
  border-top: 0;
}

.iline {
  display: grid;
  grid-template-columns: 56px 32px minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.3fr) 88px 128px 24px;
  column-gap: var(--space-3);
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-row);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}

.ilist--chips .iline {
  grid-template-columns: 56px 32px minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.3fr) 88px 128px 116px;
}

.iline:hover,
.iline[aria-current="true"] {
  background: var(--card-2);
}

.iline .ava {
  width: 32px;
  height: 32px;
  font-size: var(--text-xs);
}

/* Без `:not` подложка выбранной строки перебивала лаймовый кружок ждущего — он становился чёрным. */
.iline:not(.is-waiting):hover .ava,
.iline:not(.is-waiting)[aria-current="true"] .ava {
  background: var(--bg);
}

.iline__c {
  font-size: var(--text-body);
  font-weight: 500;
}

.iline__p,
.iline__t {
  font-size: var(--text-m);
  color: var(--text-2);
}

.iline__c,
.iline__p,
.iline__t {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iline__s {
  font-size: var(--text-body);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.iline__st {
  justify-self: end;
}

.iline__ok {
  display: inline-grid;
  place-items: center;
  color: var(--text-2);
}

.ilist--pick .xrow:has(> .iline[aria-current="true"]),
.ilist--pick .xrow:has(> .iline[aria-current="true"]) + .xrow {
  border-top-color: transparent;
}

/* Выбранное поступление справа: полное имя плательщика и назначение платежа — текстом, а подсказки
   и кнопки «Уже записана…», «Не учитывать», «Скрыть» — под рядом действий. */
.pdet__text {
  font-size: var(--text-m);
  line-height: var(--leading);
  overflow-wrap: anywhere;
}

.pdet__more {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* ---------- Задачи ---------- */

/* Что с выполненным за месяц и кто сколько: уже 1600 — над таблицей, шире — справа от неё
   колонкой 440, как сводка карточки клиента (артборд WideTasks). */
.strip {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
  align-items: start;
  margin-bottom: var(--gap);
}

.strip .parts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.strip .parts li:nth-child(2) {
  border-top: 0;
}

.strip .who-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 6px;
}

@media (min-width: 1600px) {
  .tcols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: var(--gap);
    align-items: start;
  }

  .tcols > .strip {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 0;
  }

  .tcols > .tcard {
    grid-column: 1;
    grid-row: 1;
  }

  .tcols .who-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* На компьютере новые задачи добавляются «Новой строкой» таблицы; форма — только на телефоне. */
.tasks-page .add {
  display: none;
}

/* Новая задача: что сделано — как считать — цена и кнопка. */
.add-btn {
  display: none;
}

.add-btn.is-open svg {
  transform: rotate(180deg);
}

.add {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 270px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: var(--gap);
}

.add .card__head {
  margin: 0;
}

.add__main,
.add__how {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  min-width: 0;
}

.add__row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 10px;
}

.add__date {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-s);
  color: var(--text-2);
}

.add__note,
.add__calc {
  font-size: var(--text-s);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.add__price {
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: var(--space-4) 18px 18px;
  border-radius: 20px;
  background: var(--card-2);
  transition: background-color var(--dur-theme) var(--ease-out);
}

.add__price .big {
  font-size: 44px;
}

.add__price .btn {
  width: 100%;
  height: 48px;
  font-size: var(--text-body);
}

.dialog .seg--sm {
  width: 100%;
}

.add .seg--sm {
  width: 100%;
  max-width: 320px;
}

/* Над списком: месяц, сколько задач, фильтры. */
.list-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.list-head h2 {
  font-size: var(--text-xxl);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.list-head .meta {
  margin-right: auto;
}

/* Выбор клиента шириной в самое длинное имя: «Стоматологическая клиника доктора Манаповой»
   растягивала его до 440 px, и на телефоне страница «Оплат» и «Счетов» уезжала вбок. */
.list-head select {
  min-width: 0;
  max-width: 100%;
}

.chip__x {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.chip__x:hover {
  background: var(--card);
}

.chip__x svg {
  width: 10px;
  height: 10px;
}

/* Таблица задач — как лист Google: заголовок колонки открывает меню, поиск над таблицей,
   итог по отфильтрованному, правка в строке. Ширины колонок — по содержимому: «12 окт»,
   «Antonio Fresa», «Доработка сайта zub23.ru», «46 000,00 ₽», «пришло, не записано»;
   наименованию — всё остальное, но не меньше 200 px. Дате — 80: «Дата», стрелка сортировки
   и галочка меню. Целиком таблица встаёт от 1344 px окна (1240 px таблицы + поля страницы
   и карточки); уже — см. медиазапросы ниже. */
.tcard {
  position: relative;
  padding-bottom: var(--space-3);
}

.tbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: var(--space-3) 0 var(--space-2);
}

.tbar .search {
  flex: 0 1 420px;
}

.tbar .search .input {
  min-height: 0;
  height: 40px;
  background: var(--card-2);
}

.filters-btn {
  display: none;
}

.filters-btn .nav__count {
  margin-left: 2px;
}

.fchips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.fchip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  max-width: 380px;
  height: 30px;
  padding: 0 var(--space-1) 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--card-2);
  font-size: var(--text-s);
  font-weight: 500;
  transition: background-color var(--dur-theme) var(--ease-out);
}

.fchip__t {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fchip__k {
  color: var(--text-2);
}

.tbl__hint {
  margin-bottom: 6px;
  font-size: var(--text-s);
  color: var(--text-2);
}

.tbl-wrap {
  margin: 0 calc(-1 * var(--space-3));
}

.tbl {
  --cols: 80px 132px 140px 120px minmax(200px, 1fr) 88px 76px 116px 168px;
  min-width: 1240px;
}

/* Карточка клиента: без «Клиента» — 1096 px; у клиента с одним проектом и сайтом ещё
   без «Проекта» и «Ресурса» — 812 px (task-table.js, HIDDEN). */
.tbl.tbl--client {
  --cols: 80px 140px 120px minmax(200px, 1fr) 88px 76px 116px 168px;
  min-width: 1096px;
}

.tbl.tbl--solo {
  --cols: 80px minmax(200px, 1fr) 88px 76px 116px 168px;
  min-width: 812px;
}

/* «Задачи»: «Ресурс» и «Статус» не рисуются при любой ширине — их фильтры в «Фильтрах», сайт —
   в ячейке проекта, не сделанная — в «Оплате» (task-table.js, HIDDEN). Проекту — до 220 px под
   «Триал Энерго · delter.ru +4», «Оплате» — 184 под «счёт 1211-01/26 · 5 дней». */
.tbl.tbl--all {
  --cols: 80px 132px minmax(140px, 220px) minmax(200px, 1fr) 76px 116px 184px;
  min-width: 1024px;
}

.tbl--all .tc--resource,
.tbl--all .tc--status,
.tbl--all .th--resource,
.tbl--all .th--status {
  display: none;
}

.tbl--all .tc--draftproj {
  grid-column: 2 / 4;
}

.filters-btn.filters-btn--on {
  display: inline-flex;
}

/* Сайт в ячейке проекта и дни счёта в «Оплате» — только там, где для них есть место. */
.tc__res,
.tc__pd {
  display: none;
}

.tbl--all .tc__res,
.tbl--all .tc__pd {
  display: inline;
}

/* Карточка, где сайт задачи назван как проект и все задачи сделаны: без «Ресурса» и «Статуса»
   (task-table.js, HIDDEN.card); у оплаченной — только дата оплаты, день — у первой задачи дня. */
.tbl.tbl--card {
  --cols: 80px 220px minmax(200px, 1fr) 76px 116px 168px;
  min-width: 864px;
}

.tbl--card .tc--status,
.tbl--card .tc__pw {
  display: none;
}

.tbl--card .tc--draftproj {
  grid-column: 2 / 3;
}

.tbl--card .trow.is-sameday .tc__btn--open,
.tbl--all .trow.is-sameday .tc__btn--open {
  color: transparent;
}

.tbl--card .trow.is-sameday:hover .tc__btn--open,
.tbl--card .trow.is-sameday .tc__btn--open:focus-visible,
.tbl--all .trow.is-sameday:hover .tc__btn--open,
.tbl--all .trow.is-sameday .tc__btn--open:focus-visible {
  color: var(--text-2);
}

.tbl__head,
.trow,
.tbl__foot {
  display: grid;
  grid-template-columns: var(--cols);
  column-gap: var(--space-3);
  align-items: center;
  padding: 0 var(--space-3);
}

/* Заголовок колонок прилипает к верху окна, пока листаешь месяц. */
.tbl__head {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 46px;
  background: var(--card);
  box-shadow: inset 0 -1px 0 var(--line);
  transition: background-color var(--dur-theme) var(--ease-out);
}

.th {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  justify-self: start;
  max-width: calc(100% + 16px);
  height: 32px;
  margin: 0 calc(-1 * var(--space-2));
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-2);
  font-size: var(--text-s);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-press) var(--ease-out),
    color var(--dur-press) var(--ease-out);
}

.th:hover,
.th[aria-expanded="true"] {
  background: var(--card-2);
  color: var(--text);
}

/* Колонка с фильтром — пилюлей цвета текста, как выбранная пилюля. */
.th.is-filtered {
  background: var(--text);
  color: var(--bg);
}

.th.is-num {
  justify-self: end;
}

.th__t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.th svg {
  flex: none;
}

.tbl__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tbl__rows > li + li {
  box-shadow: inset 0 1px 0 var(--line);
}

.trow {
  position: relative;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-field);
  background: transparent;
  text-align: left;
  transition: background-color var(--dur-press) var(--ease-out);
}

button.trow {
  cursor: pointer;
}

button.trow:hover {
  background: var(--card-2);
}

.tc {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--text-m);
}

.tc--date {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.tc--project,
.tc--resource,
.tc--status {
  color: var(--text-2);
}

.tc--status {
  font-size: var(--text-s);
}

.tc--title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-body);
}

.tc__t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc--title .chip {
  height: 22px;
  padding: 0 var(--space-2);
  font-size: 11.5px;
  flex: none;
}

.tc--time {
  color: var(--text-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tc--sum {
  font-size: var(--text-body);
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tc--pay {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-s);
  color: var(--text-2);
}

.pdot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: var(--radius-cell);
}

.pdot.is-paid {
  background: var(--accent);
}

.pdot.is-came {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.pdot.is-inv {
  background: var(--bar-inv);
}

/* Частично: левая половина — пришедшее, правая — что ждёт. */
.pdot.is-part {
  background: linear-gradient(90deg, var(--accent) 50%, var(--bar-inv) 50%);
}

.pdot.is-no {
  background: repeating-linear-gradient(135deg, var(--bar-no) 0 2px, transparent 2px 4px);
  box-shadow: inset 0 0 0 1px var(--bar-no);
}

.pdot.is-off {
  box-shadow: inset 0 0 0 1px var(--line);
}

/* Ещё не долг — станет им 1-го: пустая клетка с контуром, как `.sw--later`. */
.pdot.is-later {
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--bar-no);
}

/* Сетка «По месяцам»: задержка — коралл, идущий месяц — пустой контур, денег за него ещё не ждут. */
.pdot.is-late {
  background: var(--late);
}

.pdot.is-now {
  box-shadow: inset 0 0 0 1.5px var(--bar-no);
}

.trow.is-off .tc__t,
.trow.is-off .tc--sum {
  color: var(--text-2);
}

.trow.is-off .tc--sum {
  text-decoration: line-through;
  text-decoration-color: var(--bar-no);
}

/* Только что добавленная или сохранённая — вспышка акцента. */
.trow.is-new {
  animation: task-in 900ms var(--ease-out) both;
}

@keyframes task-in {
  0% {
    opacity: 0;
    background: var(--accent);
  }
  45% {
    opacity: 1;
    background: color-mix(in srgb, var(--accent) 22%, transparent);
  }
  100% {
    background: transparent;
  }
}

/* Правка в строке: ячейка — кнопка, при правке — поле; отказ сервера — под ячейкой. */
.tc--edit {
  position: relative;
  overflow: visible;
}

.tc__btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: calc(100% + 16px);
  height: 34px;
  margin: 0 calc(-1 * var(--space-2));
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-mark);
  background: transparent;
  font: inherit;
  text-align: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
  transition:
    background-color var(--dur-press) var(--ease-out),
    box-shadow var(--dur-press) var(--ease-out);
}

.tc--time .tc__btn,
.tc--sum .tc__btn {
  justify-content: flex-end;
}

.tc__btn:hover {
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tc__btn--open {
  cursor: pointer;
}

.tc__btn[disabled] {
  cursor: default;
}

.tc__btn[disabled]:hover {
  background: transparent;
  box-shadow: none;
}

.tc__in {
  display: block;
  width: calc(100% + 16px);
  height: 34px;
  margin: 0 calc(-1 * var(--space-2));
  padding: 0 var(--space-2);
  border: 1px solid var(--focus);
  border-radius: var(--radius-mark);
  background: var(--card-2);
  font-size: var(--text-m);
}

.tc__in:focus {
  outline: none;
}

.tc--time .tc__in,
.tc--sum .tc__in {
  text-align: right;
}

.tc__err {
  position: absolute;
  left: calc(-1 * var(--space-2));
  top: calc(100% + var(--space-1));
  z-index: 3;
  width: max-content;
  max-width: 420px;
  padding: 7px 10px;
  border-radius: var(--radius-mark);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--late), var(--shadow);
  color: var(--late);
  font-size: var(--text-s);
  line-height: 1.35;
  white-space: normal;
}

.trow--draft {
  padding-top: 6px;
  padding-bottom: 6px;
  box-shadow: inset 0 1px 0 var(--line);
}

.tc--draftproj {
  grid-column: 2 / 5;
}

.tbl--client .tc--draftproj {
  grid-column: 2 / 4;
}

.tc--draftproj .tc__in {
  width: 100%;
  margin: 0;
}

.tc--go {
  gap: var(--space-1);
  overflow: visible;
}

.icon-btn--sm {
  width: 32px;
  height: 32px;
}

/* «Новая строка» — над задачами всегда, как следующая строка листа; под ней частые
   названия и из чего сложится цена. Отступ подстрочника — под колонку «Наименование». */
.draft {
  margin: var(--space-2) 0 var(--space-1);
  padding: var(--space-1) 0 var(--space-3);
  border-radius: var(--radius-field);
  background: var(--card-2);
  transition: background-color var(--dur-theme) var(--ease-out);
}

.draft .trow--draft {
  box-shadow: none;
}

.draft .tc__in {
  background: var(--card);
}

.draft__sub,
.draft__run {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
  padding: 2px var(--space-3) 0 calc(80px + 2 * var(--space-3));
}

.draft__lbl {
  font-size: var(--text-s);
  color: var(--text-2);
}

.draft .pick {
  height: 30px;
  padding: 0 var(--space-3);
}

.draft__why {
  font-size: var(--text-s);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.draft__run {
  gap: var(--space-2);
  padding-top: var(--space-2);
  font-size: var(--text-s);
}

/* «Повторить» — у правого края строки, когда на неё навели или в ней фокус. Позиция —
   через top, а не transform: у .icon-btn свой transform при наведении. */
.trow__copy {
  position: absolute;
  top: calc(50% - 16px);
  right: var(--space-2);
  opacity: 0;
  background: var(--card);
  transition:
    opacity var(--dur-press) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.trow:hover .trow__copy,
.trow:focus-within .trow__copy {
  opacity: 1;
}

.tc__btn--why {
  cursor: pointer;
}

.tc__btn--why[aria-expanded="true"] {
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* «Вставить из листа»: поле для строк листа, разбор строками с тем, что с каждой будет,
   и одна кнопка на всё отмеченное. */
.box.paste {
  gap: var(--space-3);
  margin: var(--space-1) 0 var(--space-3);
}

.paste__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.paste__head h3 {
  font-size: var(--text-l);
  font-weight: 500;
}

.paste__head .meta {
  flex: 1 1 320px;
  font-size: var(--text-s);
}

.paste__in {
  height: auto;
  min-height: 132px;
  padding: var(--space-3) var(--space-3);
  background: var(--card);
  font-size: var(--text-s);
  line-height: 1.55;
  white-space: pre;
  overflow: auto;
  tab-size: 16;
  resize: vertical;
}

.paste__cols {
  margin-top: calc(-1 * var(--space-1));
  font-size: var(--text-xs);
  color: var(--text-2);
}

.paste__wrap {
  overflow-x: auto;
}

.ptbl {
  --pcols: 20px 64px 150px minmax(180px, 1fr) 72px 112px 112px minmax(200px, 1.2fr);
  min-width: 980px;
}

.ptbl__head,
.ptbl__row {
  display: grid;
  grid-template-columns: var(--pcols);
  column-gap: var(--space-3);
  align-items: center;
  padding: 0 var(--space-2);
}

.ptbl__head {
  height: 34px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-2);
  box-shadow: inset 0 -1px 0 var(--line);
}

.ptbl__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ptbl__row {
  min-height: 40px;
  font-size: var(--text-m);
  box-shadow: inset 0 -1px 0 var(--line);
}

.ptbl__row > span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ptbl__row.is-off {
  color: var(--text-2);
}

.ptbl__r {
  text-align: right;
}

.ptbl__box {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--text);
  cursor: pointer;
}

.ptbl__box[disabled] {
  cursor: default;
  opacity: 0.4;
}

.ptbl__row > .pfate {
  font-size: var(--text-s);
  white-space: normal;
  line-height: 1.3;
}

.pfate--new {
  color: var(--text);
  font-weight: 500;
}

.pfate--dup,
.pfate--warn {
  color: var(--text-2);
}

/* Отказ разбора — коралл: строку добавить нельзя, пока её не поправят в листе. */
.pfate--bad {
  color: var(--late);
}

.paste__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.paste__sum {
  margin-right: auto;
  font-size: var(--text-m);
  color: var(--text-2);
}

/* Из чего сумма задачи — как формула в ячейке листа, только словами. */
.trow__why {
  margin: 0 var(--space-3) var(--space-2) calc(80px + 2 * var(--space-3));
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-mark);
  background: var(--card-2);
  font-size: var(--text-s);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.tbl__foot {
  min-height: 52px;
  margin-top: 2px;
  box-shadow: inset 0 1px 0 var(--line);
  font-size: var(--text-m);
  font-variant-numeric: tabular-nums;
}

/* Итог — под первыми колонками до «Время»: дальше время, сумма, оплата. */
.tf__label {
  grid-column: 1 / -4;
  font-weight: 500;
  white-space: nowrap;
}

.tf__more {
  font-weight: 400;
  color: var(--text-2);
}

.tf__time {
  text-align: right;
  color: var(--text-2);
  white-space: nowrap;
}

.tf__sum {
  display: grid;
  justify-items: end;
  font-size: var(--text-body);
  font-weight: 600;
  white-space: nowrap;
}

.tf__usd {
  font-size: var(--text-s);
  font-weight: 500;
  color: var(--text-2);
}

.tf__pay {
  min-width: 0;
  font-size: var(--text-s);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Без своего заголовка (вкладка клиента) счёт задач — в конце строки поиска. */
.tbar__meta {
  margin-left: auto;
}

/* Под «Долга нет» в карточке клиента — почему работа месяца ещё не долг. */
.empty__note {
  margin-top: var(--space-2);
  font-size: var(--text-s);
}

/* Меню колонки: под заголовком, поверх строк; щелчок мимо закрывает (`.cm-scrim`). */
.cm-scrim {
  position: fixed;
  inset: 0;
  z-index: 29;
}

.cm {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 30;
  width: 320px;
  max-height: 540px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow);
  animation: cm-in 220ms var(--ease-out) both;
  transform-origin: top left;
}

@keyframes cm-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

.cm__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-2) var(--space-4) 0;
  font-size: var(--text-body);
  font-weight: 600;
}

.cm__body {
  display: grid;
  gap: 14px;
  padding: var(--space-1) var(--space-4) var(--space-3);
  overflow: auto;
}

.cm__sec {
  display: grid;
  gap: var(--space-2);
}

.cm__lbl {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-2);
}

.cm__sort,
.cm__cond {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}

.cm__sort .pick {
  padding: 0 var(--space-2);
}

.cm__cond select {
  grid-column: 1 / -1;
}

.cm .input--sm {
  width: 100%;
  border-radius: var(--radius-field);
}

.cm__note {
  font-size: var(--text-xs);
  color: var(--text-2);
}

.cm__all {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: var(--text-s);
  color: var(--text-2);
}

.linkbtn {
  padding: var(--space-1) 6px;
  border: 0;
  border-radius: var(--radius-mark);
  background: transparent;
  font-size: var(--text-s);
  font-weight: 500;
  cursor: pointer;
}

.linkbtn:hover {
  background: var(--card-2);
}

.cm__list {
  list-style: none;
  max-height: 232px;
  margin: 0 calc(-1 * var(--space-2));
  padding: 0;
  overflow: auto;
}

.cm__v {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-mark);
  font-size: var(--text-m);
  cursor: pointer;
}

.cm__v:hover {
  background: var(--card-2);
}

.cm__box {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--text);
  cursor: pointer;
}

.cm__vt {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm__vn {
  font-size: var(--text-xs);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.cm__empty {
  padding: var(--space-1) 0;
  font-size: var(--text-s);
  color: var(--text-2);
}

.cm__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) 14px;
  border-top: 1px solid var(--line);
}

/* «Фильтры» на телефоне и в узком окне: строка — колонка и её фильтр. */
.fl {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fl__b {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 2px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.fl > li:first-child .fl__b {
  border-top: 0;
}

.fl__n {
  font-size: var(--text-body);
  font-weight: 500;
}

.fl__s {
  max-width: 180px;
  font-size: var(--text-s);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl__s.is-on {
  color: var(--text);
}

/* Уже 1344 px окна таблица целиком не встаёт: «Ресурс» и «Статус» уходят из колонок
   (их фильтры — в «Фильтрах»), остаётся 1008 px. Уже 1112 px — таблица прокручивается
   вбок внутри карточки; шире прокрутки нет, чтобы заголовок колонок прилипал к окну. */
@media (max-width: 1343px) {
  .tbl {
    --cols: 80px 132px 140px minmax(200px, 1fr) 76px 116px 168px;
    min-width: 1008px;
  }

  .tc--resource,
  .tc--status,
  .th--resource,
  .th--status {
    display: none;
  }

  .tc__res {
    display: inline;
  }

  .tc--draftproj {
    grid-column: 2 / 4;
  }

  .tbl.tbl--client {
    --cols: 80px 140px minmax(200px, 1fr) 76px 116px 168px;
    min-width: 864px;
  }

  .tbl.tbl--solo {
    --cols: 80px minmax(200px, 1fr) 76px 116px 168px;
    min-width: 712px;
  }

  .tbl--client .tc--draftproj {
    grid-column: 2 / 3;
  }

  .filters-btn {
    display: inline-flex;
  }
}

@media (max-width: 1111px) {
  .tbl-wrap {
    overflow-x: auto;
  }
}

/* Итог месяца: полоса — оплачено, пришло, в счёте, без счёта. */
.big__usd {
  margin-top: var(--space-2);
  font-size: 18px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.parts {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
}

.parts li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
  font-size: var(--text-m);
}

.parts li:first-child {
  border-top: 0;
}

.parts b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Кто сколько: строка — фильтр списка, полоса — доля от самого крупного. */
.who-list {
  list-style: none;
  margin: var(--space-1) -10px 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.who__btn {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  grid-template-rows: auto 6px;
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-field);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 160ms var(--ease-out),
    opacity 260ms;
}

.who__btn:hover {
  background: var(--card-2);
}

.who__btn[aria-pressed="true"] {
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--text-2);
}

.who-list.is-picked .who__btn[aria-pressed="false"] {
  opacity: 0.5;
}

.who-list .ava {
  width: 30px;
  height: 30px;
  font-size: 11px;
  grid-row: 1 / span 2;
}

.who__n {
  font-size: var(--text-m);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Число задач — только где список в одну колонку: в три колонки над таблицей оно резало имена. */
.who__k {
  display: none;
  margin-left: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-2);
}

@media (min-width: 1600px), (max-width: 760px) {
  .who__k {
    display: inline;
  }
}

.who__s {
  font-size: var(--text-s);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-2);
}

.who__bar {
  grid-column: 2 / span 2;
  height: 6px;
  border-radius: 3px;
  background: var(--card-2);
  overflow: hidden;
}

.who__fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--bar-inv);
  transition: width 700ms var(--ease-move);
}

.who__btn:hover .who__bar,
.who__btn[aria-pressed="true"] .who__bar {
  background: var(--card);
}

/* Между компьютером и телефоном «Кто сколько» — в две колонки: в три имена клиентов режутся. */
@media (max-width: 1180px) {
  .strip .who-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .add {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .add__price {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: end;
  }
}

/* Галочки списком: ресурсы задачи, проекты ресурса. */
.checks {
  margin: var(--space-4) 0 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}

.checks legend {
  margin-bottom: var(--space-2);
}

.form .checks {
  margin: 0;
}

/* ---------- Оплаты ---------- */

.payments-page .bento {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.payments-page .page__head .btn {
  height: 50px;
  padding: 0 var(--space-5);
  font-size: var(--text-body);
}

.payments-page .total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--space-6);
  align-items: end;
}

.parts__n {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-2);
}

.payments-page .list-head h2 {
  margin-right: auto;
  font-size: var(--text-l);
  letter-spacing: 0;
}

/* Оплата — строка-кнопка: день, клиент и что погасила, как пришла, сумма. */
.pays .xrow {
  border-top: 0;
}

.pays .xrow + .xrow {
  border-top: 1px solid var(--line);
}

.pay {
  display: grid;
  grid-template-columns: 92px 36px minmax(0, 1fr) 120px 150px 20px;
  align-items: center;
  column-gap: 14px;
  width: 100%;
  min-height: 66px;
  padding: 10px var(--space-3);
  border: 0;
  border-radius: var(--radius-row);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}

.pay:hover {
  background: var(--card-2);
}

.when,
.whom {
  display: grid;
  min-width: 0;
}

.when__d {
  font-size: var(--text-body);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.whom__c {
  font-size: var(--text-l);
  font-weight: 500;
}

.whom__t {
  font-size: var(--text-s);
  color: var(--text-2);
}

.whom__c,
.whom__t {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meth {
  justify-self: start;
}

/* Раскрытая оплата: задачи слева, как пришла и действия справа — под колонкой клиента. */
.pay-more {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-5);
  margin: 0 var(--space-3) var(--space-4) 154px;
  padding-top: 2px;
}

.pay-more h4 {
  margin: 0 0 6px;
  font-size: var(--text-s);
  font-weight: 500;
  color: var(--text-2);
}

.xmore {
  padding-top: var(--space-2);
  font-size: var(--text-s);
  color: var(--text-2);
}

/* Авансы — плашками на --card-2, у каждой «Разнести аванс». */
.credit {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.credit li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-3);
  align-items: center;
  padding: var(--space-3) 14px;
  border-radius: var(--radius-row);
  background: var(--card-2);
}

.credit__c,
.credit__s {
  font-weight: 500;
}

.credit__s {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.credit__m {
  font-size: var(--text-s);
  color: var(--text-2);
}

/* Окно записи: сумма, валюта и дата в ряд. */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 180px;
  gap: 14px;
}

/* Между компьютером и телефоном ждущие записи и авансы — рядом над списком:
   в узкой колонке строке оплаты не хватает места на сумму. */
@media (max-width: 1180px) {
  .payments-page .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .payments-page .col--side {
    order: -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/* Шире 1600 (артборд WidePayments, `payments.js`): «Пришло», «Ждут записи» и «Авансы» — в ряд сверху,
   ниже список и выбранная оплата справа (`PaymentCard`). Сумма «Пришло» — над полосой, а не рядом:
   в колонке возле двух карточек по 440 большая цифра на 1600 не влезла бы. */
.ptop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px 440px;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.ptop .total {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

/* «через Точку» и «на карту» — двумя колонками под полосой, как у «Задач» (`.strip .parts`):
   строкой под строкой «Пришло» выходило выше соседних карточек на полторы сотни точек. */
.ptop .parts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.ptop .parts li:nth-child(2) {
  border-top: 0;
}

/* Карточка справа — 620 на 1920, как в артборде, и уже к 1600: иначе «на что легла» в строке
   списка сжималась до двух слов. */
.pcols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(480px, 32vw, 620px);
  gap: var(--gap);
  align-items: start;
}

.pcols--one {
  grid-template-columns: minmax(0, 1fr);
}

/* Строка выбора — в одну линию: день, клиент, на что легла, как пришла, сумма. */
.pays--pick .pay {
  grid-template-columns: 64px 32px minmax(0, 200px) minmax(0, 1fr) 96px 136px;
  min-height: 52px;
  padding-block: var(--space-2);
}

.pays--pick .pay .ava {
  width: 32px;
  height: 32px;
  font-size: var(--text-xs);
}

.pays--pick .whom {
  display: contents;
}

.pays--pick .whom__c {
  font-size: var(--text-body);
}

.pays--pick .whom__t {
  font-size: var(--text-m);
}

.pays--pick .chev {
  display: none;
}

.pays--pick .pay[aria-current="true"] {
  background: var(--card-2);
}

/* Линии над выбранной строкой и под ней уходят: на подложке они резали бы её скругление. */
.pays--pick .xrow:has(> .pay[aria-current="true"]),
.pays--pick .xrow:has(> .pay[aria-current="true"]) + .xrow {
  border-top-color: transparent;
}

/* Строка счёта шире 1600 (артборд WideInvoices) — в одну линию: номер, день, клиент, строка счёта,
   сумма, состояние; выбирает счёт для карточки справа (`InvoiceCard`). */
.invoices--pick .bill-row {
  grid-template-columns: 104px 64px 32px minmax(0, 220px) minmax(0, 1fr) 136px 168px;
  min-height: 52px;
  padding-block: var(--space-2);
  column-gap: 14px;
}

.invoices--pick .no,
.invoices--pick .what {
  display: contents;
}

.invoices--pick .bill-row .ava {
  display: grid;
  width: 32px;
  height: 32px;
  font-size: var(--text-xs);
}

.invoices--pick .no__n,
.invoices--pick .what__c {
  font-size: var(--text-body);
}

.invoices--pick .what__t {
  font-size: var(--text-m);
}

.invoices--pick .amt {
  font-size: var(--text-body);
}

.invoices--pick .st__sub,
.invoices--pick .chev {
  display: none;
}

.invoices--pick .bill-row[aria-current="true"] {
  background: var(--card-2);
}

.invoices--pick .xrow:has(> .bill-row[aria-current="true"]),
.invoices--pick .xrow:has(> .bill-row[aria-current="true"]) + .xrow {
  border-top-color: transparent;
}

/* Состояние счёта в карточке справа — у правого края, напротив имени клиента. */
.pdet__st {
  margin-left: auto;
  align-self: flex-start;
}

/* Выбранная оплата держится у верха окна, пока листают список. Выше окна — своя прокрутка:
   иначе действия внизу карточки были бы недостижимы до конца списка. */
.pdet {
  position: sticky;
  top: var(--gap);
  max-height: calc(100vh - 2 * var(--gap));
  overflow-y: auto;
}

.pdet__who {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pdet__id {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pdet__id h2 {
  font-size: var(--text-xxl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pdet__sub {
  font-size: var(--text-s);
  color: var(--text-2);
}

.pdet .big {
  display: block;
  margin-top: var(--space-5);
}

.pdet .pcol {
  margin-top: var(--space-5);
}

/* В раскрытой строке вкладки клиента подложка — --card-2, а здесь карточка сама --card. */
.pdet .pg:hover {
  background: var(--card-2);
}

.pdet__act {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.pdet__act .btn--danger {
  margin-left: auto;
}

/* Отказ действия с оплатой — своей строкой под кнопками (`PaymentActions`). */
.pact > .problem {
  flex-basis: 100%;
}

/* ---------- Месяц (старт) ---------- */

.start .seg {
  width: 300px;
}

/* Заголовок: «‹ Ноябрь 2026 ›», метка состояния и «К ноябрю»; справа — вид. */
.mhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: 14px 0 18px;
}

.mhead__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  min-width: 0;
}

.mtitle {
  font-size: var(--text-month);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.mtitle__y {
  color: var(--text-2);
  font-weight: 300;
}

/* Месяц над задачами во вкладке «По месяцам» карточки клиента — те же стрелки, заголовок мельче. */
.mhead--sm {
  margin: var(--space-4) 0 var(--space-3);
}

.mhead--sm .mtitle {
  font-size: var(--text-xxl);
  letter-spacing: -0.02em;
}

.mhead--sm .icon-btn {
  width: 34px;
  height: 34px;
}

/* Лента месяцев через годы: подпись года над своими месяцами, прокрутка вбок внутри карточки.
   Прокрутка — точка отсчёта (`position`): от неё лента меряет, где выбранный месяц. */
.tl {
  margin-bottom: var(--gap);
}

.tl__scroll {
  position: relative;
  overflow-x: auto;
  margin: 0 calc(-1 * var(--space-2));
  padding: 0 var(--space-2) var(--space-1);
  scrollbar-width: thin;
}

.tl__row {
  display: flex;
  gap: 22px;
  width: max-content;
}

.tl__year {
  display: grid;
  align-content: start;
  gap: var(--space-2);
}

/* Год прилипает к левому краю ленты, пока видны его месяцы: прокрутили к декабрю — год всё равно виден. */
.tl__y {
  position: sticky;
  left: 0;
  justify-self: start;
  padding-left: 6px;
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--text-2);
}

.tl__ms {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 58px;
  gap: var(--space-1);
}

/* Месяц ленты: высота столбика — начислено в рублях, лайм — оплачено, точка — задержка,
   ожидание оплаты или идущий месяц. */
.ms {
  position: relative;
  display: grid;
  grid-template-rows: 88px auto auto;
  justify-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-1) 6px;
  border: 0;
  border-radius: var(--radius-row);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition:
    background-color 240ms var(--ease-out),
    color 240ms;
}

.ms:hover {
  background: var(--card-2);
  color: var(--text);
}

.ms[aria-pressed="true"] {
  background: var(--card-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--text);
}

.ms[disabled] {
  opacity: 0.4;
  cursor: default;
  background: transparent;
}

.ms__bar {
  position: relative;
  align-self: end;
  width: 26px;
  border-radius: 7px;
  background: var(--bar-no);
  overflow: hidden;
  transition:
    height 700ms var(--ease-move),
    background-color var(--dur-theme) var(--ease-out);
}

.ms[aria-pressed="true"] .ms__bar {
  background: var(--bar-inv);
}

.ms__paid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
  transition: height 700ms var(--ease-move);
}

.ms__l {
  font-size: var(--text-s);
  font-weight: 500;
}

.ms__v {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ms__dot {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ms__dot.is-late {
  background: var(--late);
}

.ms__dot.is-wait {
  background: var(--bar-inv);
}

.ms__dot.is-now {
  box-shadow: inset 0 0 0 1.5px var(--text-2);
}

/* «Раньше» — на месте года, которого лента ещё не знает: стрелка вместо столбика. */
.tl__more {
  width: 58px;
  grid-template-rows: 88px auto;
}

.tl__more svg {
  align-self: center;
}

/* Лист въезжает с той стороны, куда листают. Два имени у каждой анимации — чтобы она
   запускалась заново на каждом листе, а не только на первом (month.js, g0/g1). */
.flip {
  animation-duration: 560ms;
  animation-timing-function: var(--ease-out);
  animation-fill-mode: both;
}

.flip.is-next.g0 {
  animation-name: flip-next-a;
}

.flip.is-next.g1 {
  animation-name: flip-next-b;
}

.flip.is-prev.g0 {
  animation-name: flip-prev-a;
}

.flip.is-prev.g1 {
  animation-name: flip-prev-b;
}

@keyframes flip-next-a {
  from {
    opacity: 0;
    transform: translateX(min(28vw, 320px));
  }
}

@keyframes flip-next-b {
  from {
    opacity: 0;
    transform: translateX(min(28vw, 320px));
  }
}

@keyframes flip-prev-a {
  from {
    opacity: 0;
    transform: translateX(max(-28vw, -320px));
  }
}

@keyframes flip-prev-b {
  from {
    opacity: 0;
    transform: translateX(max(-28vw, -320px));
  }
}

/* Края экрана — листать как страницы, подпись — соседний месяц. */
.edge {
  position: fixed;
  top: 50%;
  z-index: 20;
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  width: 52px;
  padding: 18px 0;
  margin-top: -60px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  opacity: 0.8;
  transition:
    opacity 200ms var(--ease-out),
    color 200ms,
    background-color 200ms;
}

.edge:hover {
  opacity: 1;
  color: var(--text);
  background: var(--card-2);
}

.edge[disabled] {
  visibility: hidden;
}

.edge--prev {
  left: 0;
  border-left: 0;
  border-radius: 0 20px 20px 0;
}

.edge--next {
  right: 0;
  border-right: 0;
  border-radius: 20px 0 0 20px;
}

/* Уже 1100 лист подходит к краю окна вплотную, и края закрыли бы его суммы; там листают
   стрелками у заголовка и пальцем. */
@media (max-width: 1100px) {
  .edge {
    display: none;
  }
}

/* Карточка клиента: лента и «Должен сейчас» в ряд; ниже — вкладки и карточки месяца:
   шире 1600 — колонкой справа от вкладок, уже — двумя карточками над ними (артборд WideClient). */
.ctop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.ctop .tl {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.ctop .tl__scroll {
  margin-top: auto;
}

.ccols {
  display: flex;
  flex-direction: column;
}

/* Суммы меряются карточкой: двумя в ряд «232 830,25 ₽» шириной около пяти кеглей на 900 точках
   окна выходили бы за край — кегль от ширины, но не больше токена. */
.cside {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.cside .big {
  font-size: min(var(--text-big), calc(((100cqi - var(--gap)) / 2 - 2 * var(--space-5)) / 5.2));
}

.cside .big__dec {
  font-size: min(var(--text-dec), 0.45em);
}

.cside__proj {
  display: none;
}

@media (min-width: 1600px) {
  .ccols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: var(--gap);
    align-items: start;
  }

  .cside {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 0;
  }

  .cside .big {
    font-size: min(var(--text-big), calc((100cqi - 2 * var(--space-5)) / 5.2));
  }

  .ccols > .client__tabs {
    grid-column: 1;
    grid-row: 1;
  }

  .cside__proj {
    display: block;
  }
}

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

/* Проекты месяца: строка — кнопка-фильтр задач, выбранная — подложкой. */
.mproj {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mproj__b {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  margin: 0;
  padding: 10px var(--space-2);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: var(--text-m);
  text-align: left;
  cursor: pointer;
}

.mproj li:first-child .mproj__b {
  border-top: 0;
}

.mproj__b:hover,
.mproj__b[aria-pressed="true"] {
  border-radius: var(--radius-row);
  background: var(--card-2);
}

.mproj__n {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mproj__n small {
  display: block;
  font-size: var(--text-s);
  color: var(--text-2);
}

.mproj__v {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.usd {
  margin-top: var(--space-2);
  min-height: 20px;
  font-size: var(--text-m);
  color: var(--text-2);
}

.card--in .usd {
  color: var(--on-accent-2);
}

.meter {
  height: 10px;
  margin-top: 14px;
  border-radius: 6px;
  background: var(--on-accent-box);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  border-radius: 6px;
  background: var(--on-accent);
  transition: width 900ms var(--ease-move);
}

/* «Месяц»: лента и сводка в ряд (артборд WideMonth) — лента в ширину окна не тянется,
   а сводке хватает 520. Уже 1180 — сводка под лентой. */
.mtop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

/* Карточки таблиц над месяцем — «Таблица не читается», «Оплаты не сходятся с Workpad», «Ждут цены» и «Ждут строки» — рядом;
   нет какой-то — остальные делят ширину (auto-fit схлопывает пустую колонку), нет ни одной — и места под ними нет. */
.mcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.mcards:empty {
  display: none;
}

/* «Таблица не читается»: отказ — коралл, но только точкой у заголовка, текст обычный. Строка — таблица,
   когда читалась, причина; при отказе — ссылка на саму таблицу. Те же строки у «Оплаты не сходятся
   с Workpad» (`unsynced-card.js`): подпись ряда и ячейка, под ними — чего не хватает; и у «Ждут строки
   в таблице» (`pending-card.js`): задача, день, клиент, под ними — таблица и лист. */
.sst__h {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.sst__dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--late);
}

.sst__list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sst__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.sst__row:first-child {
  padding-top: 0;
  border-top: 0;
}

.sst__txt {
  display: grid;
  flex: 1 1 280px;
  gap: 4px;
  min-width: 0;
  font-size: var(--text-body);
  overflow-wrap: anywhere;
}

.sst__txt b {
  font-weight: 500;
}

.sst__why {
  font-size: var(--text-s);
  color: var(--text-2);
}

/* Подсказка под строками «Оплаты не сходятся с Workpad» (дописывает Claude, сервер только сверяет)
   и «Ждут строки в таблице» (сервер повторяет сам, новый месяц заводит Claude). */
.uns__hint {
  margin-top: var(--space-3);
  font-size: var(--text-s);
  color: var(--text-2);
}

.uns__hint a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.uns__hint a:hover {
  color: var(--text);
}

/* «Ждут цены» над месяцем: задачи из строк таблиц без суммы. Обычная карточка, не лаймовая —
   это не пришедшие деньги; строка — название и день, под ними клиент, проект и строка таблицы. */
.unp__who {
  font-size: var(--text-body);
}

.unp__list {
  display: grid;
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}

.unp__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.unp__title {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.unp__day,
.unp__meta {
  font-size: var(--text-s);
  color: var(--text-2);
}

.unp__day {
  white-space: nowrap;
}

.unp__meta {
  grid-column: 1 / -1;
}

.unp__meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.unp__meta a:hover {
  color: var(--text);
}

/* «Без счёта» над месяцем: готовая работа проекта с юрлицом, по которой счёт ещё не выставлен.
   Обычная карточка, не лаймовая — деньги ещё не пришли; строка — клиент и проект ссылкой в карточку,
   справа сумма, под ними — с какого дня ждёт. */
.unb__list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.unb__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.unb__row:first-child {
  padding-top: 0;
  border-top: 0;
}

.unb__title {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.unb__title:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.unb__sum {
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.unb__since {
  grid-column: 1 / -1;
  font-size: var(--text-s);
  color: var(--text-2);
}

/* Сводка выше ленты: столбики прижаты к низу карточки, пустота — под заголовком, а не под месяцами. */
.mtop .tl {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.mtop .tl__scroll {
  margin-top: auto;
}

.mtop > .flip {
  display: grid;
}

/* Сводка месяца: одна большая цифра, под ней полоса «оплачено / ждём / станет долгом». */
.msplit {
  display: flex;
  gap: var(--space-1);
  height: 14px;
  margin-top: var(--space-4);
}

.msplit > span {
  min-width: 0;
  border-radius: var(--radius-cell);
}

.msplit__paid {
  background: var(--accent);
}

.msplit__now {
  background: var(--bar-inv);
}

.msplit__came {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.msplit__later {
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--bar-no);
}

.mkv {
  display: grid;
  margin: var(--space-3) 0 0;
}

.mkv > div {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: var(--text-m);
}

.mkv dt {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: auto;
  color: var(--text-2);
}

.mkv dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

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

/* Лист месяца — как «Оплаты»: группы, строка на клиента, у клиента с несколькими проектами —
   раскрытие. Колонки: клиент, начислено, оплачено полосой, осталось. Работа, налог сверху
   и оплаченная сумма — в подсказке строки `.sh-tip`: отдельными колонками они сливались
   в кашу одинаковых цифр.
   Каждая группа — своей карточкой `.shb`, итог `.shf` — тоже; заголовок листа и имена колонок —
   над ними, на фоне (вариант «Карточки», владелец 12.11.2026): в одной карточке группы
   сливались со строками клиентов. Сетка колонок во всех карточках одна, и имена колонок
   сдвинуты на поле карточки — суммы стоят одним столбиком через все карточки. */
.msheet > .card__head {
  padding: var(--space-2) var(--space-1) 0;
}

.shb {
  margin-bottom: var(--gap);
  padding: 2px var(--space-5) var(--space-2);
}

/* Колонки листа — одна сетка на все карточки (`--sh-cols`): клиент, начислено, оплачено полосой,
   осталось при любой ширине (владелец 04.12.2026: «работа», «налог» и «когда ждём» — лишнее).
   Пока за месяц ничего не пришло (`is-unpaid`), колонки «оплачено» нет: скрытая клетка выпадает
   из сетки, и колонки сдвигаются сами. */
.msheet {
  --sh-cols: minmax(0, 1fr) 150px 240px 150px;
}

.msheet.is-unpaid {
  --sh-cols: minmax(0, 1fr) 150px 150px;
}

.shc,
.shr,
.shs,
.shf {
  display: grid;
  grid-template-columns: var(--sh-cols);
  column-gap: 28px;
  align-items: center;
}

.msheet.is-unpaid .sh-pd {
  display: none;
}

.shc {
  padding: 0 calc(var(--space-5) + 14px) 10px;
  font-size: var(--text-s);
  color: var(--text-2);
}

.shc .r {
  text-align: right;
}

.shs {
  padding: 18px 14px var(--space-3);
}

.shs__t {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

/* Имя группы не переносится: на телефоне, где подпись «3 клиента, 15 проектов» стоит рядом,
   тесно — сокращается она. */
.shs__t h3 {
  flex: none;
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.shs .m {
  font-size: var(--text-body);
  font-weight: 500;
}

/* Строка — одна линия одной высоты, между строками тонкая линия: в широком окне глаз доходит
   по ней от имени до сумм. Линия — над строкой: первая отделяет клиентов от заголовка группы,
   а под последней черты у края карточки нет. */
.shr {
  min-height: 52px;
  padding: 0 14px;
  box-shadow: inset 0 1px 0 var(--line);
  transition: background-color 160ms var(--ease-out);
}

.shr:hover {
  background: var(--card-2);
}

.shr:hover .bar {
  background: var(--bg);
}

.shr.is-child {
  min-height: 44px;
}

.shr.is-child .sh-who {
  padding-left: 18px;
}

.shr.is-child .sh-n {
  font-size: var(--text-body);
  font-weight: 400;
}

.shr.is-child .m {
  font-size: var(--text-m);
}

.shr.is-child .m--due {
  font-weight: 400;
}

.sh-who {
  display: flex;
  align-items: center;
  min-width: 0;
}

/* Место под стрелку раскрытия — у каждой строки, а не только у клиента с проектами:
   иначе имена начинаются с разных линий. */
.sh-slot {
  width: 24px;
  height: 24px;
  flex: none;
  margin-right: 10px;
  display: grid;
  place-items: center;
}

.sh-exp {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.sh-exp:hover {
  background: var(--card);
  color: var(--text);
}

.sh-exp svg {
  transition: transform 320ms var(--ease-out);
}

.sh-exp[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.sh-id {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.sh-n {
  flex: 0 1 auto;
  min-width: 0;
  font-size: var(--text-l);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-sub {
  flex: 0 1 auto;
  min-width: 0;
  font-size: var(--text-s);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Другие валюты — строкой под рублями: «+ 1 740,00 $». */
.sh-x {
  display: block;
  font-size: var(--text-s);
  font-weight: 400;
  color: var(--text-2);
}

.sh-ch {
  position: relative;
}

/* Пунктир — у суммы есть налог сверху, он в подсказке. */
.sh-ch.has-tax .sh-sum {
  text-decoration: underline dotted var(--text-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* Подсказка встаёт слева от «начислено» — в пустую часть колонки имени, соседние строки
   не закрывает. Всплывает от наведения на саму цену, а не на строку: по строке она выскакивала,
   пока мышь шла от имени к суммам. С клавиатуры — от видимого фокуса на имени клиента: фокус
   после щелчка по стрелке держал бы её открытой, когда мышь уже ушла. */
.sh-tip {
  display: none;
  position: absolute;
  top: 50%;
  right: calc(100% + 14px);
  z-index: 5;
  min-width: 270px;
  padding: var(--space-3) 14px;
  transform: translateY(-50%);
  border-radius: var(--radius-row);
  background: var(--card);
  box-shadow:
    var(--shadow),
    0 0 0 1px var(--line);
  text-align: left;
  white-space: normal;
  font-size: var(--text-m);
  font-weight: 400;
}

.sh-ch:has(.sh-sum:hover, .sh-x:hover) .sh-tip,
.shr:has(.sh-n:focus-visible) .sh-tip {
  display: grid;
  gap: var(--space-1);
}

/* Подпись у имени («10 проектов · 32 задачи», «в долларах · 26 задач») шире телефона — подсказкой
   справа от имени, в пустой части колонки имени: строкой рядом она забивала лист (владелец
   04.12.2026). Всплывает от наведения на имя и фокуса на нём. На телефоне наведения нет — там
   подпись строкой под именем (`narrow.css`). */
@media (min-width: 761px) {
  .sh-id,
  .shs__t,
  .shf__t {
    position: relative;
  }

  /* Заголовок группы и итога — клетки сетки во всю колонку имени: без этого подсказка встала бы
     у правого края колонки, а не у имени. */
  .shs__t,
  .shf__t {
    justify-self: start;
    max-width: 100%;
  }

  .sh-id .sh-sub,
  .shs__t .sh-sub,
  .shf__t .sh-sub {
    display: none;
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    z-index: 5;
    padding: var(--space-2) 14px;
    transform: translateY(-50%);
    border-radius: var(--radius-row);
    background: var(--card);
    box-shadow:
      var(--shadow),
      0 0 0 1px var(--line);
    font-size: var(--text-m);
    font-weight: 400;
    color: var(--text);
  }

  .sh-id:has(.sh-n:hover, .sh-n:focus-visible) .sh-sub,
  .shs__t:has(h3:hover) .sh-sub,
  .shf__t:has(b:hover) .sh-sub {
    display: block;
  }
}

.sh-tip__r {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--text-2);
}

.sh-tip__v {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sh-tip__r.is-sum {
  margin-top: var(--space-1);
  padding-top: 6px;
  box-shadow: inset 0 1px 0 var(--line);
  color: var(--text);
  font-weight: 500;
}

.shf {
  padding: 20px calc(var(--space-5) + 14px) 18px;
}

.shf__t {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.shf__t b {
  font-size: var(--text-l);
  font-weight: 600;
}

.shf .m {
  font-weight: 600;
}

.shf__usd {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: var(--text-s);
  color: var(--text-2);
}

/* Уже 1100 колонке имени остаётся мало: сжимаются полоса и промежутки, суммы — нет. */
@media (max-width: 1100px) {
  .msheet {
    --sh-cols: minmax(0, 1fr) 128px 96px 128px;
  }

  .msheet.is-unpaid {
    --sh-cols: minmax(0, 1fr) 128px 128px;
  }

  .shc,
  .shr,
  .shs,
  .shf {
    column-gap: 18px;
  }
}

.sh-empty {
  padding: var(--space-5) calc(var(--space-5) + 14px);
  font-size: var(--text-body);
  color: var(--text-2);
}

.mnote {
  margin: 14px var(--space-1) 0;
  font-size: var(--text-m);
  color: var(--text-2);
}

/* Суммы листа — табличными цифрами по правому краю. */
.start .m {
  font-size: var(--text-body);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.start .m--due {
  font-size: var(--text-l);
  font-weight: 500;
}

.start .bar {
  display: block;
  height: 8px;
  border-radius: 5px;
  background: var(--card-2);
  overflow: hidden;
}

.start .bar__fill {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--accent);
  transition: width 760ms var(--ease-move);
}

/* На карту — штриховкой: деньги пришли, но мимо Точки и без счёта. */
.start .bar__fill.is-card {
  background: repeating-linear-gradient(135deg, var(--accent) 0 3px, transparent 3px 6px);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* ---------- Клиенты ---------- */

.clients .seg {
  width: 480px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.search {
  position: relative;
  flex: 0 1 440px;
  min-width: 0;
}

.search svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
}

.search .input {
  padding-left: 48px;
  border-radius: var(--radius-pill);
  background: var(--card);
}

.toolbar__note {
  margin-right: auto;
  font-size: var(--text-m);
  color: var(--text-2);
}

.toolbar .btn {
  height: 50px;
  padding: 0 var(--space-5);
  font-size: var(--text-body);
}

/* Таблица клиентов (артборд WideClients): строка — ссылка на карточку. Шире 1300 видны все
   колонки; уже уходят «проекты», уже 1000 — «как платит», уже 900 — работа за полгода;
   телефон — narrow.css. */
.clist {
  padding-top: var(--space-4);
}

.clist__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.crow {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 170px 300px 190px 200px 20px;
  column-gap: var(--space-5);
  align-items: center;
  margin: 0 calc(-1 * var(--space-3));
  padding: var(--space-3);
  border-top: 1px solid var(--line);
  border-radius: var(--radius-row);
  transition: background-color 160ms var(--ease-out);
}

.clist__rows li:first-child .crow {
  border-top-color: transparent;
}

.crow:hover {
  background: var(--card-2);
  text-decoration: none;
}

.crow:hover .ava {
  background: var(--bg);
}

.crow--head {
  padding-top: 0;
  border-top: 0;
  align-items: end;
  font-size: var(--text-s);
  color: var(--text-2);
}

.crow--head:hover {
  background: none;
}

.crow--head small {
  display: block;
  font-size: var(--text-xs);
}

.crow--head .crow__work {
  display: block;
}

.crow--head .r {
  text-align: right;
}

.crow__who {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.crow__id {
  display: grid;
  min-width: 0;
}

.crow__name {
  font-weight: 500;
  font-size: var(--text-l);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crow__s {
  display: block;
  font-size: var(--text-s);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crow__s.is-late {
  color: var(--late);
}

.crow__proj {
  font-size: var(--text-m);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crow__how {
  min-width: 0;
  font-size: var(--text-m);
}

.crow__work {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.crow__sum {
  font-size: var(--text-m);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.crow__none {
  font-size: var(--text-m);
  color: var(--text-2);
}

/* Полгода работы: высота — начислено от пика клиента, лайм — оплаченная доля. */
.wbars {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 34px;
}

.wbars i {
  width: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius-cell);
  background: var(--bar-inv);
}

.wbars i.is-zero {
  height: 3px;
  background: var(--line);
}

.wbars b {
  display: block;
  background: var(--accent);
}

.crow__owe {
  display: grid;
  justify-items: end;
  text-align: right;
}

.crow__v {
  font-size: var(--text-l);
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.crow__v.is-none {
  font-weight: 400;
  color: var(--text-2);
}

.crow__paid {
  display: grid;
  justify-items: start;
  min-width: 0;
}

.crow__paid .chip {
  margin-top: 4px;
}

.crow__go {
  display: grid;
  place-items: center;
  color: var(--text-2);
}

.crow.is-arch .crow__name,
.crow.is-arch .crow__v {
  color: var(--text-2);
}

.nothing {
  grid-column: 1 / -1;
  padding: var(--space-7) var(--space-2);
  text-align: center;
  font-size: var(--text-l);
  color: var(--text-2);
}

.nothing b {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-xxl);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}

@media (max-width: 1300px) {
  .crow {
    grid-template-columns: minmax(0, 1fr) 140px 230px 160px 170px 20px;
  }

  .crow__proj {
    display: none;
  }
}

@media (max-width: 1000px) {
  .crow {
    grid-template-columns: minmax(0, 1fr) 230px 150px 160px 20px;
  }

  .crow__how {
    display: none;
  }
}

@media (max-width: 900px) {
  .crow {
    grid-template-columns: minmax(0, 1fr) 150px 160px 20px;
  }

  .crow__work {
    display: none;
  }
}

/* ---------- Карточка клиента ---------- */

/* Кнопки — в строке с именем, справа: отдельной строкой под ссылками они съедали высоту. */
.hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  margin: 18px 0 26px;
}

.hero__ava {
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero__id {
  min-width: 0;
  display: grid;
  gap: var(--space-2);
}

.hero__line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) 0;
  font-size: var(--text-m);
  color: var(--text-2);
}

.hero__meta > span + span::before {
  content: "·";
  margin: 0 9px;
  color: var(--bar-no);
}

.hero__act {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: var(--space-1);
}

/* Уже 1180 кнопкам рядом с именем тесно — они встают строкой под ним. */
@media (max-width: 1180px) {
  .hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .hero__act {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 0;
  }
}

.hero__act .btn {
  height: 46px;
  padding: 0 22px;
  font-size: var(--text-body);
}

/* Клиент в работе — живая лаймовая точка у метки статуса. */
.dot-on {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.client__note {
  margin-bottom: var(--gap);
}

/* «Должен сейчас» по месяцам: месяц — кнопка, открывает его; открытый отмечен. */
.dm {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
}

.dm li {
  border-top: 1px solid var(--line);
}

.dm li:first-child {
  border-top: 0;
}

.dm__b {
  width: calc(100% + 2 * var(--space-2));
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  margin: 0 calc(-1 * var(--space-2));
  padding: 10px var(--space-2);
  border: 0;
  border-radius: var(--radius-field);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}

.dm__b:hover,
.dm__b[aria-current="true"] {
  background: var(--card-2);
}

.dm__m {
  font-weight: 500;
}

.dm__s {
  display: block;
  font-size: var(--text-s);
  font-weight: 400;
  color: var(--text-2);
}

.dm b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tabs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.seg__n {
  margin-left: 7px;
  font-size: var(--text-xs);
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

.panel-foot {
  padding: var(--space-3) var(--space-3) 0;
  font-size: var(--text-m);
  color: var(--text-2);
}

/* Задачи по месяцам. */
.mg {
  padding: 14px 0 6px;
  border-top: 1px solid var(--line);
}

.mg:first-child {
  border-top: 0;
}

.mg__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: 0 var(--space-3) var(--space-2);
}

.mg__head h3 {
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.mg__meta {
  font-size: var(--text-m);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.mg__head .chip {
  margin-left: auto;
}

/* Показать старые месяцы — пунктирная кнопка во всю ширину. */
.more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  height: 52px;
  margin-top: var(--space-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-row);
  background: transparent;
  color: var(--text-2);
  font-size: var(--text-m);
  font-weight: 500;
  cursor: pointer;
}

.more:hover {
  color: var(--text);
  background: var(--card-2);
}

.more svg {
  transition: transform var(--dur-theme) var(--ease-out);
}

.more[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Проекты, юрлица, доступы, документы и заметки — блоками. */
.records {
  display: grid;
  gap: var(--gap);
  padding-top: 10px;
}

.box {
  border-radius: 20px;
  background: var(--card-2);
  padding: 20px 22px;
  display: grid;
  gap: var(--space-2);
}

.box .empty {
  padding: var(--space-2) 0;
}

.box .section-gap-bottom {
  margin-bottom: var(--space-2);
}

.client__h2 {
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.box .table tbody tr:hover td {
  background: var(--card);
}

/* Проекты и сайты — карточкой на проект, по две в ряд: имя, как считаем и долг сверху,
   ресурсы пилюлями, строки фактов, действия внизу (client-projects.js). */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.project {
  align-content: start;
  gap: var(--space-3);
}

.project__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-4);
}

.project__id {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project__id h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.project__how {
  font-size: var(--text-s);
  color: var(--text-2);
}

.project__debt {
  display: grid;
  justify-items: end;
  gap: 1px;
  white-space: nowrap;
}

.project__debt span {
  font-size: var(--text-s);
  color: var(--text-2);
}

.project__debt b {
  font-size: var(--text-l);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.project__res {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.project__line {
  font-size: var(--text-m);
}

.project__line > span:first-child {
  margin-right: 6px;
  color: var(--text-2);
}

.project__plan {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline dotted var(--text-2);
  text-underline-offset: 4px;
}

.project__act {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.projects + .more {
  margin-top: var(--gap);
}

.num-text {
  font-variant-numeric: tabular-nums;
}

.secret {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.notes {
  display: grid;
  border-top: 1px solid var(--line);
}

.note-item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}

.note-item__text {
  white-space: pre-wrap;
}

.upload {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) 130px 180px auto;
  gap: var(--space-2);
}
