.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.activity-header p:not(.eyebrow) {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.875rem;
}

.activity-period-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-period-form .method-field > label {
  color: var(--muted);
  font-size: 0.8rem;
}

.activity-period-form select {
  min-width: 150px;
}

.activity-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 16px;
}

.timing-totals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timing-zero-line {
  stroke: var(--muted);
}

.activity-total {
  display: grid;
  grid-template-columns: 10px 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.activity-total::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.activity-created::before { color: var(--text); }
.activity-handoff::before { color: var(--primary); }
.activity-delivered::before { color: var(--success); }

.activity-total strong {
  grid-column: 2;
  margin-top: 4px;
  color: var(--text);
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}

.activity-chart-wrap {
  overflow-x: auto;
}

.activity-chart-wrap:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.activity-chart {
  display: block;
  width: 100%;
  min-width: 600px;
  height: auto;
}

.method-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 18px 0;
  list-style: none;
  color: var(--text);
  font-size: 0.8rem;
}

.method-chart-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.method-chart-legend span {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 2px;
}

.method-series-0 { color: #4b3bff; }
.method-series-1 { color: #087256; }
.method-series-2 { color: #b65b00; }
.method-series-3 { color: #a42a30; }
.method-series-4 { color: #654282; }
.method-series-5 { color: #465e73; }
.method-series-6 { color: #8a7966; }
.method-chart-legend span { background: currentColor; }
.method-chart-segment { fill: currentColor; stroke: var(--panel); stroke-width: 0.5; }

.method-chart-bar {
  cursor: pointer;
}

.method-chart-bar:focus-visible {
  outline: none;
}

.method-chart-bar:focus-visible .method-chart-segment {
  stroke: var(--text);
  stroke-width: 1.5;
}

.method-chart-tooltip {
  position: fixed;
  z-index: 20;
  max-width: min(340px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid #47445d;
  border-radius: 10px;
  background: var(--text);
  box-shadow: var(--shadow);
  color: white;
  font-size: 0.8rem;
  line-height: 1.4;
  pointer-events: auto;
}

.method-chart-tooltip[hidden] {
  display: none;
}

.method-tooltip-total {
  margin: 3px 0 8px;
  color: #cbc9df;
}

.method-tooltip-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.method-tooltip-row span:first-child {
  overflow-wrap: anywhere;
}

.method-tooltip-row strong {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.method-tooltip-other {
  margin-left: 12px;
  padding-left: 8px;
  border-left: 1px solid #77748a;
  color: #eeecff;
}

.method-settings-refresh {
  margin-top: 12px;
}

.activity-grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.activity-axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.activity-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activity-line-created { color: var(--text); }
.activity-line-handoff { color: var(--primary); }
.activity-line-delivered { color: var(--success); }
.activity-line.activity-line-handoff { stroke-dasharray: 8 4; }
.activity-line.activity-line-delivered { stroke-dasharray: 2 4; }

.activity-point {
  fill: currentColor;
  stroke: var(--panel);
  stroke-width: 1;
}

.activity-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.activity-data {
  margin-top: 16px;
}

.activity-data summary {
  color: var(--primary-strong);
  cursor: pointer;
  font-weight: 600;
}

.activity-data .table-wrap {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .activity-header {
    flex-direction: column;
  }

  .activity-totals {
    grid-template-columns: 1fr;
  }
}
