.budget-history {
  margin: 0 0 1.65rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
}
.budget-history > summary {
  color: #28594b;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 650;
  padding: .9rem 1.15rem;
}
.budget-history > summary:focus-visible,
.history-table-scroll:focus-visible {
  outline: 3px solid #96532e;
  outline-offset: 2px;
}
.history-content { padding: 0 1.15rem 1rem; }
.history-content p { margin: 0 0 .8rem; }
#history-status:empty { display: none; }
#history-retry { text-decoration: underline; margin-bottom: .75rem; }
.history-series:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .85fr);
  gap: 1.8rem;
  align-items: start;
}
.history-series figure { margin: 0; min-width: 0; }
.history-series figcaption,
.history-series caption { font-size: 1rem; font-weight: 650; text-align: left; }
.history-legend { display: flex; gap: 1.1rem; margin-top: .35rem; }
.history-legend span { display: inline-flex; gap: .45rem; align-items: center; font-size: .9rem; }
.history-legend span::before { content: ''; width: 1.5rem; border-top: 3px solid #286754; }
.history-legend span + span::before { border-top: 3px dashed #ae4326; }
#history-chart {
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr);
  grid-template-rows: 12rem 1.6rem;
  padding: 1rem .3rem 0 0;
}
.history-y-axis, .history-x-axis, .history-plot { position: relative; }
.history-y-axis span, .history-x-axis span { position: absolute; font: 400 .875rem/1 var(--font); color: #435a54; }
.history-y-axis span { transform: translateY(-50%); right: .45rem; }
.history-gridline { position: absolute; left: 0; right: 0; border-top: 1px solid #d8dfd8; }
.history-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.history-plot polyline { fill: none; stroke-width: 3; stroke-linejoin: round; }
.history-receipts { stroke: #286754; }
.history-outlays { stroke: #ae4326; stroke-dasharray: 7 4; }
.history-x-axis { grid-column: 2; }
.history-x-axis span { top: .55rem; transform: translateX(-50%); }
.history-x-axis span:first-child { transform: none; }
.history-x-axis span:last-child { transform: translateX(-100%); }
.history-table-scroll { overflow: auto; max-height: 18rem; min-width: 0; padding: 0 .2rem .2rem 0; }
.history-series table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
.history-series caption { padding-bottom: .35rem; }
.history-series th, .history-series td { padding: .32rem .5rem; text-align: right; border-bottom: 1px solid var(--line); }
.history-series th:first-child { text-align: left; }
.history-series th[scope="row"] { font-weight: 500; }
.history-series thead th { position: sticky; top: 0; background: #eef2ec; color: #284938; }
.history-content .history-sources { font-size: .875rem; margin: 1rem 0 0; color: #425750; }
.history-sources a { text-underline-offset: .15em; }
@media (max-width: 760px) {
  .history-series:not([hidden]) { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .history-content { padding: 0 .8rem .9rem; }
  .budget-history > summary { padding: .8rem; }
}
