
.tool-stack-wrap {
  padding-bottom: 10px;
}

.visual-breakdown--single {
  grid-template-columns: 1fr;
}

/*.chart-panel {
  overflow: hidden;
}*/

.chart-canvas-wrap {
  min-height: 280px;
}

.chart-canvas-wrap canvas {
  width: 100% !important;
  height: 80% !important;
}

.year-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.year-group {
  border: 1px solid var(--thp-border-soft);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.year-group-toggle {
  width: 100%;
  border: none;
  background: transparent;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: #1b2940;
}

.year-group-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.year-group-summary strong {
  color: var(--thp-text);
  font-size: 1rem;
}

.year-group-summary small {
  color: var(--thp-muted);
  font-size: .86rem;
}

.year-group-body {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  padding: 0 18px;
  border-top: 1px solid transparent;
  transition: max-height .28s ease, opacity .22s ease, padding .22s ease, border-color .22s ease;
}

.year-group.is-open .year-group-body {
  max-height: 2400px;
  opacity: 1;
  pointer-events: auto;
  padding: 10px 18px 18px;
  border-top-color: var(--thp-border-soft);
}

.breakdown-table-wrap {
  overflow-x: auto;
}

.breakdown-table th,
.breakdown-table td {
  white-space: nowrap;
}

.breakdown-table th:first-child,
.breakdown-table td:first-child {
  text-align: left;
}

.results-empty-state {
  min-height: 220px;
}

.faq-answer p {
  margin: 0;
}

@media (max-width: 780px) {
  .chart-canvas-wrap {
    min-height: 220px;
  }
}


.chart-canvas-wrap {
  position: relative;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #f7f8fb;
  color: #23324c;
  font-weight: 600;
  line-height: 1;
}

.chart-legend-swatch {
  display: inline-block;
  width: 32px;
  height: 0;
  border-top: 5px solid currentColor;
  border-radius: 999px;
}

.chart-legend-item--balance {
  color: #2fc3b4;
}

.chart-legend-item--contributions {
  color: #a7b1c5;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 190px;
  max-width: 260px;
  padding: 16px 20px;
  border-radius: 22px;
  background: #1d2642;
  color: #ffffff;
  box-shadow: 0 22px 45px rgba(12, 20, 38, 0.18);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0;
  transition: opacity .12s ease;
}

.chart-tooltip.is-visible {
  opacity: 0.9;
}

.chart-tooltip-title {
  margin: 0 0 8px;
  color: rgba(255,255,255,0.86);
  font-size: .85rem;
  font-weight: 600;
}

.chart-tooltip-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.chart-tooltip-change {
  margin: 6px 0 0;
  color: rgba(255,255,255,0.9);
  font-size: .85rem;
  font-weight: 600;
}

@media (max-width: 780px) {
  .chart-legend-item {
    padding: 10px 14px;
    font-size: .94rem;
  }

  .chart-tooltip {
    min-width: 160px;
    padding: 14px 16px;
  }
}
