.profit-expenses-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: .4em;
  padding: .35em 0;
  border: 0;
  background: transparent;
  color: #244d68;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.profit-expenses-toggle:hover { text-decoration: underline; }
.client-profitability-table .profit-expense-detail td { padding-block: 7px; background: #fbfaf8; }
.client-profitability-table .profit-expense-detail td:first-child { padding-left: 22px; }
.client-profitability-table .usn-reduction-table-row { background: white; }
.profit-tax-detail summary { display: list-item; cursor: pointer; font-weight: 600; font-size: 14px; }
.usn-reduction-table-row td { padding-block: 9px; }
.client-profitability-table .usn-reduction-table-row .profit-value strong { font-weight: 600; }
details.profit-tax-detail { padding: 6px 0; margin: 6px 0 10px; background: transparent; border: 0; }
.profit-tax-detail summary { color: #526578; font-size: 13px; font-weight: 500; }

.profit-tax-detail[open] summary { margin-bottom: 12px; }
.client-profitability-panel .table-wrap { overflow-x: auto; }
.client-profitability-table { min-width: 1000px; }
.client-profitability-table td { font-variant-numeric: tabular-nums; }
.client-profitability-table .profit-value.money-positive strong { color: #16704e; }
.client-profitability-table .profit-value.money-negative strong { color: #a83932; }
.profit-columns-toggle { display: none; }
.profit-mobile-expense span { display: none; }
@media (max-width: 700px) {
  .profit-columns-toggle {
    display: block;
    margin: 0 0 10px auto;
    padding: 6px 10px;
    border: 1px solid #d1dce5;
    border-radius: 6px;
    background: white;
    color: #234c67;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
  }
  .client-profitability-table.profit-compact { min-width: 0; }
  .profit-compact tr { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: stretch; }
  .profit-compact tr > :is(td,th) { display: none; }
  .profit-compact tr > :is(td,th):first-child,
  .profit-compact tr > th:nth-child(9),
  .profit-compact tr > .profit-value,
  .profit-compact tr > .profit-mobile-expense {
    display: block; width: auto; min-width: 0; max-width: none;
    font-size: 12px; white-space: normal;
  }
  .profit-compact .profit-value, .profit-compact .profit-mobile-expense { text-align: right; }
}
@media (max-width: 700px) {
  .client-profitability-table.profit-compact :is(thead,tbody,tfoot) { display: block; }
  .client-profitability-table.profit-compact { display: block; }
}

@media (max-width: 700px) {
  .profit-compact tr > .profit-value, .profit-compact tr > .profit-mobile-expense,
  .profit-compact tr > th:nth-child(9) { display: flex; justify-content: end; align-items: center; }
  .profit-compact .profit-mobile-expense span { display: inline; color: #66544b; }
}
.client-profitability-table td.usn-tax-delta { white-space: normal; padding-inline: 3px; }
.client-profitability-table td:first-child small.expense-tax-caption { display: block; white-space: normal; line-height: 1.4; }
