@layer components {
  /* The Activité tab's switch between its two pages: underlined tabs on the desktop, segments below 1100px. */
  .activity-segment-dot { display: none; }

  @media (min-width: 1100px) {
    .activity-segments { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
    .activity-segment {
      display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; margin-bottom: -1px;
      border-bottom: 2px solid transparent; color: var(--muted-foreground); font-weight: 500; text-decoration: none;
    }
    .activity-segment:is(:hover, :active) { color: var(--foreground); text-decoration: none; }
    .activity-segment[aria-current="page"] {
      color: var(--foreground); font-weight: 600; border-bottom-color: var(--jx-accent);
    }
    .activity-segment-dot { display: inline; }
    .activity-segment:has(> .sidebar-count[hidden]) > .activity-segment-dot { display: none; }
    /* The number is plain text beside the label, not a pill. */
    .activity-segment .sidebar-count {
      min-width: 0; margin-left: 0; padding: 0; background: none; color: inherit; font-size: inherit; font-weight: inherit;
      line-height: inherit;
    }
  }

  @media (max-width: 1099px) {
    .activity-segments {
      display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-lg); background: var(--muted);
    }
    .activity-segment {
      flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
      min-height: var(--tap); border-radius: var(--radius-md);
      color: var(--muted-foreground); font-weight: 500; text-decoration: none;
    }
    .activity-segment:is(:hover, :active) { color: var(--foreground); text-decoration: none; }
    .activity-segment[aria-current="page"] {
      background: var(--background); color: var(--foreground); font-weight: 600; box-shadow: var(--shadow-xs);
    }
    .activity-segment .sidebar-count { margin-left: 0; }
    .activity-segment .actions-count { background: var(--jx-wait); }
  }

  @media (max-width: 767px) {
    /* The segments name the page on a phone; its heading stays for assistive technologies. */
    .page:has(> .activity-segments) > .page-header {
      position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
      clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }
  }
}
