.fs-budget-summary > div:first-child > div > p:first-child {
  color: var(--fipav-navy);
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 650;
}

.fs-budget-kpi-area {
  container: budget-stats / inline-size;
}

.fs-budget-kpi-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--fipav-control-border, #d7e4f2);
  border-radius: var(--fipav-radius, 14px);
  background: var(--fipav-control-border, #d7e4f2);
}

.fs-budget-stat {
  min-width: 0;
  padding: 15px clamp(14px, 1.4cqi, 24px);
  background: white;
}

.fs-budget-stat-label {
  color: #526378;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.fs-budget-stat dd {
  margin: 5px 0 0;
}

.fs-budget-stat-value {
  display: block;
  color: #172b45;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1rem, 1.7cqi, 1.375rem);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.35;
  white-space: nowrap;
}

.fs-budget-stat-detail {
  display: block;
  margin-top: 6px;
  color: #526378;
  font-size: .75rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.fs-budget-stat.is-available {
  background: #edf5fc;
}

.fs-budget-stat.is-available :is(dt, .fs-budget-stat-value) {
  color: var(--fipav-blue, #005ba2);
}

.fs-budget-stat.is-over-budget {
  background: #fff1f2;
}

.fs-budget-stat.is-over-budget :is(dt, .fs-budget-stat-value) {
  color: #9f1239;
}

@container budget-stats (max-width: 53rem) {
  .fs-budget-kpi-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container budget-stats (max-width: 19.5rem) {
  .fs-budget-kpi-list { grid-template-columns: minmax(0, 1fr); }
  .fs-budget-stat { padding: 12px 14px; }
}

.fs-budget-ledger {
  container: budget-ledger / inline-size;
  width: 100%;
  min-width: 0;
  margin-top: 18px;
}

#main_content_data .fs-budget-objectives {
  width: 100%;
  table-layout: fixed;
  border: 1px solid #cfdde9;
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.fs-budget-objectives > colgroup > col:nth-child(n+2):nth-child(-n+5) { width: 14.5%; }
.fs-budget-objectives > colgroup > col:last-child { width: 52px; }
#main_content_data .fs-budget-objectives > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 14px;
  height: auto;
  color: #154d76;
  font-size: 13px;
  line-height: 20px;
  text-align: right;
  border: 0;
  border-bottom: 1px solid #cbdce9;
}
#main_content_data .fs-budget-objectives > thead > tr > th:first-child {
  padding-left: 18px;
  text-align: left;
  border-top-left-radius: 11px;
}
#main_content_data .fs-budget-objectives > thead > tr > th:last-child { border-top-right-radius: 11px; }

#main_content_data .fs-budget-objectives > tbody > .fs-budget-objective-row > :is(th,td) {
  height: auto;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #e1e9f0;
  vertical-align: middle;
  background: transparent;
}
#main_content_data .fs-budget-objectives > tbody:last-child > .fs-budget-objective-row:has(+ [hidden]) > * {
  border-bottom: 0;
}
.fs-budget-objective-row { color: #20334b; cursor: pointer; }
.fs-budget-objective-row:hover { background: #f4f8fc; }
.fs-budget-objective-row[data-selected="true"] { background: #eef6fc; }
.fs-budget-objective-row[data-selected="true"] > .fs-budget-name { box-shadow: inset 3px 0 #005ba2; }
.fs-budget-objective:last-child > .fs-budget-objective-row:has(+ [hidden]) > :first-child { border-bottom-left-radius: 11px; }
.fs-budget-objective:last-child > .fs-budget-objective-row:has(+ [hidden]) > :last-child { border-bottom-right-radius: 11px; }
#main_content_data .fs-budget-objective-row > .fs-budget-name { padding-left: 18px; text-align: left; }
#main_content_data .fs-budget-pick {
  display: grid;
  width: 100%;
  gap: 3px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  white-space: normal;
}
.fs-budget-code { color: #526579; font-size: 12px; line-height: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.fs-budget-title { color: #153754; font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.fs-budget-figure { text-align: right; font-variant-numeric: tabular-nums; }
.fs-budget-money { white-space: nowrap; font-size: 14px; font-weight: 500; }
.fs-budget-field-label { display: none; }
#main_content_data .fs-budget-objective-row > .fs-budget-action { padding: 6px 10px 6px 4px; text-align: center; }
#main_content_data .fs-budget-expand {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--fipav-blue, #005ba2);
  background: transparent;
}
#main_content_data .fs-budget-expand:is(:hover,[aria-expanded="true"]) { border-color: #cee0ef; background: #e5f1fb; }
.fs-budget-expand svg { width: 18px; height: 18px; }
.fs-budget-expand[aria-expanded="true"] svg { transform: rotate(90deg); }
.fs-budget-ledger :is(button, .fs-budget-detail-scroll):focus-visible, .fs-budget-cycle:focus-visible {
  outline: 2px solid var(--fipav-blue, #005ba2);
  outline-offset: 2px;
  border-radius: 4px;
}

.fs-budget-detail-row[hidden] { display: none; }
#main_content_data .fs-budget-objectives > tbody > .fs-budget-detail-row > td {
  height: auto;
  padding: 8px 12px 14px;
  border: 0;
  border-bottom: 1px solid #d3e1ec;
  background: #f5f9fc;
}
.fs-budget-detail-scroll { overflow-x: auto; max-width: 100%; border: 1px solid #d7e3ed; border-radius: 8px; background: white; }
.fs-budget-chapters { width: 100%; min-width: 69rem; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.fs-budget-chapters > colgroup > col:nth-child(n+2):nth-child(-n+6) { width: 12%; }
.fs-budget-chapters > colgroup > col:nth-child(7) { width: 8%; }
.fs-budget-chapters > colgroup > col:last-child { width: 5%; }
#main_content_data .fs-budget-chapters > thead > tr > th {
  height: auto;
  padding: 8px;
  background: #edf4f9;
  color: #36546a;
  font-size: 12px;
  text-align: right;
}
#main_content_data .fs-budget-chapters > thead > tr > th:first-child { text-align: left; }
#main_content_data .fs-budget-chapters > thead > tr > th:nth-last-child(-n+2) { text-align: center; }
.fs-budget-chapters abbr { text-decoration: none; }
#main_content_data .fs-budget-chapters .fs-budget-chapter-code {
  margin: 0 0 3px;
  color: #526579;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}
#main_content_data .fs-budget-chapters tbody tr > td:first-child h3 {
  color: #233f57;
  line-height: 20px;
}
#app #main_content_data .fs-budget-chapters input[aria-label="Filtra CRA collegati"] {
  padding-left: 34px !important;
}
#main_content_data .fs-budget-chapters tbody tr > td {
  padding: 8px;
  font-variant-numeric: tabular-nums;
}
#main_content_data .fs-budget-chapters tbody tr > td:first-child :is(p,h3) { white-space: normal; overflow-wrap: anywhere; }
#main_content_data .fs-budget-chapters tbody tr > td[colspan="8"] { padding: 0; }
.fs-budget-chapters td:not(:first-child) { white-space: nowrap; }
.fs-budget-chapters table > colgroup > col:first-child { width: 27%; }
.fs-budget-chapters table > colgroup > col:nth-child(n+2):nth-child(-n+6) { width: 12%; }
.fs-budget-chapters table > colgroup > col:nth-child(7) { width: 8%; }
.fs-budget-chapters table > colgroup > col:last-child { width: 5%; }

@container budget-ledger (54rem < width <= 64rem) {
  .fs-budget-objectives > colgroup > col:nth-child(n+2):nth-child(-n+5) { width: 16%; }
  #main_content_data .fs-budget-objectives > thead > tr > th:not(:first-child),
  #main_content_data .fs-budget-objectives > tbody > .fs-budget-objective-row > .fs-budget-figure {
    padding-inline: 8px;
  }
}
@container budget-ledger (max-width: 54rem) {
  .fs-budget-objectives, .fs-budget-objective { display: block; }
  .fs-budget-objectives > colgroup { display: none; }
  .fs-budget-objectives > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .fs-budget-objective:not(:last-child) { border-bottom: 1px solid #d1dfea; }
  .fs-budget-objective-row {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    align-items: center;
    position: relative;
    padding: 15px 14px;
  }
  #main_content_data .fs-budget-objectives > tbody > .fs-budget-objective-row > :is(th,td) { padding: 0; border: 0; box-shadow: none; }
  .fs-budget-name { grid-column: 1 / -1; margin-right: 44px; }
  .fs-budget-action { position: absolute; top: 12px; right: 10px; }
  .fs-budget-figure { text-align: left; }
  .fs-budget-field-label { display: block; color: #526579; font-size: 12px; line-height: 18px; }
  .fs-budget-detail-row:not([hidden]), .fs-budget-detail-row > td { display: block; min-width: 0; }
  .fs-budget-objective:first-of-type > tr:first-child { border-radius: 11px 11px 0 0; }
  .fs-budget-objective:last-child > tr:first-child:has(+ [hidden]) { border-radius: 0 0 11px 11px; }
}
@container budget-ledger (max-width: 35rem) {
  .fs-budget-objective-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
