/* GitHub Activity Terrain Component Styles */
.activity-card {
  position: relative;
  margin-top: 12px;
  border-radius: 0;
  border: none;
  background: transparent;
  overflow: visible;
  box-shadow: none;

  /* Sleek Monochrome Palette - Light Mode */
  --terrain-0: #ebebe7;
  --terrain-1: #c8c8c2;
  --terrain-2: #8f8f87;
  --terrain-3: #4a4a44;
  --terrain-4: #121210;
  /* Only highlighted/active box is green */
  --terrain-accent: #22c55e;
  --terrain-text: var(--muted);
}

html.dark .activity-card {
  border: none;
  background: transparent;
  box-shadow: none;
  /* Sleek Monochrome Palette - Dark Mode */
  --terrain-0: #191919;
  --terrain-1: #323232;
  --terrain-2: #5c5c5c;
  --terrain-3: #9e9e9e;
  --terrain-4: #ededed;
  /* Only highlighted/active box is green */
  --terrain-accent: #22c55e;
  --terrain-text: var(--muted);
}

.activity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 10px;
}

.activity-title-group {
  min-width: 0;
}

.activity-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: var(--fg);
}

.activity-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--live);
  background: color-mix(in srgb, var(--live) 12%, transparent);
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: 500;
}

.activity-title-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 6px var(--live);
}

.activity-readout {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.15s;
}

.activity-readout.is-active {
  color: var(--fg);
}

.activity-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 99px;
  background: var(--hover);
  border: 1px solid var(--line);
}

.activity-btn {
  padding: 4px 11px;
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  transition: all 0.2s var(--spring);
}

.activity-btn:hover {
  color: var(--fg);
}

.activity-btn.active {
  background: var(--card);
  color: var(--fg);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

html.dark .activity-btn.active {
  background: var(--line-2);
  color: var(--fg);
}

.activity-canvas-wrap {
  position: relative;
  width: 100%;
  height: 290px;
  touch-action: pan-y;
  user-select: none;
}

.activity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: grab;
}

.activity-canvas.dragging {
  cursor: grabbing;
}

.activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 8px;
  gap: 12px;
  padding: 8px 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--soft);
}

.activity-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.activity-hint svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.activity-legend {
  display: flex;
  align-items: center;
  gap: 4px;
}

.activity-legend-step {
  width: 10px;
  height: 10px;
  border-radius: 2.5px;
}

.ext-link {
  color: var(--muted);
  transition: color 0.2s;
}

.ext-link:hover {
  color: var(--fg);
}

@media (max-width: 560px) {
  .activity-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .activity-canvas-wrap {
    height: 250px;
  }
}
