/* Analytics workspace */
.analytics-block {
  margin-bottom: 26px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 14px;
}

.section-head h2 {
  font-size: 1.24rem;
}

.section-head .subtitle {
  max-width: 76ch;
}

.chart-grid {
  display: grid;
  gap: 18px;
}

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

.chart-card {
  display: flex;
  flex-direction: column;
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.chart-head h3 {
  font-size: 0.95rem;
}

.chart-body {
  position: relative;
  height: 286px;
  padding: 16px 18px 18px;
}

.chart-body-tall {
  height: 370px;
}

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

.chart-empty {
  color: var(--muted);
  text-align: center;
  padding: 56px 14px;
  font-size: 0.85rem;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  flex-wrap: wrap;
}

.segmented-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

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

.segmented-button.active {
  background: var(--blue-dim);
  color: #bae6fd;
}

.segmented-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (max-width: 1120px) {
  .chart-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-body,
  .chart-body-tall {
    height: 310px;
  }
}

@media (max-width: 620px) {
  .chart-head {
    padding: 14px;
  }

  .chart-body {
    padding: 12px;
  }
}
